add bookshelf
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -9,3 +9,4 @@ posts/*.blog
|
|||||||
posts/*.post
|
posts/*.post
|
||||||
\#*
|
\#*
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
bookshelf.txt
|
||||||
|
|||||||
59
bookshelf/bookshelf.mustache
Normal file
59
bookshelf/bookshelf.mustache
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="Rawley.xyz, Rawley Fowler's web ring">
|
||||||
|
<title>rawley.xyz/web-ring</title>
|
||||||
|
<link href="/static/index.css" rel="stylesheet">
|
||||||
|
<style>
|
||||||
|
main a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<h1>
|
||||||
|
<a href="/">Rawley.xyz</a>
|
||||||
|
</h1>
|
||||||
|
<nav>
|
||||||
|
<li>
|
||||||
|
<a href="/blog">blog</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/resume">resume</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/philosophy">philosophy</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/web-ring">web ring</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/bookshelf">bookshelf</a>
|
||||||
|
</li>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
<p>Here is a list of books I have read, in no particular order.</p>
|
||||||
|
<div>
|
||||||
|
{{#books}}
|
||||||
|
<p>
|
||||||
|
<a href="{{href}}">{{name}}</a> by {{author}}. <b>Rating</b>: {{rating}}
|
||||||
|
</p>
|
||||||
|
{{/books}}
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
<hr>
|
||||||
|
<p>
|
||||||
|
Copyright © Rawley Fowler 2022
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<b>Disclaimer</b>: All opinions on this site, are that of my own. They do not
|
||||||
|
reflect the opinions of any of my employers; past, present, or future.
|
||||||
|
</p>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
15
bookshelf/bookshelf.raku
Normal file
15
bookshelf/bookshelf.raku
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
use v6.d;
|
||||||
|
|
||||||
|
use Humming-Bird::Core;
|
||||||
|
use Template::Mustache;
|
||||||
|
|
||||||
|
my constant $BOOKSHELF-LOCATION = 'bookshelf.txt';
|
||||||
|
|
||||||
|
my $tmpl = Template::Mustache.new: :from<.>;
|
||||||
|
|
||||||
|
get('/bookshelf', -> $request, $response {
|
||||||
|
my @books = $BOOKSHELF-LOCATION.IO.lines>>.split('^').map(-> ($name, $author, $href, $rating) { %(:$name, :$author, :$href, :$rating) });
|
||||||
|
$response.html($tmpl.render('bookshelf', { :@books }));
|
||||||
|
});
|
||||||
|
|
||||||
|
listen(8888);
|
||||||
0
bookshelf/bookshelf.tmpl
Normal file
0
bookshelf/bookshelf.tmpl
Normal file
@@ -38,6 +38,9 @@
|
|||||||
<li>
|
<li>
|
||||||
<a href="/web-ring">web ring</a>
|
<a href="/web-ring">web ring</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/bookshelf">bookshelf</a>
|
||||||
|
</li>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
|
|||||||
@@ -38,6 +38,9 @@
|
|||||||
<li>
|
<li>
|
||||||
<a href="/web-ring">web ring</a>
|
<a href="/web-ring">web ring</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/bookshelf">bookshelf</a>
|
||||||
|
</li>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
|
|||||||
@@ -30,6 +30,9 @@
|
|||||||
<li>
|
<li>
|
||||||
<a href="/web-ring">web ring</a>
|
<a href="/web-ring">web ring</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/bookshelf">bookshelf</a>
|
||||||
|
</li>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
|
|||||||
4
rawleydotxyz
Normal file
4
rawleydotxyz
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
"$(pwd)/_esy/default/build/default/rawleydotxyz.exe" &
|
||||||
|
raku "$(pwd)/bookshelf/bookshelf.raku" &
|
||||||
@@ -25,6 +25,10 @@ let render body =
|
|||||||
<li>
|
<li>
|
||||||
<a href="/web-ring">web ring</a>
|
<a href="/web-ring">web ring</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/bookshelf">bookshelf</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
|
|||||||
Reference in New Issue
Block a user