-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
185 lines (166 loc) · 5 KB
/
index.html
File metadata and controls
185 lines (166 loc) · 5 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
---
layout: null
title: Research Explorations
---
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ page.title }}</title>
<style>
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
color: #1a1a1a;
background: #fff;
-webkit-font-smoothing: antialiased;
}
.page {
max-width: 640px;
margin: 0 auto;
padding: 80px 24px 120px;
}
header {
margin-bottom: 56px;
}
header h1 {
font-size: 1.1rem;
font-weight: 600;
margin: 0 0 8px;
letter-spacing: -0.01em;
}
header p {
margin: 0;
color: #737373;
font-size: 0.9rem;
line-height: 1.5;
}
.divider {
height: 1px;
background: #e5e5e5;
margin-bottom: 32px;
}
.list {
list-style: none;
margin: 0;
padding: 0;
}
.list li {
border-bottom: 1px solid #f0f0f0;
}
.list li:first-child {
border-top: 1px solid #f0f0f0;
}
.list a {
display: flex;
justify-content: space-between;
align-items: baseline;
gap: 16px;
padding: 14px 0;
text-decoration: none;
color: inherit;
transition: opacity 120ms ease;
}
.list a:hover {
opacity: 0.55;
}
.entry-title {
font-size: 0.95rem;
font-weight: 500;
text-transform: capitalize;
}
.entry-date {
font-size: 0.82rem;
color: #999;
font-variant-numeric: tabular-nums;
white-space: nowrap;
flex-shrink: 0;
}
.empty {
padding: 24px 0;
color: #999;
font-size: 0.9rem;
}
.empty code {
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
font-size: 0.88em;
background: #f5f5f5;
padding: 0.15em 0.4em;
border-radius: 3px;
}
@media (max-width: 600px) {
.page {
padding: 48px 20px 80px;
}
}
</style>
</head>
<body>
{% assign html_files = site.static_files | where: "extname", ".html" | sort: "path" | reverse %}
<main class="page">
<header>
<h1>Explorations</h1>
<p>Research and analysis, collected here.</p>
</header>
<div class="divider"></div>
{% assign exploration_count = 0 %}
{% for file in html_files %}
{% if file.path contains '/explorations/' %}
{% assign exploration_count = exploration_count | plus: 1 %}
{% endif %}
{% endfor %}
{% if exploration_count > 0 %}
<ul class="list">
{% for file in html_files %}
{% if file.path contains '/explorations/' %}
{% assign basename = file.basename %}
{% assign display_name = basename | replace: '-', ' ' | replace: '_', ' ' %}
{% assign date_display = '' %}
{% assign basename_size = basename | size %}
{% assign dash_one = basename | slice: 4, 1 %}
{% assign dash_two = basename | slice: 7, 1 %}
{% if basename_size > 10 and dash_one == '-' and dash_two == '-' %}
{% assign date_prefix = basename | slice: 0, 10 %}
{% assign display_name = basename | remove_first: date_prefix | remove_first: '-' | replace: '-', ' ' | replace: '_', ' ' %}
{% assign year = date_prefix | slice: 0, 4 %}
{% assign month = date_prefix | slice: 5, 2 %}
{% assign day = date_prefix | slice: 8, 2 %}
{% case month %}
{% when '01' %}{% assign month_name = 'Jan' %}
{% when '02' %}{% assign month_name = 'Feb' %}
{% when '03' %}{% assign month_name = 'Mar' %}
{% when '04' %}{% assign month_name = 'Apr' %}
{% when '05' %}{% assign month_name = 'May' %}
{% when '06' %}{% assign month_name = 'Jun' %}
{% when '07' %}{% assign month_name = 'Jul' %}
{% when '08' %}{% assign month_name = 'Aug' %}
{% when '09' %}{% assign month_name = 'Sep' %}
{% when '10' %}{% assign month_name = 'Oct' %}
{% when '11' %}{% assign month_name = 'Nov' %}
{% when '12' %}{% assign month_name = 'Dec' %}
{% endcase %}
{% assign date_display = month_name | append: ' ' | append: day | append: ', ' | append: year %}
{% endif %}
<li>
<a href="{{ file.path | relative_url }}">
<span class="entry-title">{{ display_name }}</span>
{% if date_display != '' %}
<span class="entry-date">{{ date_display }}</span>
{% endif %}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% else %}
<div class="empty">
No explorations yet. Add an HTML file to <code>explorations/</code> to get started.
</div>
{% endif %}
</main>
</body>
</html>