Skip to content

Commit 9a41a0d

Browse files
authored
Merge pull request #7 from glandjs/develop
fix: fix hero section responsev in mobile
2 parents 6480d12 + 9c6a6b5 commit 9a41a0d

File tree

4 files changed

+64
-58
lines changed

4 files changed

+64
-58
lines changed

public/global.css

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,11 +1165,6 @@ body {
11651165
opacity: 0;
11661166
}
11671167

1168-
.animate-fade-in {
1169-
animation: fadeIn 0.8s ease-out forwards;
1170-
opacity: 0;
1171-
}
1172-
11731168
@keyframes float {
11741169
0%,
11751170
100% {
@@ -1338,6 +1333,20 @@ body {
13381333
}
13391334
}
13401335

1336+
.code-block-glass {
1337+
background: radial-gradient(
1338+
ellipse at 75% 25%,
1339+
rgba(100, 108, 255, 0.15) 0%,
1340+
rgba(100, 108, 255, 0.05) 45%,
1341+
rgba(2, 8, 23, 0.9) 100%
1342+
) !important;
1343+
backdrop-filter: blur(12px);
1344+
-webkit-backdrop-filter: blur(12px);
1345+
border: 1px solid rgba(100, 108, 255, 0.15);
1346+
box-shadow: 0 8px 32px rgba(2, 8, 23, 0.5),
1347+
inset 0 0 0 1px rgba(255, 255, 255, 0.05);
1348+
}
1349+
13411350
.absolute {
13421351
position: absolute;
13431352
}
@@ -1350,10 +1359,6 @@ body {
13501359
position: sticky;
13511360
}
13521361

1353-
.-inset-4 {
1354-
inset: -1rem;
1355-
}
1356-
13571362
.inset-0 {
13581363
inset: 0px;
13591364
}
@@ -1817,10 +1822,6 @@ body {
18171822
white-space: nowrap;
18181823
}
18191824

1820-
.break-words {
1821-
overflow-wrap: break-word;
1822-
}
1823-
18241825
.rounded {
18251826
border-radius: 0.25rem;
18261827
}
@@ -2059,10 +2060,6 @@ body {
20592060
--tw-gradient-to: rgb(var(--primary) / 1) var(--tw-gradient-to-position);
20602061
}
20612062

2062-
.to-primary\/5 {
2063-
--tw-gradient-to: rgb(var(--primary) / 0.05) var(--tw-gradient-to-position);
2064-
}
2065-
20662063
.to-text-secondary {
20672064
--tw-gradient-to: rgb(var(--text-secondary) / 1) var(--tw-gradient-to-position);
20682065
}
@@ -2432,10 +2429,6 @@ body {
24322429
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
24332430
}
24342431

2435-
.filter {
2436-
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
2437-
}
2438-
24392432
.backdrop-blur-lg {
24402433
--tw-backdrop-blur: blur(16px);
24412434
-webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
@@ -2709,11 +2702,22 @@ body {
27092702
gap: 1rem;
27102703
}
27112704

2705+
.sm\:space-y-6 > :not([hidden]) ~ :not([hidden]) {
2706+
--tw-space-y-reverse: 0;
2707+
margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));
2708+
margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
2709+
}
2710+
27122711
.sm\:text-4xl {
27132712
font-size: 2.25rem;
27142713
line-height: 2.5rem;
27152714
}
27162715

