Skip to content

Commit 9a5e8a4

Browse files
authored
Add files via upload
Add initial project files
1 parent e6b86d6 commit 9a5e8a4

File tree

4 files changed

+354
-0
lines changed

4 files changed

+354
-0
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

assets/logo.svg

Lines changed: 18 additions & 0 deletions
Loading

index.html

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1" />
6+
<meta name="description" content="Responsive multi-section page using modern CSS Grid and Flexbox." />
7+
<title>Aurora Layout — CSS Flex & Grid Showcase</title>
8+
<link rel="stylesheet" href="style.css" />
9+
<link rel="icon" href="assets/logo.svg" type="image/svg+xml">
10+
</head>
11+
<body>
12+
<!--
13+
[EN] Submission version — Comments in English
14+
Purpose: Demonstrate a clean, responsive layout using BOTH CSS Grid (2D) and Flexbox (1D).
15+
Where Grid is used:
16+
- .content-grid (main/aside two-column layout on wider screens)
17+
- footer areas
18+
Where Flex is used:
19+
- Navigation bar alignment and wrapping
20+
- Feature cards layout
21+
- Call-to-action section
22+
Responsive technique highlights:
23+
- Fluid type via clamp()
24+
- Relative units (rem, %), and logical properties
25+
- Media queries for mobile / tablet / desktop breakpoints
26+
- Reduced motion preferences respected
27+
-->
28+
29+
<a class="skip-link" href="#main">Skip to main content</a>
30+
31+
<header class="site-header" role="banner">
32+
<div class="container header-inner">
33+
<a class="brand" href="#" aria-label="Aurora Layout Home">
34+
<img src="assets/logo.svg" alt="" width="160" height="40" />
35+
</a>
36+
<nav class="site-nav" aria-label="Primary">
37+
<ul class="nav-list">
38+
<li><a href="#about">About</a></li>
39+
<li><a href="#features">Features</a></li>
40+
<li><a href="#demo">Demo</a></li>
41+
<li><a href="#contact">Contact</a></li>
42+
</ul>
43+
</nav>
44+
</div>
45+
</header>
46+
47+
<section class="hero" id="about" aria-labelledby="hero-title">
48+
<div class="container hero-inner">
49+
<h1 id="hero-title">Modern CSS Layouts, Done Right</h1>
50+
<p class="lead">
51+
A responsive showcase built with semantic HTML5, CSS Grid, and Flexbox — adapting gracefully from mobile to desktop.
52+
</p>
53+
<div class="hero-actions">
54+
<a class="btn primary" href="#demo">See the Layout</a>
55+
<a class="btn" href="#features">Explore Features</a>
56+
</div>
57+
</div>
58+
</section>
59+
60+
<section class="features" id="features" aria-labelledby="features-title">
61+
<div class="container">
62+
<h2 id="features-title">Why this layout works</h2>
63+
<ul class="feature-cards">
64+
<li class="card">
65+
<h3>CSS Grid</h3>
66+
<p>Robust two‑dimensional control over main layout areas (content + sidebar + footer clusters).</p>
67+
</li>
68+
<li class="card">
69+
<h3>Flexbox</h3>
70+
<p>Perfect for single‑axis alignment — navigations, action rows, and responsive card groups.</p>
71+
</li>
72+
<li class="card">
73+
<h3>Responsive by design</h3>
74+
<p>Fluid type, relative spacing, and media queries for mobile, tablet, and desktop breakpoints.</p>
75+
</li>
76+
<li class="card">
77+
<h3>Accessible & clean</h3>
78+
<p>Semantic landmarks, focus states, color contrast, and reduced motion awareness.</p>
79+
</li>
80+
</ul>
81+
</div>
82+
</section>
83+
84+
<main id="main" class="container content-grid" aria-label="Main content">
85+
<article id="demo" class="content">
86+
<h2>Demo: Article Area</h2>
87+
<p>
88+
This area demonstrates the primary content column. On wider screens, it sits beside a sidebar using CSS Grid.
89+
On narrow screens, the grid collapses into a single column for a smooth reading experience.
90+
</p>
91+
<p>
92+
Resize your browser to watch the layout adapt: cards and navigation wrap using Flexbox, while this main section
93+
and the sidebar reflow via Grid template changes.
94+
</p>
95+
<section>
96+
<h3>Sample Subsection</h3>
97+
<p>
98+
Use this space to show a short article, a case study, or any content that benefits from a primary reading column.
99+
</p>
100+
<ul>
101+
<li>Grid governs macro page structure.</li>
102+
<li>Flex handles micro alignment and card wrapping.</li>
103+
<li>Media queries tweak gaps, columns, and font sizes.</li>
104+
</ul>
105+
</section>
106+
</article>
107+
108+
<aside class="sidebar" aria-label="Sidebar">
109+
<h2>Sidebar</h2>
110+
<nav aria-label="In-page">
111+
<ul class="sidebar-links">
112+
<li><a href="#about">About</a></li>
113+
<li><a href="#features">Features</a></li>
114+
<li><a href="#demo">Demo</a></li>
115+
<li><a href="#contact">Contact</a></li>
116+
</ul>
117+
</nav>
118+
<div class="tip">
119+
<strong>Tip:</strong> Keep sidebars concise on mobile; expand on larger screens.
120+
</div>
121+
</aside>
122+
</main>
123+
124+
<section class="cta" aria-labelledby="cta-title">
125+
<div class="container cta-inner">
126+
<h2 id="cta-title">Ready to build responsive layouts?</h2>
127+
<p>Start with a solid Grid for structure, then polish details with Flexbox.</p>
128+
<a class="btn primary" href="#contact">Get in touch</a>
129+
</div>
130+
</section>
131+
132+
<footer class="site-footer" id="contact" role="contentinfo">
133+
<div class="container footer-grid">
134+
<section aria-label="Contact">
135+
<h3>Contact</h3>
136+
<ul>
137+
<li><a href="tel:+258847423047">(+258) 84 742 3047</a></li>
138+
<li><a href="mailto:[email protected]">[email protected]</a></li>
139+
</ul>
140+
</section>
141+
<section aria-label="Attribution">
142+
<h3>Project</h3>
143+
<ul>
144+
<li><a href="#about">Aurora Layout</a></li>
145+
<li><a href="#features">CSS Grid & Flexbox</a></li>
146+
</ul>
147+
</section>
148+
<section aria-label="Links">
149+
<h3>Links</h3>
150+
<ul>
151+
<li><a href="#demo">Demo</a></li>
152+
<li><a href="#contact">Contact</a></li>
153+
</ul>
154+
</section>
155+
</div>
156+
<p class="legal">© <span id="year"></span> Augusto Mate. All rights reserved.</p>
157+
</footer>
158+
159+
<script>
160+
// Keep JS minimal and non-essential; the assignment focuses on CSS.
161+
// Sets the current year in the footer without relying on any library.
162+
document.getElementById('year').textContent = new Date().getFullYear();
163+
</script>
164+
</body>
165+
</html>

