start html templates

This commit is contained in:
Cadey Ratio 2020-07-12 18:19:18 -04:00
parent 778bd133e8
commit cb42d99c43
8 changed files with 219 additions and 20 deletions

50
Cargo.lock generated
View File

@ -154,6 +154,12 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7"
[[package]]
name = "bytecount"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0017894339f586ccb943b01b9555de56770c11cda818e7e3d8bd93f4ed7f46e"
[[package]]
name = "byteorder"
version = "1.3.4"
@ -543,20 +549,6 @@ version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d36fab90f82edc3c747f9d438e06cf0a491055896f2a279638bb5beed6c40177"
[[package]]
name = "handlebars"
version = "3.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c8ae96a0e0dacf151557ccba95a7a80889f8e74a784484377739628fcdb3996"
dependencies = [
"log 0.4.8",
"pest",
"pest_derive",
"quick-error",
"serde",
"serde_json",
]
[[package]]
name = "headers"
version = "0.3.2"
@ -808,6 +800,12 @@ version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
[[package]]
name = "md5"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771"
[[package]]
name = "memchr"
version = "2.3.3"
@ -1435,6 +1433,20 @@ dependencies = [
"winreg",
]
[[package]]
name = "ructe"
version = "0.11.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f615d1e172dcc01a7cd78c7f77f21a5669c6de4341548ad2e7764e9045d06657"
dependencies = [
"base64 0.12.3",
"bytecount",
"itertools",
"md5",
"mime 0.3.16",
"nom",
]
[[package]]
name = "rustc_version"
version = "0.2.3"
@ -1660,9 +1672,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
[[package]]
name = "syn"
version = "1.0.33"
version = "1.0.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8d5d96e8cbb005d6959f119f773bfaebb5684296108fb32600c00cde305b2cd"
checksum = "936cae2873c940d92e697597c5eee105fb570cd5689c695806f672883653349b"
dependencies = [
"proc-macro2",
"quote",
@ -2174,10 +2186,10 @@ dependencies = [
"anyhow",
"comrak",
"envy",
"handlebars",
"log 0.3.9",
"log 0.4.8",
"pretty_env_logger",
"rand 0.6.5",
"rand 0.7.3",
"ructe",
"serde",
"serde_dhall",
"tokio",

View File

@ -3,6 +3,7 @@ name = "xesite"
version = "2.0.0"
authors = ["Christine Dodrill <me@christine.website>"]
edition = "2018"
build = "src/build.rs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@ -10,11 +11,15 @@ edition = "2018"
anyhow = "1"
comrak = "0.7"
envy = "0.4"
handlebars = "3.2.1"
log = "0"
pretty_env_logger = "0"
rand = "0"
ructe = "0.11"
serde_dhall = "0.5.3"
serde = { version = "1", features = ["derive"] }
tokio = { version = "0.2", features = ["macros"] }
warp = "0.2"
[build-dependencies]
ructe = { version = "0.11", features = ["warp02"] }

20
css/shim.css Normal file
View File

@ -0,0 +1,20 @@
.main {
padding: 20px 10px;
}
.hack h1 {
padding-top: 0;
}
footer.footer {
border-top: 1px solid #ccc;
margin-top: 80px;
margin-top: 5rem;
padding: 48px 0;
padding: 3rem 0;
}
img {
max-width: 100%;
padding: 1em;
}

5
src/build.rs Normal file
View File

@ -0,0 +1,5 @@
use ructe::{Result, Ructe};
fn main() -> Result<()> {
Ructe::from_env()?.compile_templates("templates")
}

7
static/js/installsw.js Normal file
View File

@ -0,0 +1,7 @@
if (navigator.serviceWorker.controller) {
console.log("Active service worker found, no need to register");
} else {
navigator.serviceWorker.register("/sw.js").then(function(reg) {
console.log("Service worker has been registered for scope:" + reg.scope);
});
}

14
templates/footer.rs.html Normal file
View File

@ -0,0 +1,14 @@
@()
<footer>
<blockquote>Copyright 2020 Christine Dodrill. Any and all opinions listed here are my own and not representative of my employers; future, past and present.</blockquote>
<br />
<!--<p>Like what you see? Donate on <a href="https://www.patreon.com/cadey">Patreon</a> like <a href="/patrons">these awesome people</a>!</p>-->
<p>Looking for someone for your team? Take a look <a href="/signalboost">here</a>.</p>
</footer>
</div>
<script src="/static/js/installsw.js" defer></script>
<script src="/static/js/instantpage-3.0.0.js" defer type="module"> </script>
</body>
</html>

51
templates/header.rs.html Normal file
View File

@ -0,0 +1,51 @@
@(title: Option<&str>, styles: Option<&str>)
<!DOCTYPE html>
<html lang="en">
<head>
@if title.is_some() {
<title>@title.unwrap() - Christine Dodrill</title>
} else {
<title>Christine Dodrill</title>
}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="go-import" content="christine.website git https://github.com/Xe/site">
<link rel="stylesheet" href="/css/hack.css" />
<link rel="stylesheet" href="/css/gruvbox-dark.css" />
<link rel="stylesheet" href="/css/shim.css" />
<!-- <link rel="stylesheet" href="/css/snow.css" /> -->
<link rel="manifest" href="/static/manifest.json" />
<link rel="alternate" title="Christine Dodrill's Blog" type="application/rss+xml" href="https://christine.website/blog.rss" />
<link rel="alternate" title="Christine Dodrill's Blog" type="application/json" href="https://christine.website/blog.json" />
<link rel="apple-touch-icon" sizes="57x57" href="/static/favicon/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/static/favicon/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/static/favicon/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/static/favicon/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/static/favicon/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/static/favicon/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/static/favicon/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/static/favicon/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/static/favicon/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/static/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/static/favicon/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/static/favicon/favicon-16x16.png">
<link rel="manifest" href="/static/favicon/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/static/favicon/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
@if styles.is_some() {
<style>
@styles.unwrap()
</style>
}
</head>
<body class="snow hack gruvbox-dark">
<div class="container">
<header>
<p><a href="/">Christine Dodrill</a> - <a href="/blog">Blog</a> - <a href="/contact">Contact</a> - <a href="/gallery">Gallery</a> - <a href="/resume">Resume</a> - <a href="/talks">Talks</a> - <a href="/signalboost">Signal Boost</a> - <a href="/feeds">Feeds</a> | <a target="_blank" rel="noopener noreferrer" href="https://graphviz.christine.website">GraphViz</a> - <a target="_blank" rel="noopener noreferrer" href="https://when-then-zen.christine.website/">When Then Zen</a></p>
</header>
<div class="snowframe">

85
templates/index.rs.html Normal file
View File

@ -0,0 +1,85 @@
@()
<link rel="authorization_endpoint" href="https://idp.christine.website/auth">
<link rel="canonical" href="https://christine.website/">
<meta name="google-site-verification" content="rzs9eBEquMYr9Phrg0Xm0mIwFjDBcbdgJ3jF6Disy-k" />
<script type="application/ld+json">
@{
"@context": "http://schema.org/",
"@type": "Person",
"name": "Christine Dodrill",
"alternateName": "Cadey, Xe, Xena",
"url": "https://christine.website",
"image": "https://christine.website/static/img/avatar_large.png",
"sameAs": [
"https://github.com/Xe",
"https://git.xeserv.us/xena",
"https://twitter.com/theprincessxena",
"https://mst3k.interlinked.me/@cadey",
"https://www.linkedin.com/in/christine-dodrill-1827a010b/",
"https://www.youtube.com/user/shadowh511"
]
@}
</script>
<!-- Twitter -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@theprincessxena" />
<meta name="twitter:title" content="Christine Dodrill" />
<meta name="twitter:description" content="Full-stack Engineer" />
<!-- Facebook -->
<meta property="og:type" content="website" />
<meta property="og:title" content="Christine Dodrill" />
<meta property="og:site_name" content="Full-stack Engineer" />
<!-- Description -->
<meta name="description" content="Full-stack Engineer" />
<meta name="author" content="Christine Dodrill">
<div class="grid">
<div class="cell -3of12 content">
<img src="/static/img/avatar.png" alt="My Avatar">
<br />
<a href="/contact" class="justify-content-center">Contact Me</a>
</div>
<div class="cell -9of12 content">
<h1>Christine Dodrill</h1>
<h4>Full-stack Engineer</h4>
<h5>Skills</h5>
<ul>
<li>Go, Lua, Nim, Haskell, C, Rust and other languages</li>
<li>Docker (deployment, development & more)</li>
<li>Mashups of data</li>
<li>Package maintainer for Adélie Linux</li>
</ul>
<h5>Highlighted Projects</h5>
<ul>
<li><a href="https://github.com/PonyvilleFM/aura">Aura</a> - PonyvilleFM live DJ recording bot</li>
<li><a href="https://github.com/Elemental-IRCd/elemental-ircd">Elemental-IRCd</a> - IRC Server Software</li>
<li><a href="https://github.com/Xe/site">This website</a> - The backend and templates for this website</li>
<li><a href="https://github.com/Xe/olin">Olin</a> - WebAssembly on the server</li>
<li><a href="https://github.com/Xe/when-then-zen">when-then-zen</a> - Meditation instructions in Gherkin</li>
<li><a href="https://github.com/Xe/creators-code">Creator's Code</a> - Minimal code of conduct for communities</li>
<li><a href="https://github.com/Xe/printerfacts">printerfacts</a> - Informative facts about printers</li>
<li><a href="https://github.com/Xe/x">x</a> - Experiments and toys</li>
<li><a href="https://github.com/Xe/PonyAPI">PonyAPI</a> - My Little Pony: Friendship is Magic Episode information API</li>
<li><a href="https://github.com/Xe/bsnk">bsnk</a> - Battlesnake bots</li>
<li><a href="https://tulpa.dev/cadey/xeos">XeOS</a> - An experimental microkernel in Rust</li>
<li><a href="https://h.christine.website">h</a> - A satirical programming language</li>
<li><a href="https://github.com/Xe/gruvbox-css">gruvbox-css</a> - My minimal Gruvbox CSS theme</li>
<li><a href="https://tulpa.dev/Xe/quickserv">quickserv</a> - A quick HTTP fileserver</li>
</ul>
<h5>Quick Links</h5>
<ul>
<li><a href="https://github.com/Xe" rel="me">GitHub</a></li>
<li><a href="https://twitter.com/theprincessxena" rel="me">Twitter</a></li>
<li><a href="https://mst3k.interlinked.me/@cadey" rel="me">Mastodon</a></li>
<li><a href="https://www.patreon.com/cadey" rel="me">Patreon</a></li>
</ul>
<p>Looking for someone for your team? Check <a href="/signalboost">here</a>.
</div>
</div>