2716+
.sm\:text-sm {
2717+
font-size: 0.875rem;
2718+
line-height: 1.25rem;
2719+
}
2720+
27172721
.sm\:text-xl {
27182722
font-size: 1.25rem;
27192723
line-height: 1.75rem;
@@ -2889,10 +2893,6 @@ body {
28892893
}
28902894

28912895
@media (min-width: 1024px) {
2892-
.lg\:flex {
2893-
display: flex;
2894-
}
2895-
28962896
.lg\:grid-cols-2 {
28972897
grid-template-columns: repeat(2, minmax(0, 1fr));
28982898
}

src/components/CodeBlock.astro

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
export interface Props {
33
lang?: string;
44
filename?: string;
5+
class?: string;
6+
div?:string
57
}
68
79
const {
810
lang = "javascript",
911
filename = "",
12+
class: className = ""
1013
} = Astro.props;
1114
1215
const langColors = {
@@ -16,7 +19,7 @@ const langColors = {
1619
};
1720
---
1821

19-
<div class="group relative rounded-lg md:rounded-xl border border-border bg-background-secondary/50 backdrop-blur-lg shadow-lg hover:shadow-xl transition-all overflow-hidden">
22+
<div class={`group relative rounded-lg md:rounded-xl border border-border bg-background-secondary/50 backdrop-blur-lg shadow-lg hover:shadow-xl transition-all overflow-hidden ${className}`}>
2023
<!-- Header -->
2124
<div class="flex items-center justify-between px-3 md:px-4 py-2 md:py-3 bg-background-tertiary/80 border-b border-border">
2225
<!-- Window Controls -->
@@ -57,9 +60,9 @@ const langColors = {
5760
</div>
5861

5962
{/* Code Container */}
60-
<pre class="overflow-x-auto p-3 md:p-4 text-xs md:text-sm leading-relaxed scrollbar-thin scrollbar-track-transparent scrollbar-thumb-border">
61-
<code class="font-mono text-text-primary [&>.token]:animate-highlight break-words">
63+
<pre class="overflow-x-auto p-3 md:p-4 text-xs md:text-sm ">
64+
<code class="font-mono text-text-primary [&>.token]:animate-highlight">
6265
<slot />
6366
</code>
64-
</pre>
67+
</pre>
6568
</div>

src/sections/HeroSection.astro

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ import CodeBlock from "@components/CodeBlock.astro";
1212

1313
<div class="max-w-7xl mx-auto grid lg:grid-cols-2 gap-8 lg:gap-20 relative z-10">
1414
<!-- Text Content Column -->
15-
<div class="flex flex-col justify-center space-y-6 text-center md:text-left">
15+
<div class="flex flex-col justify-center space-y-4 sm:space-y-6 text-center md:text-left">
1616
<!-- Badge -->
17-
<div class="group inline-flex items-center gap-2 bg-background-tertiary/80 backdrop-blur-sm border border-border/60 rounded-full pl-1 pr-4 py-1 w-fit mx-auto md:mx-0 animate-fade-in-up" style="animation-delay: 0.1s;">
17+
<div class="group inline-flex items-center gap-2 bg-background-tertiary/80 text-xs sm:text-sm backdrop-blur-sm border border-border/60 rounded-full pl-1 pr-4 py-1 w-fit mx-auto md:mx-0 animate-fade-in-up" style="animation-delay: 0.1s;">
1818
<span class="bg-primary text-white px-2 py-0.5 rounded-full text-xs font-semibold tracking-wide">ALPHA</span>
1919
<span class="text-sm text-text-secondary group-hover:text-text-primary transition-colors duration-300">Now available for testing</span>
2020
</div>
2121

2222
<!-- Main Heading -->
2323
<div class="space-y-3 md:space-y-4 animate-fade-in-up" style="animation-delay: 0.3s;">
24-
<h1 class="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-bold tracking-tight text-text-primary">
24+
<h1 class="text-2xl xs:text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-bold tracking-tight text-text-primary">
2525
<span class="block text-text-primary">Scalable & Modular</span>
2626
<span class="bg-gradient-to-r from-[#6ea8fe] to-[#a56eff] bg-clip-text text-transparent">
2727
Event-Driven
@@ -60,32 +60,22 @@ import CodeBlock from "@components/CodeBlock.astro";
6060
</div>
6161

6262
<!-- Code Block Column -->
63-
<div class="relative lg:flex items-center animate-fade-in" style="animation-delay: 0.9s;">
64-
<div class="absolute -inset-4 bg-gradient-to-r from-primary/10 to-primary/5 rounded-xl filter blur-xl opacity-70"></div>
63+
<CodeBlock
64+
lang="typescript"
65+
filename="app.ts"
66+
class="code-block-glass"
67+
>
68+
{`
69+
import { GlandFactory } from '@gland/core';
70+
import { UserModule } from './user.module';
6571
66-
<div class="relative w-full rounded-xl overflow-hidden border border-border shadow-2xl">
72+
// Create app instance
73+
const app = GlandFactory.create(UserModule);
6774
68-
69-
<CodeBlock
70-
lang="typescript"
71-
filename="app"
72-
>
73-
{
74-
`
75-
import { GlandFactory } from '@gland/core';
76-
import { UserModule } from './user.module';
77-
78-
// Create app instance
79-
const app = GlandFactory.create(UserModule);
80-
81-
// Start HTTP server
82-
app.listen(3000, {
83-
message: "Server running on http://localhost:3000"
84-
});
85-
`
86-
}
87-
</CodeBlock>
88-
</div>
89-
</div>
90-
</div>
75+
// Start HTTP server
76+
app.listen(3000, {
77+
message: "Server running on http://localhost:3000"
78+
});
79+
`}
80+
</CodeBlock>
9181
</section>

src/styles/global.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,4 +421,17 @@
421421
color: rgb(var(--primary));
422422
}
423423
}
424+
.code-block-glass {
425+
background: radial-gradient(
426+
ellipse at 75% 25%,
427+
rgba(100, 108, 255, 0.15) 0%,
428+
rgba(100, 108, 255, 0.05) 45%,
429+
rgba(2, 8, 23, 0.9) 100%
430+
) !important;
431+
backdrop-filter: blur(12px);
432+
-webkit-backdrop-filter: blur(12px);
433+
border: 1px solid rgba(100, 108, 255, 0.15);
434+
box-shadow: 0 8px 32px rgba(2, 8, 23, 0.5),
435+
inset 0 0 0 1px rgba(255, 255, 255, 0.05);
436+
}
424437
}

0 commit comments

Comments
 (0)