fix: FancyCursor hover behaviour on normal text
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<title>Ragusa IT-Consulting | Webentwicklung & IT-Beratung</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<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>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
@@ -59,12 +59,9 @@
|
||||
|
||||
/* Global cursor hiding */
|
||||
@media (hover: hover) and (pointer: fine) {
|
||||
html,
|
||||
body,
|
||||
a,
|
||||
button,
|
||||
input,
|
||||
textarea,
|
||||
[role="button"] {
|
||||
* {
|
||||
cursor: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ export const FancyCursor = memo(() => {
|
||||
|
||||
// Coercing to boolean with `!!` is a micro-optimization.
|
||||
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"]');
|
||||
|
||||
// These classes are toggled based on the hovered element.
|
||||
|
||||
@@ -38,88 +38,54 @@
|
||||
}
|
||||
|
||||
.text {
|
||||
max-width: 800px;
|
||||
text-align: center;
|
||||
max-width: 900px;
|
||||
text-align: left;
|
||||
padding-left: var(--space-md);
|
||||
}
|
||||
|
||||
.greeting {
|
||||
font-size: 1.125rem;
|
||||
font-weight: 500;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
color: var(--md-sys-color-primary);
|
||||
margin-bottom: var(--space-md);
|
||||
letter-spacing: 0.05em;
|
||||
text-transform: uppercase;
|
||||
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: clamp(2.5rem, 6vw, 5rem);
|
||||
font-weight: 700;
|
||||
line-height: 1.1;
|
||||
font-size: clamp(3.5rem, 9vw, 6.5rem);
|
||||
font-weight: 800;
|
||||
line-height: 1.05;
|
||||
margin-bottom: var(--space-lg);
|
||||
background: linear-gradient(
|
||||
135deg,
|
||||
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;
|
||||
}
|
||||
color: var(--md-sys-color-on-surface);
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
.tagline {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
justify-content: flex-start;
|
||||
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);
|
||||
opacity: 0.9;
|
||||
margin-bottom: var(--space-2xl);
|
||||
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
||||
max-width: 600px;
|
||||
}
|
||||
|
||||
.typed {
|
||||
color: var(--md-sys-color-primary);
|
||||
font-weight: 600;
|
||||
font-weight: 700;
|
||||
min-width: 200px;
|
||||
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 {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
justify-content: flex-start;
|
||||
gap: var(--space-md);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,23 +24,44 @@
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
display: flex;
|
||||
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 {
|
||||
height: 100%;
|
||||
flex: 0 0 320px;
|
||||
scroll-snap-align: start;
|
||||
}
|
||||
|
||||
.serviceCard {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
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) {
|
||||
.grid {
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
}
|
||||
/* On very large screens, we can center it if few items, or keep scrolling */
|
||||
/* Keeping scrolling for the "horizontal scroll" aesthetic */
|
||||
}
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
--md-sys-color-scrim: #000000;
|
||||
|
||||
/* Typography */
|
||||
--md-sys-typescale-display-font: 'Inter', sans-serif;
|
||||
--md-sys-typescale-body-font: 'Inter', sans-serif;
|
||||
--md-sys-typescale-display-font: 'Sora', sans-serif;
|
||||
--md-sys-typescale-body-font: 'Sora', sans-serif;
|
||||
--md-sys-typescale-code-font: 'JetBrains Mono', monospace;
|
||||
|
||||
/* Spacing */
|
||||
|
||||
Reference in New Issue
Block a user