-
Notifications
You must be signed in to change notification settings - Fork 668
Expand file tree
/
Copy pathnews.html
More file actions
99 lines (87 loc) · 4.6 KB
/
news.html
File metadata and controls
99 lines (87 loc) · 4.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
---
layout: default
---
{% if site.data.locales[page.lang].news %}
{% assign locales = site.data.locales[page.lang].news %}
{% else %}
{% assign locales = site.data.locales['en'].news %}
{% endif %}
<!-- Mobile Navigation Panel (collapsible, full width) -->
{% capture nav_content %}{% include side_navigation.html %}{% endcapture %}
<div class="md:hidden bg-stone-50 dark:bg-stone-800 border-b border-stone-200 dark:border-stone-700">
<!-- Navigation toggle header -->
<button id="nav-toggle" class="flex items-center justify-between w-full px-4 py-3 hover:bg-stone-100 dark:hover:bg-stone-700 transition-colors">
<span class="flex items-center gap-2 text-sm font-bold text-stone-900 dark:text-stone-100">
<span class="icon-menu text-base relative top-0.5" aria-hidden="true"></span>
<span id="nav-section-title"></span>
</span>
<span id="nav-chevron" class="icon-dropdown text-base text-stone-500 dark:text-stone-400 transition-transform"></span>
</button>
<!-- Navigation content panel -->
<div id="nav-mobile-panel" class="hidden border-t border-stone-200 dark:border-stone-700">
<div class="px-4 pb-6">
{{ nav_content }}
</div>
</div>
</div>
<div class="container px-4 md:px-6 lg:px-8 py-6 md:py-8 lg:py-12">
<div class="flex flex-col md:flex-row gap-6 md:gap-8 lg:gap-8">
<!-- Desktop Navigation (hidden on mobile) -->
<div class="hidden md:block md:w-40 lg:w-44 xl:w-56 flex-shrink-0 sticky top-24 self-start max-h-[calc(100vh-6rem)] overflow-y-auto">
{% include side_navigation.html %}
</div>
<!-- Main content wrapper -->
<div class="flex-1 min-w-0 flex flex-col gap-6">
<!-- Main content -->
<article id="content-wrapper" class="prose md:px-4 lg:px-6">
{% include title.html %}
<div id="content">
{% for post in page.posts %}
<div class="not-prose pb-8 mb-8 border-b border-stone-200 dark:border-stone-700 first:pt-8 first:mt-8 first:border-t last:border-b-0 last:mb-0 last:pb-0">
<h3 class="text-3xl font-bold mb-4"{% if post.fallback %} lang="en"{% endif %}>
<a href="{{ post.url }}" class="text-stone-900 dark:text-stone-100 hover:text-ruby-600 dark:hover:text-ruby-400 transition-colors">
{{ post.title }}
</a>
</h3>
<div class="text-stone-900 dark:text-stone-300"{% if post.fallback %} lang="en"{% endif %}>
{{ post.excerpt | markdownify }}
</div>
<p class="mt-1">
<a href="{{ post.url }}" class="text-sm text-semantic-text-link hover:text-semantic-text-link-hovered transition-colors inline-flex items-center">
<span class="icon-double-arrow-right" aria-hidden="true"></span>
{{ locales.continue }}
</a>
</p>
<p class="text-sm text-stone-500 dark:text-stone-400 mt-4">{{ post.date | posted_by:post.author }}</p>
</div>
{% endfor %}
</div>
</article>
</div>
<!-- Desktop Yearly Archives (hidden below lg) -->
<div class="hidden lg:block lg:w-56 xl:w-64 flex-shrink-0 sticky top-24 self-start min-h-[calc(100vh-10rem)] max-h-[calc(100vh-6rem)] overflow-y-auto">
<div class="pb-8">
<h3 class="text-base font-bold text-stone-900 dark:text-stone-100 mb-4 pl-1 flex items-center gap-2">
<span class="icon-calendar" aria-hidden="true"></span>
{{ locales.yearly_archives }}
</h3>
<div class="relative group">
<button class="flex items-center justify-between w-full px-4 py-2 text-sm border border-stone-300 dark:border-stone-600 rounded-lg hover:bg-stone-100 dark:hover:bg-stone-800 transition-colors">
<span class="text-stone-700 dark:text-stone-300">{{ locales.select_year }}</span>
<span class="icon-dropdown text-base" aria-hidden="true"></span>
</button>
<!-- Archive year dropdown -->
<div class="absolute left-0 mt-1 w-full bg-white dark:bg-stone-800 rounded-lg border border-stone-200 dark:border-stone-700 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50">
<div class="max-h-[calc(100vh-18rem)] overflow-y-auto overflow-x-hidden py-2 rounded-lg">
{% for year in page.years %}
<a href="{{ year[0] }}/" class="block px-4 py-2 text-sm text-stone-700 dark:text-stone-300 hover:bg-stone-100 dark:hover:bg-stone-700 transition-colors">
{{ year[1] }}
</a>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</div>
</div>