index redirect
This commit is contained in:
parent
749cdc7160
commit
6f650f390a
20
404.html
20
404.html
@ -3,23 +3,9 @@ permalink: /404.html
|
||||
layout: default
|
||||
---
|
||||
|
||||
<style type="text/css" media="screen">
|
||||
.container {
|
||||
margin: 10px auto;
|
||||
max-width: 600px;
|
||||
text-align: center;
|
||||
}
|
||||
h1 {
|
||||
margin: 30px 0;
|
||||
font-size: 4em;
|
||||
line-height: 1;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
</style>
|
||||
<div class="container tc">
|
||||
<h1 class="f-6 work-sans-light normal">404</h1>
|
||||
|
||||
<div class="container">
|
||||
<h1>404</h1>
|
||||
|
||||
<p><strong>Page not found :(</strong></p>
|
||||
<p class="f1 normal">Page not found :(</p>
|
||||
<p>The requested page could not be found.</p>
|
||||
</div>
|
||||
|
@ -2,27 +2,8 @@
|
||||
layout: default
|
||||
---
|
||||
|
||||
<ul>
|
||||
{% for note in site.notes %}
|
||||
<li>
|
||||
<a href="{{ note.url }}">{{ note.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<h1 class="f-6 work-sans-light normal">Loading a note...</h1>
|
||||
|
||||
<section>
|
||||
{% for note in site.notes %}
|
||||
<div class="post_excerpt">
|
||||
<article>
|
||||
<h2 itemprop="headline">
|
||||
<a href="{{ post.url | relative_url }}" rel="permalink">{{ note.title }}</a>
|
||||
</h2>
|
||||
<p class="excerpt" itemprop="description"><em>{% if note.excerpt %}
|
||||
{{ note.excerpt | markdownify | strip_html }}
|
||||
{% else %}
|
||||
{{ note.content | markdownify | strip_html | truncate: 160 }}
|
||||
{% endif %}</em></p>
|
||||
</article>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</section>
|
||||
<script>
|
||||
window.graphDataIndex = {% include notes_graph.json %}
|
||||
</script>
|
@ -112,6 +112,14 @@ const setupListeners = (linkElement) => {
|
||||
|
||||
document.querySelectorAll('#notes-entry-container a').forEach(setupListeners)
|
||||
|
||||
// Random note index
|
||||
|
||||
if (typeof window.graphDataIndex !== 'undefined') {
|
||||
const indexNodes = window.graphDataIndex.nodes
|
||||
const randomNode = indexNodes[Math.floor(Math.random() * indexNodes.length)]
|
||||
window.location = randomNode.path
|
||||
}
|
||||
|
||||
// Notes graph
|
||||
|
||||
const d3 = window.d3
|
||||
|
Loading…
Reference in New Issue
Block a user