style.css

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
/* ======================================================================
2+
Aurora Layout — CSS Flex & Grid Showcase
3+
Submission stylesheet (English comments)
4+
====================================================================== */
5+
6+
/* Root design tokens */
7+
:root {
8+
--brand-1: #7C3AED;
9+
--brand-2: #06B6D4;
10+
--bg: #0b0b10;
11+
--surface: #12121a;
12+
--text: #e6e6f0;
13+
--muted: #b3b3c2;
14+
--accent: #f1f1ff;
15+
--ring: #ffffff;
16+
17+
--radius: 16px;
18+
--container: min(110ch, 92vw);
19+
20+
/* Fluid scale for typography and spacing */
21+
--step--1: clamp(0.78rem, 0.70rem + 0.3vw, 0.92rem);
22+
--step-0: clamp(0.95rem, 0.85rem + 0.5vw, 1.05rem);
23+
--step-1: clamp(1.20rem, 1.00rem + 0.9vw, 1.35rem);
24+
--step-2: clamp(1.55rem, 1.25rem + 1.2vw, 1.80rem);
25+
--step-3: clamp(2.00rem, 1.50rem + 1.8vw, 2.40rem);
26+
}
27+
28+
/* Global resets & base */
29+
* { box-sizing: border-box; }
30+
html, body { height: 100%; }
31+
body {
32+
margin: 0;
33+
font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica Neue, Arial, sans-serif;
34+
background: radial-gradient(1200px 800px at 10% 0%, #12121a, #0b0b10);
35+
color: var(--text);
36+
font-size: var(--step-0);
37+
line-height: 1.6;
38+
}
39+
img { max-width: 100%; display: block; }
40+
a { color: #c9d8ff; text-decoration: none; }
41+
a:hover, a:focus { text-decoration: underline; }
42+
43+
.skip-link {
44+
position: absolute; inset-inline-start: 0; inset-block-start: 0;
45+
background: var(--brand-2); color: #001015; padding: 0.5rem 0.75rem;
46+
transform: translateY(-120%); transition: transform 0.2s ease;
47+
z-index: 1000; border-bottom-right-radius: 8px; font-weight: 600;
48+
}
49+
.skip-link:focus { transform: translateY(0); }
50+
51+
.container { width: var(--container); margin-inline: auto; padding-inline: 1rem; }
52+
53+
/* Header — Flexbox for alignment */
54+
.site-header {
55+
position: sticky; top: 0; backdrop-filter: blur(6px);
56+
background: color-mix(in srgb, var(--surface) 70%, transparent);
57+
border-bottom: 1px solid #232330;
58+
z-index: 500;
59+
}
60+
.header-inner {
61+
display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 0;
62+
flex-wrap: wrap;
63+
}
64+
.nav-list {
65+
display: flex; gap: 1rem; list-style: none; margin: 0; padding: 0;
66+
flex-wrap: wrap;
67+
}
68+
.nav-list a { display: inline-block; padding: 0.5rem 0.75rem; border-radius: 999px; }
69+
.nav-list a:hover { background: #1a1a26; }
70+
71+
/* Hero */
72+
.hero { padding-block: 4rem 3rem; }
73+
.hero-inner { text-align: center; }
74+
.hero h1 { font-size: var(--step-3); line-height: 1.1; margin: 0 0 0.75rem; }
75+
.lead { color: var(--muted); font-size: var(--step-1); max-width: 60ch; margin: 0 auto; }
76+
.hero-actions { display: flex; gap: 0.75rem; justify-content: center; margin-top: 1.25rem; flex-wrap: wrap; }
77+
78+
.btn {
79+
display: inline-block; padding: 0.65rem 1rem; border-radius: 999px;
80+
background: #1a1a26; color: var(--accent); border: 1px solid #24243a;
81+
font-weight: 600;
82+
}
83+
.btn.primary {
84+
background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
85+
border: none; color: #001015;
86+
}
87+
.btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
88+
89+
/* Features — Flex cards that wrap */
90+
.features { padding-block: 2.5rem; }
91+
.feature-cards {
92+
display: flex; gap: 1rem; list-style: none; margin: 0; padding: 0;
93+
flex-wrap: wrap; justify-content: center;
94+
}
95+
.card {
96+
background: var(--surface); border: 1px solid #232330; border-radius: var(--radius);
97+
padding: 1rem; flex: 1 1 240px; max-width: 360px;
98+
}
99+
.card h3 { margin-top: 0.25rem; margin-bottom: 0.25rem; font-size: var(--step-1); }
100+
.card p { margin: 0; color: var(--muted); }
101+
102+
/* Main content — CSS Grid controls macro layout */
103+
.content-grid {
104+
display: grid; gap: 1.25rem; align-items: start;
105+
grid-template-columns: 1fr; /* mobile first */
106+
padding-block: 2rem;
107+
}
108+
.content-grid .content, .content-grid .sidebar {
109+
background: var(--surface); border: 1px solid #232330; border-radius: var(--radius); padding: 1rem;
110+
}
111+
.sidebar-links { list-style: none; margin: 0; padding: 0; }
112+
.sidebar-links li + li { margin-top: 0.35rem; }
113+
.tip { margin-top: 1rem; color: var(--muted); font-size: var(--step--1); }
114+
115+
/* CTA — Flex for alignment */
116+
.cta { padding-block: 2.5rem; }
117+
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
118+
.cta-inner h2 { margin: 0; font-size: var(--step-2); }
119+
120+
/* Footer — Grid clusters */
121+
.site-footer { border-top: 1px solid #232330; margin-top: 2rem; padding-top: 1rem; }
122+
.footer-grid {
123+
display: grid; gap: 1rem;
124+
grid-template-columns: 1fr;
125+
padding-block: 1rem 0.5rem;
126+
}
127+
.site-footer h3 { margin: 0 0 0.25rem; font-size: 1rem; }
128+
.site-footer ul { list-style: none; margin: 0; padding: 0; }
129+
.site-footer li + li { margin-top: 0.25rem; }
130+
.legal { text-align: center; color: var(--muted); font-size: var(--step--1); margin: 0.5rem 0 1.25rem; }
131+
132+
/* Breakpoints */
133+
@media (min-width: 48rem) {
134+
.content-grid {
135+
grid-template-columns: 2fr 1fr; /* article + sidebar */
136+
}
137+
.footer-grid {
138+
grid-template-columns: repeat(3, 1fr);
139+
}
140+
}
141+
@media (min-width: 64rem) {
142+
.hero { padding-block: 5rem 3.25rem; }
143+
.content-grid { gap: 1.5rem; }
144+
.feature-cards { gap: 1.25rem; }
145+
}
146+
147+
/* Reduced motion */
148+
@media (prefers-reduced-motion: reduce) {
149+
* { animation: none !important; transition: none !important; }
150+
}

0 commit comments

Comments
 (0)