- Switch from `cabal2nix` and haskell overlay to `developPackage`
- Restructure directories to have more descriptive names
- Fix `nix run`
This commit is contained in:
2023-03-11 16:51:23 +01:00
parent 669ded6d45
commit dcdf36f4dd
104 changed files with 51 additions and 232 deletions

102
www/templates/default.html Normal file
View File

@@ -0,0 +1,102 @@
<!DOCTYPE html>
<html lang="$lang$">
<head>
<title>$title$</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
$if(desc)$
<meta name="description" content="$desc$">
$endif$
$if(author)$
<meta name="author" content="$author$">
$endif$
$if(keywords)$
<meta name="keywords" content="$keywords$">
$endif$
<meta property="og:site_name" content="$siteName$">
<meta property="og:title" content="$title$">
<meta property="og:url" content="$root$$url$">
$if(desc)$
<meta property="og:description" content="$desc$">
$endif$
$if(image)$
<meta property="og:image" content="$root$$image$">
$endif$
$if(type)$
<meta property="og:type" content="$type$">
$else$
<meta property="og:type" content="website">
$endif$
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:site" content="$siteName$">
<meta property="twitter:title" content="$title$">
$if(desc)$
<meta property="twitter:description" content="$desc$">
$endif$
$if(image)$
<meta property="twitter:image" content="$root$$image$">
$endif$
<link rel="shortcut icon" href="/images/nani.svg">
<link rel="canonical" href="$root$$url$">
<link rel="stylesheet" href="/css/code.css" />
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<link rel="stylesheet" href="/css/default.css" />
<link rel="stylesheet" href="/css/styles.css" />
</head>
<body>
<div id="layout">
<div id="menu"> <div class="pure-menu">
<a class="pure-menu-heading" href="/">
<img id="navbar-image" class="pure-image-responsive py-4" src="/images/header-nani.svg"/>
</a>
<ul class="pure-menu-list">
<li class="pure-menu-item"><a href="/" class="pure-menu-link">Posts</a></li>
<li class="pure-menu-item"><a href="/" class="pure-menu-link">語源</a></li>
<!-- <li class="pure-menu-item menu-item-divided pure-menu-selected"> -->
<!-- <a href="#" class="pure-menu-link">Services</a> -->
<!-- </li> -->
<li class="pure-menu-item"><a href="#contact" class="pure-menu-link">Contact</a></li>
<li class="pure-menu-item menu-item-divided"><a href="https://git.nani.wtf" class="pure-menu-link">Git</a></li>
<li class="pure-menu-item"><a href="https://git.nani.wtf/h7x4/nani.wtf" class="pure-menu-link">Site source</a></li>
<li class="pure-menu-item"><a href="public/rss.xml" class="pure-menu-link">RSS</a></li>
</ul>
</div>
</div>
<div id="main">
<!-- <div class="header"> -->
<!-- <h1>Page Title</h1> -->
<!-- <h2>A subtitle for your page goes here</h2> -->
<!-- </div> -->
<!-- <div class="content"> -->
<!-- <h2 class="content-subhead">How to use this layout</h2> -->
<!-- <p> -->
<!-- To use this layout, you can just copy paste the HTML, along with the CSS in <a href="/layouts/side-menu/styles.css" alt="Side Menu CSS">side-menu.css</a>, and the JavaScript in <a href="/js/ui.js">ui.js</a>. The JS file uses vanilla JavaScript to simply toggle an <code>active</code> class that makes the menu responsive. -->
<!-- </p> -->
</div>
</div>
$body$
<script async src="/js/script.js"></script>
<script src="/js/ui.js"></script>
</body>
</html>

26
www/templates/gogen.html Normal file
View File

@@ -0,0 +1,26 @@
<main>
<article>
<header class="header">
<h1>$titleHtml$</h1>
<div>
$if(updated)$
<small>(updated: $updated$)</small>
$endif$
</div>
$if(alternatives)$
<div>
$alternatives$
</div>
$endif$
</header>
<section class="content">
$if(notFinishedYet)$
<div class="d-flex justify-content-center">
<aside class="alert alert-warning"><strong>NOTE:</strong> This page might not be complete just yet.</aside>
</div>
$endif$
$body$
</section>
</article>
</main>

16
www/templates/post.html Normal file
View File

@@ -0,0 +1,16 @@
<main>
<article>
<header class="header">
<h1>$title$</h1>
<div>
<small>$date$</small>
$if(updated)$
<small>(updated: $updated$)</small>
$endif$
</div>
</header>
<section class="content">
$body$
</section>
</article>
</main>

16
www/templates/sitemap.xml Normal file
View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url>
<loc>$root$</loc>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
$for(pages)$
<url>
<loc>$root$$url$</loc>
<lastmod>$if(updated)$$updated$$else$$if(date)$$date$$endif$$endif$</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
$endfor$
</urlset>