fix: FancyCursor hover behaviour on normal text
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
<title>Ragusa IT-Consulting | Webentwicklung & IT-Beratung</title>
|
<title>Ragusa IT-Consulting | Webentwicklung & IT-Beratung</title>
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Sora:wght@100..800&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
@@ -59,12 +59,9 @@
|
|||||||
|
|
||||||
/* Global cursor hiding */
|
/* Global cursor hiding */
|
||||||
@media (hover: hover) and (pointer: fine) {
|
@media (hover: hover) and (pointer: fine) {
|
||||||
body,
|
html,
|
||||||
a,
|
body,
|
||||||
button,
|
* {
|
||||||
input,
|
|
||||||
textarea,
|
|
||||||
[role="button"] {
|
|
||||||
cursor: none !important;
|
cursor: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export const FancyCursor = memo(() => {
|
|||||||
|
|
||||||
// Coercing to boolean with `!!` is a micro-optimization.
|
// Coercing to boolean with `!!` is a micro-optimization.
|
||||||
const isResize = !!el?.closest('#custom-resize-handle');
|
const isResize = !!el?.closest('#custom-resize-handle');
|
||||||
const isText = !!el?.closest('input[type="text"], input[type="email"], textarea, [contenteditable="true"]');
|
const isText = !!el?.closest('input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="tel"], input[type="url"], input:not([type]), textarea, [contenteditable="true"]');
|
||||||
const isLink = !!el?.closest('a, button, [role="button"], input[type="submit"], input[type="button"]');
|
const isLink = !!el?.closest('a, button, [role="button"], input[type="submit"], input[type="button"]');
|
||||||
|
|
||||||
// These classes are toggled based on the hovered element.
|
// These classes are toggled based on the hovered element.
|
||||||
|
|||||||
@@ -38,88 +38,54 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
max-width: 800px;
|
max-width: 900px;
|
||||||
text-align: center;
|
text-align: left;
|
||||||
|
padding-left: var(--space-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.greeting {
|
.greeting {
|
||||||
font-size: 1.125rem;
|
font-size: 1.25rem;
|
||||||
font-weight: 500;
|
font-weight: 600;
|
||||||
color: var(--md-sys-color-primary);
|
color: var(--md-sys-color-primary);
|
||||||
margin-bottom: var(--space-md);
|
margin-bottom: var(--space-md);
|
||||||
letter-spacing: 0.05em;
|
letter-spacing: 0.05em;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: clamp(2.5rem, 6vw, 5rem);
|
font-size: clamp(3.5rem, 9vw, 6.5rem);
|
||||||
font-weight: 700;
|
font-weight: 800;
|
||||||
line-height: 1.1;
|
line-height: 1.05;
|
||||||
margin-bottom: var(--space-lg);
|
margin-bottom: var(--space-lg);
|
||||||
background: linear-gradient(
|
color: var(--md-sys-color-on-surface);
|
||||||
135deg,
|
letter-spacing: -0.02em;
|
||||||
var(--md-sys-color-on-surface) 0%,
|
|
||||||
var(--md-sys-color-primary) 50%,
|
|
||||||
var(--md-sys-color-on-surface) 100%
|
|
||||||
);
|
|
||||||
background-size: 200% auto;
|
|
||||||
-webkit-background-clip: text;
|
|
||||||
-webkit-text-fill-color: transparent;
|
|
||||||
background-clip: text;
|
|
||||||
animation: shimmer 3s ease-in-out infinite;
|
|
||||||
filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.5));
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes shimmer {
|
|
||||||
0%, 100% {
|
|
||||||
background-position: 0% center;
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
background-position: 100% center;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tagline {
|
.tagline {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: flex-start;
|
||||||
gap: 0.5em;
|
gap: 0.5em;
|
||||||
font-size: clamp(1.25rem, 3vw, 2rem);
|
font-size: clamp(1.25rem, 2.5vw, 1.75rem);
|
||||||
color: var(--md-sys-color-on-surface);
|
color: var(--md-sys-color-on-surface);
|
||||||
opacity: 0.9;
|
opacity: 0.9;
|
||||||
margin-bottom: var(--space-2xl);
|
margin-bottom: var(--space-2xl);
|
||||||
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
max-width: 600px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.typed {
|
.typed {
|
||||||
color: var(--md-sys-color-primary);
|
color: var(--md-sys-color-primary);
|
||||||
font-weight: 600;
|
font-weight: 700;
|
||||||
min-width: 200px;
|
min-width: 200px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cursor {
|
|
||||||
display: inline-block;
|
|
||||||
margin-left: 2px;
|
|
||||||
animation: blink 1s step-end infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes blink {
|
|
||||||
0%, 100% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.cta {
|
.cta {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: flex-start;
|
||||||
gap: var(--space-md);
|
gap: var(--space-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,23 +24,44 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.grid {
|
.grid {
|
||||||
display: grid;
|
display: flex;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
|
||||||
gap: var(--space-xl);
|
gap: var(--space-xl);
|
||||||
|
overflow-x: auto;
|
||||||
|
padding-bottom: var(--space-xl);
|
||||||
|
padding-top: var(--space-xl);
|
||||||
|
scroll-snap-type: x mandatory;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
scrollbar-width: none; /* Firefox */
|
||||||
|
margin: 0 calc(var(--space-lg) * -1); /* Negative margin to touch edges */
|
||||||
|
padding-left: var(--space-lg); /* Padding to offset negative margin */
|
||||||
|
padding-right: var(--space-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid::-webkit-scrollbar {
|
||||||
|
display: none; /* Chrome, Safari, Opera */
|
||||||
}
|
}
|
||||||
|
|
||||||
.cardWrapper {
|
.cardWrapper {
|
||||||
height: 100%;
|
flex: 0 0 320px;
|
||||||
|
scroll-snap-align: start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.serviceCard {
|
.serviceCard {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
min-height: 300px;
|
||||||
|
background: var(--md-sys-color-surface-container);
|
||||||
|
border: 1px solid var(--md-sys-color-outline-variant);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.cardWrapper {
|
||||||
|
flex: 0 0 400px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 1024px) {
|
@media (min-width: 1024px) {
|
||||||
.grid {
|
/* On very large screens, we can center it if few items, or keep scrolling */
|
||||||
grid-template-columns: repeat(4, 1fr);
|
/* Keeping scrolling for the "horizontal scroll" aesthetic */
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,8 +53,8 @@
|
|||||||
--md-sys-color-scrim: #000000;
|
--md-sys-color-scrim: #000000;
|
||||||
|
|
||||||
/* Typography */
|
/* Typography */
|
||||||
--md-sys-typescale-display-font: 'Inter', sans-serif;
|
--md-sys-typescale-display-font: 'Sora', sans-serif;
|
||||||
--md-sys-typescale-body-font: 'Inter', sans-serif;
|
--md-sys-typescale-body-font: 'Sora', sans-serif;
|
||||||
--md-sys-typescale-code-font: 'JetBrains Mono', monospace;
|
--md-sys-typescale-code-font: 'JetBrains Mono', monospace;
|
||||||
|
|
||||||
/* Spacing */
|
/* Spacing */
|
||||||
|
|||||||
Reference in New Issue
Block a user