Initial commit
This commit is contained in:
commit
5c673525d6
43 changed files with 9620 additions and 0 deletions
7
src/_includes/author.liquid
Normal file
7
src/_includes/author.liquid
Normal file
|
@ -0,0 +1,7 @@
|
|||
<div class="mt-16 py-8 border-t-2 flex justify-between items-center">
|
||||
<div class="flex items-center flex-1">
|
||||
<div class="inline-block h-8 w-8 bg-blue-700 rounded-full mr-2 flex justify-center items-center">R</div>
|
||||
<span class="text-lg font-medium">{{ site.name }}</span>
|
||||
</div>
|
||||
<p class="text-sm flex-1">Talks about the web and almost whatever. She wants you to know this was built with 11ty and tailwind. And works even with Javascript disabled.</p>
|
||||
</div>
|
43
src/_includes/base.liquid
Normal file
43
src/_includes/base.liquid
Normal file
|
@ -0,0 +1,43 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name='viewport' content='width=device-width'>
|
||||
|
||||
<title>{{ site.title }}</title>
|
||||
<meta name='description' content={{ site.description }}>
|
||||
<meta name="theme-color" content="#ffffff"/>
|
||||
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/assets/img/favicon/favicon-32x32.png">
|
||||
<link rel="apple-touch-icon" href="/assets/img/favicon/apple-touch-icon.png">
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
|
||||
<link href="https://unpkg.com/prismjs@1.20.0/themes/prism-okaidia.css" rel="stylesheet">
|
||||
<link href="/assets/styles/tailwind.css" rel="stylesheet" />
|
||||
<link href="/assets/styles/index.css" rel="stylesheet" />
|
||||
<script>
|
||||
const isDarkMode = () => localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches);
|
||||
if (isDarkMode()) {
|
||||
document.documentElement.classList.add('dark')
|
||||
} else {
|
||||
document.documentElement.classList.remove('dark')
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="dark:text-white dark:bg-black">
|
||||
{{ content }}
|
||||
|
||||
<script>
|
||||
document.getElementById("toggleDarkMode").addEventListener("click", function() {
|
||||
if (isDarkMode()) {
|
||||
localStorage.theme = 'light'
|
||||
document.documentElement.classList.remove('dark')
|
||||
} else {
|
||||
localStorage.theme = 'dark'
|
||||
document.documentElement.classList.add('dark')
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
11
src/_includes/default.liquid
Normal file
11
src/_includes/default.liquid
Normal file
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
layout: main
|
||||
---
|
||||
|
||||
<p class="text-5xl md:text-6xl font-black py-10 md:py-20 leading-tight">
|
||||
{{ title }}
|
||||
</p>
|
||||
|
||||
{% include "nav.liquid" %}
|
||||
|
||||
{{ content }}
|
18
src/_includes/footer.liquid
Normal file
18
src/_includes/footer.liquid
Normal file
|
@ -0,0 +1,18 @@
|
|||
<footer class="mt-8 bg-gray-200 dark:bg-gray-900 py-8 flex-shrink-0">
|
||||
<div class="max-w-screen-sm md:max-w-screen-md mx-auto px-8">
|
||||
<p class="text-sm py-2 text-right">
|
||||
{% if site.github != "" %}
|
||||
<a href={{ site.github }}>Github</a>
|
||||
{% endif %}
|
||||
|
||||
{% if site.linkedin != "" %}
|
||||
· <a href={{ site.linkedin }}>LinkedIn</a>
|
||||
{% endif %}
|
||||
|
||||
{% if site.twitter != "" %}
|
||||
· <a href={{ site.twitter }}>Twitter</a>
|
||||
{% endif %}
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
14
src/_includes/main.liquid
Normal file
14
src/_includes/main.liquid
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
layout: base
|
||||
---
|
||||
|
||||
<div class="min-h-screen flex flex-col">
|
||||
|
||||
<main class="flex-1 w-10/12 max-w-screen-sm md:max-w-screen-md mx-auto">
|
||||
|
||||
{{ content }}
|
||||
|
||||
</main>
|
||||
|
||||
{% include "footer.liquid" %}
|
||||
</div>
|
8
src/_includes/nav.liquid
Normal file
8
src/_includes/nav.liquid
Normal file
|
@ -0,0 +1,8 @@
|
|||
<nav>
|
||||
<ul class="flex py-2 border-b-2 mb-6">
|
||||
<li class="mr-6"><a href="/">Home</a></li>
|
||||
<li class="mr-6"><a href="/tags">Tags</a></li>
|
||||
<li class="mr-6"><a href="/about">About</a></li>
|
||||
<li class="mr-6"><span class="cursor-pointer" id="toggleDarkMode">Dark mode</spam></li>
|
||||
</ul>
|
||||
</nav>
|
72
src/_includes/paginator.liquid
Normal file
72
src/_includes/paginator.liquid
Normal file
|
@ -0,0 +1,72 @@
|
|||
<nav class="flex justify-center mt-8">
|
||||
<div class="inline-flex">
|
||||
{% if page.url != pagination.href.first %}
|
||||
<a href="{{ pagination.href.first }}">
|
||||
<button class="paginator-text">
|
||||
First
|
||||
</button>
|
||||
</a>
|
||||
{% else %}
|
||||
<button class="paginator-text cursor-not-allowed">
|
||||
First
|
||||
</button>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if pagination.href.previous %}
|
||||
<a href="{{ pagination.href.previous }}">
|
||||
<button class="py-2 px-4">
|
||||
<img src="/assets/img/chevron-left.svg" alt="prev">
|
||||
</button>
|
||||
</a>
|
||||
{% else %}
|
||||
<button class="py-2 px-4 cursor-not-allowed">
|
||||
<img src="/assets/img/chevron-left.svg" alt="prev">
|
||||
</button>
|
||||
{% endif %}
|
||||
|
||||
{% for pageEntry in pagination.pages %}
|
||||
{% if page.url == pagination.hrefs[forloop.index0] %}
|
||||
<a href="{{ pagination.hrefs[forloop.index0] }}" aria-current="page">
|
||||
<button class="border bg-gray-300 hover:bg-gray-400 text-gray-800 font-bold py-2 px-4">
|
||||
{{ forloop.index }}
|
||||
</button>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{{ pagination.hrefs[forloop.index0] }}">
|
||||
<button class="border border-gray-300 bg-white hover:bg-gray-300 text-gray-800 font-bold py-2 px-4">
|
||||
{{ forloop.index }}
|
||||
</button>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% if pagination.href.next %}
|
||||
<a href="{{ pagination.href.next }}">
|
||||
<button class="py-2 px-4">
|
||||
<img src="/assets/img/chevron-right.svg" alt="next">
|
||||
</button>
|
||||
</a>
|
||||
{% else %}
|
||||
<button class="py-2 px-4 cursor-not-allowed">
|
||||
<img src="/assets/img/chevron-right.svg" alt="next">
|
||||
</button>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if page.url != pagination.href.last %}
|
||||
<a href="{{ pagination.href.last }}">
|
||||
<button class="paginator-text">
|
||||
Last
|
||||
</button>
|
||||
</a>
|
||||
{% else %}
|
||||
<button class="paginator-text cursor-not-allowed">
|
||||
Last
|
||||
</button>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
</nav>
|
30
src/_includes/post.liquid
Normal file
30
src/_includes/post.liquid
Normal file
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
layout: main
|
||||
---
|
||||
|
||||
{% include "nav.liquid" %}
|
||||
|
||||
<p class="text-5xl md:text-6xl font-black pt-10 md:pt-30 pb-4 leading-tight">
|
||||
{{ title}}
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<em>{{ date | date: "%Y-%m-%d" }}</em> ·
|
||||
<span>{{ content | readTime }} min read</span>
|
||||
</div>
|
||||
|
||||
<div class="mt-3 pb-10">
|
||||
{% for tag in tags %}
|
||||
{% if tag != "posts" %}
|
||||
<a href="/tags/{{ tag }}">
|
||||
<span class="post-tag">{{ tag }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="prose dark:prose-invert hover:prose-a:text-blue-500">
|
||||
{{ content }}
|
||||
</div>
|
||||
|
||||
{% include "author.liquid" %}
|
Reference in a new issue