Skip to content

Commit 7ed5f16

Browse files
authored
Implement news section on the homepage
Added a news section to the homepage with a grid layout for displaying recent posts.
1 parent 27c311c commit 7ed5f16

1 file changed

Lines changed: 76 additions & 14 deletions

File tree

‎index.html‎

Lines changed: 76 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@
33
title: Home
44
---
55
<style>
6-
/* PEŁNA SZEROKOŚĆ KONTENERA BEZ POWIĘSZANIA ELEMENTÓW */
76
.dashboard {
87
max-width: 100% !important;
98
padding-left: 60px !important;
109
padding-right: 60px !important;
1110
}
1211

13-
/* HERO SECTION */
1412
.hero {
1513
margin-top: 20px;
1614
margin-bottom: 60px;
@@ -81,7 +79,6 @@
8179
transform: translateY(-2px);
8280
}
8381

84-
/* STATYSTYKI YOUTUBE (KLIKALNE KAFLE) */
8582
.stats-grid {
8683
display: grid;
8784
grid-template-columns: repeat(2, 1fr);
@@ -131,13 +128,48 @@
131128

132129
.stat-name { font-weight: 800; font-size: 1.05rem; color: #fff; }
133130
.stat-platform { color: var(--text-muted); font-size: 0.8rem; font-family: 'JetBrains Mono', monospace; }
134-
135131
.stat-number { font-size: 2.4rem; font-weight: 900; color: var(--text-main); font-family: 'JetBrains Mono', monospace; line-height: 1; }
136132
.stat-label { font-size: 0.8rem; color: var(--accent-contrast); font-family: 'JetBrains Mono', monospace; text-transform: uppercase; font-weight: 700; }
137133
.stat-external { color: var(--text-muted); font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; transition: 0.2s; }
138134
.stat-card:hover .stat-external { color: var(--accent-blue); transform: translateX(3px); }
139135

140-
/* SEKCJA SPONSORÓW I PARTNERÓW */
136+
/* SEKCJA NEWSÓW NA STRONIE GŁÓWNEJ */
137+
.newsy-home-grid {
138+
display: grid;
139+
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
140+
gap: 25px;
141+
margin-bottom: 60px;
142+
}
143+
144+
.home-news-card {
145+
background: var(--card-bg);
146+
border: 1px solid var(--border);
147+
border-radius: 12px;
148+
overflow: hidden;
149+
text-decoration: none;
150+
display: flex;
151+
flex-direction: column;
152+
transition: 0.3s;
153+
}
154+
.home-news-card:hover {
155+
border-color: var(--accent-blue);
156+
transform: translateY(-3px);
157+
box-shadow: 0 10px 30px rgba(0,210,255,0.15);
158+
}
159+
.home-news-thumb {
160+
width: 100%;
161+
height: 180px;
162+
object-fit: cover;
163+
border-bottom: 1px solid var(--border);
164+
}
165+
.home-news-content {
166+
padding: 20px;
167+
display: flex;
168+
flex-direction: column;
169+
justify-content: space-between;
170+
flex-grow: 1;
171+
}
172+
141173
.sponsors-grid {
142174
display: grid;
143175
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
@@ -180,7 +212,6 @@
180212
.sponsor-link { color: var(--accent-blue); font-weight: 700; text-decoration: none; transition: 0.2s; }
181213
.sponsor-link:hover { text-decoration: underline; }
182214

183-
/* MARKETPLACE & SUPPORT */
184215
.extra-grid {
185216
display: grid;
186217
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
@@ -227,7 +258,6 @@
227258
filter: brightness(1.1);
228259
}
229260

230-
/* DYNAMICZNA LISTA WPISÓW (BLOG FEED) */
231261
.archive-list {
232262
display: flex;
233263
flex-direction: column;
@@ -296,10 +326,9 @@ <h1 class="hero-title">DEVLAB<br>STUDY<span>_</span></h1>
296326
</div>
297327
</section>
298328

299-
<!-- STATYSTYKI YOUTUBE (KLIKALNE KAFLE) -->
329+
<!-- STATYSTYKI YOUTUBE -->
300330
<span class="section-tag">AKTYWNE WĘZŁY SPOŁECZNOŚCI</span>
301331
<div class="stats-grid">
302-
<!-- DevLabStudy YouTube -->
303332
<a href="https://www.youtube.com/channel/UCisFPSU_Y8hznpqrcewcJAg" target="_blank" class="stat-card">
304333
<div>
305334
<div class="stat-header">
@@ -320,7 +349,6 @@ <h1 class="hero-title">DEVLAB<br>STUDY<span>_</span></h1>
320349
</div>
321350
</a>
322351

323-
<!-- PC Hub YouTube -->
324352
<a href="https://www.youtube.com/channel/UCaTfVaE8Pb95CZvblqjNheA" target="_blank" class="stat-card">
325353
<div>
326354
<div class="stat-header">
@@ -342,7 +370,43 @@ <h1 class="hero-title">DEVLAB<br>STUDY<span>_</span></h1>
342370
</a>
343371
</div>
344372

345-
<!-- SEKCJA SPONSORÓW I PARTNERÓW -->
373+
<!-- SEKCJA NAJNOWSZE NEWSY -->
374+
<span class="section-tag">NAJNOWSZE RAPORTY TECHNOLOGICZNE (NEWSY)</span>
375+
<div class="newsy-home-grid">
376+
{% for post in site.newsy limit:3 %}
377+
{% assign home_thumb = post.image %}
378+
{% unless home_thumb %}
379+
{% if post.content contains '<img' %}
380+
{% assign img_tag = post.content | split: '<img' | second %}
381+
{% assign img_src = img_tag | split: 'src="' | second | split: '"' | first %}
382+
{% if img_src %}
383+
{% assign home_thumb = img_src %}
384+
{% endif %}
385+
{% endif %}
386+
{% endunless %}
387+
388+
<a href="{{ post.url }}" class="home-news-card">
389+
{% if home_thumb %}
390+
<img src="{{ home_thumb }}" alt="{{ post.title }}" class="home-news-thumb">
391+
{% endif %}
392+
<div class="home-news-content">
393+
<div>
394+
<div style="font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--accent-contrast); margin-bottom: 8px; font-weight: 800;">
395+
[{{ post.category | default: "BRIEF" | upcase }}] // {{ post.date | date: "%Y.%m.%d" }}
396+
</div>
397+
<h3 style="font-size: 1.15rem; font-weight: 800; color: #fff; margin: 0 0 10px 0; line-height: 1.3;">
398+
{{ post.title }}
399+
</h3>
400+
</div>
401+
<div style="font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--accent-blue); margin-top: 15px; font-weight: 700;">
402+
// CZYTAJ RAPORT &rarr;
403+
</div>
404+
</div>
405+
</a>
406+
{% endfor %}
407+
</div>
408+
409+
<!-- SEKCJA SPONSORÓW -->
346410
<span class="section-tag">PARTNERZY TECHNOLOGICZNI</span>
347411
<div class="sponsors-grid">
348412
<div class="sponsor-card">
@@ -365,7 +429,6 @@ <h1 class="hero-title">DEVLAB<br>STUDY<span>_</span></h1>
365429
<!-- MARKETPLACE & SUPPORT -->
366430
<span class="section-tag">MARKETPLACE & WSPARCIE</span>
367431
<div class="extra-grid">
368-
<!-- Marketplace -->
369432
<div class="extra-card">
370433
<div style="position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: #00bfb2;"></div>
371434
<h3 style="font-size: 0.8rem; color: #00bfb2; margin: 0 0 10px 0; text-transform: uppercase; font-family: 'JetBrains Mono', monospace;">// Giełda i Sprzedaż:</h3>
@@ -379,7 +442,6 @@ <h3 style="font-size: 0.8rem; color: #00bfb2; margin: 0 0 10px 0; text-transform
379442
</div>
380443
</div>
381444

382-
<!-- Support -->
383445
<div class="extra-card" style="border-color: var(--accent-blue);">
384446
<div style="position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--accent-blue);"></div>
385447
<h3 style="font-size: 0.8rem; color: var(--accent-blue); margin: 0 0 10px 0; text-transform: uppercase; font-family: 'JetBrains Mono', monospace;">// Wsparcie Projektu:</h3>
@@ -393,7 +455,7 @@ <h3 style="font-size: 0.8rem; color: var(--accent-blue); margin: 0 0 10px 0; tex
393455
</div>
394456
</div>
395457

396-
<!-- DYNAMICZNY DZIENNIK SYSTEMOWY (NAJNOWSZE WPISY Z BLOGA) -->
458+
<!-- DYNAMICZNY DZIENNIK SYSTEMOWY (BLOG) -->
397459
<span class="section-tag">OSTATNIE WPISY / DZIENNIK SYSTEMOWY</span>
398460
<div class="archive-list">
399461
{% for post in site.posts limit:5 %}

0 commit comments

Comments
 (0)