-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
182 lines (152 loc) · 3.7 KB
/
index.html
File metadata and controls
182 lines (152 loc) · 3.7 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
---
layout: frontpage
title: argmin gravitas
visible: false
---
{% assign arb = "https://arbresearch.com/" %}
<style>
body {
font-family: 'Berk', sans-serif;
}
.post-list{
display: flex;
flex-direction: column;
gap: 2em;
margin-bottom: 6em;
margin-top: 2em;
}
.preview{
background: linear-gradient(135deg, #006800 0%, #93cc93 100%);
display: flex;
gap: 6%;
justify-content: flex-start;
align-items: center;
color: white;
padding-right: 15px;
padding-top: 10px;
padding-bottom: 10px;
}
.preview img{
min-width: 150px;
height: 150px;
width: 150px;
object-fit: cover;
}
.preview a:visited {
color: white !important;
}
.preview-info{
font-size: 0.9em;
line-height: 1.5em;
}
.preview h3{
margin-bottom: 0.4em;
font-size: 1.8em;
line-height: 1.2em;
font-family: var(--serif);
color: white !important;
font-weight: 540;
}
.openers h2 {
font-weight: 1000;
}
.preview a{
text-decoration: none;
}
h4 {
font-family: var(--serif);
font-size: 1.4em
}
@media (max-width: 600px) {
.preview img{
width: 100px;
height: 100px;
min-width: 120px;
}
.preview h3{
font-size: 1.5em;
}
h4{
font-size: 1.2em;
}
}
h2 {
padding-bottom: 10px;
}
</style>
<h2><a href="/archive">Posts</a></h2>
<div id="openers">
<h2><a href="/researches#conference">Papers</a></h2>
<h2><a href="/researches#books">Paperbacks</a></h2>
<h2><a href="/best">Pinnacles</a></h2>
<h2><a href="/poems">Poems</a></h2>
<h2><a href="https://www.goodreads.com/review/list/68316850-gavin?sort=review&view=reviews">Punditry</a></h2>
<h2><a href="/tags#fiction">Prose</a></h2>
<h2><a href="/forecasting">Predictions</a></h2>
<h2><a href="/tags">Parameters</a></h2>
</div>
<h2><a href="/rec">Preferences</a></h2>
<h2><a href="{{arb}}">Professional</a></h2>
<br><br><br><br>
<h2>Best posts</h2>
<section class="post-list">
{% assign posts = site.posts | where_exp: "item", "item.quality > 6" | sample: 6 %}
{% for post in posts %}
{% if post.arb != 1 %}
<article class="preview">
<a href="{{ post.url | prepend: site.url }}">
<img src="{{ post.img }}" />
</a>
<a href="{{ post.url | prepend: site.url }}">
<div class="preview-info">
<h3> {{ post.title }} </h3>
<div>{{ post.summary }}</div>
</div>
</a>
</article>
{% endif %}
{% endfor %}
</section>
<h2>Recent posts</h2>
<section class="post-list">
{% for post in site.posts limit:7 %}
{% if post.visible == 1 %}
<article class="preview">
<a href="{{ post.url | prepend: site.url }}">
<img src="{{ post.img }}" />
</a>
<a href="{{ post.url | prepend: site.url }}">
<div class="preview-info">
<h3> {{ post.title }} </h3>
<div> {{ post.summary }} </div>
</div>
</a>
</article>
{% endif %}
{% endfor %}
</section>
<br>
<h3>
<div class="directory fancy">
<a href="{{ "/archive" | prepend: site.url }}">[all posts];</a>
<a href="{{ "/tags" | prepend: site.url }}">[by topic];</a>
<a href="{{ "/importance" | prepend: site.url }}">[by import]</a>
</div>
</h3>
</style>
{% include mc.html %}
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
const list = document.getElementById('openers');
const items = Array.from(list.children);
const sampleSize = 2;
// Fisher-Yates shuffle
for (let i = items.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[items[i], items[j]] = [items[j], items[i]];
}
// Clear and repopulate
list.innerHTML = '';
items.slice(0, sampleSize).forEach(item => list.appendChild(item));
});
</script>