Basic layout
This commit is contained in:
parent
f4bbef4baa
commit
4da0824990
59
dist/index.html
vendored
59
dist/index.html
vendored
|
@ -3,16 +3,19 @@
|
|||
src: url(/res/merriweather-regular.ttf);
|
||||
}
|
||||
|
||||
|
||||
body {
|
||||
font-family: merriweather;
|
||||
background-color: black;
|
||||
background-color: #141013;
|
||||
height: 100%;
|
||||
padding: 5px;
|
||||
line-height: 1.75em;
|
||||
}
|
||||
|
||||
main {
|
||||
padding: 10px;
|
||||
background-color: white;
|
||||
border-radius: 15px;
|
||||
padding: 15px;
|
||||
background-color: #ffeedd;
|
||||
margin: auto;
|
||||
max-width: 750px;
|
||||
}
|
||||
|
@ -26,13 +29,59 @@ main {
|
|||
left: 0;
|
||||
z-index: -9999;
|
||||
}
|
||||
|
||||
table {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table, th, td {
|
||||
padding: 5px;
|
||||
border: 3px solid black;
|
||||
border-style: solid;
|
||||
border-collapse: collapse;
|
||||
/* text-align: center; */
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #df3e23;
|
||||
font-style: italic;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #df3e23;
|
||||
font-style: italic;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
h1:before {
|
||||
content: "> ";
|
||||
}
|
||||
|
||||
h2:before {
|
||||
content: "=> ";
|
||||
}
|
||||
|
||||
</style><script>let bg;
|
||||
let ctd;
|
||||
window.onload = function() {
|
||||
bg = document.getElementById("bg");
|
||||
ctx = bg.getContext("2d");
|
||||
|
||||
ctx.fillStyle = "red";
|
||||
ctx.fillStyle = "#141013";
|
||||
ctx.fillRect(0, 0, bg.width, bg.height);
|
||||
}
|
||||
</script></head><body><main><h1>test</h1></main></body><canvas class="bg" id="bg"></html>
|
||||
</script></head><body><main><h1>logan's site</h1><hr><h2>me</h2><p>
|
||||
i am a programming and philosophy enthusiast. once upon a time i was a
|
||||
competitive debater on a few local and state circuits. after over 10
|
||||
years of doing robotics i'm finally starting to get the hang of it.
|
||||
currently in the process of discovering my love for hypertext and the
|
||||
world wide web!
|
||||
<hr><h2>my interests</h2><ul><li>music</li><li>books</li><li>websites</li><li>you!</li></ul></p><hr><h2>writeups</h2><ul><li>dependency paranoia</li><li>on build systems</li></ul><hr><h2>programming</h2><p>
|
||||
i have been making things for much longer than i have bothered
|
||||
to document (or finish) my work. i work on whatever happens to
|
||||
catch my interest, using whatever tools and languages i fancy at
|
||||
the time. here are some of my favorite projects i've worked on:
|
||||
</p><table><tr><th>project</th><th>summary</th><th>date</th></tr><tr><td><a href="">web server</a></td><td>https server implementation</td><td>2024</td></tr><tr><td><a href="">html templater</a></td><td>interpreter and inline templating language for html</td><td>2024</td></tr><tr><td><a href="">forte</a></td><td>safety focused stack machine emulator and assembly language</td><td>2024</td></tr><tr><td><a href="">nrange</a></td><td>cartesian product for N vectors in O(N) time/space</td><td>2023</td></tr><tr><td><a href="">fishbowl</a></td><td>kinematic image processing on the web</td><td>2022</td></tr><tr><td><a href="">stocks</a></td><td>play money stock trading algorithm</td><td>2021</td></tr><tr><td><a href="">the crypt</a></td><td>platforming video game in Godot</td><td>2020</td></tr></table><hr><h2>sites i manage</h2><ul><li><a href="https://utsa-rowdysub.org">UTSA Advanced Robotics RoboSub team website (2024)</a></li></ul></main></body><canvas class="bg" id="bg"></html>
|
|
@ -4,6 +4,6 @@ window.onload = function() {
|
|||
bg = document.getElementById("bg");
|
||||
ctx = bg.getContext("2d");
|
||||
|
||||
ctx.fillStyle = "black";
|
||||
ctx.fillStyle = "#141013";
|
||||
ctx.fillRect(0, 0, bg.width, bg.height);
|
||||
}
|
||||
|
|
44
src/main.css
44
src/main.css
|
@ -3,16 +3,19 @@
|
|||
src: url(/res/merriweather-regular.ttf);
|
||||
}
|
||||
|
||||
|
||||
body {
|
||||
font-family: merriweather;
|
||||
background-color: black;
|
||||
background-color: #141013;
|
||||
height: 100%;
|
||||
padding: 5px;
|
||||
line-height: 1.75em;
|
||||
}
|
||||
|
||||
main {
|
||||
padding: 10px;
|
||||
background-color: white;
|
||||
border-radius: 15px;
|
||||
padding: 15px;
|
||||
background-color: #ffeedd;
|
||||
margin: auto;
|
||||
max-width: 750px;
|
||||
}
|
||||
|
@ -26,3 +29,38 @@ main {
|
|||
left: 0;
|
||||
z-index: -9999;
|
||||
}
|
||||
|
||||
table {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table, th, td {
|
||||
padding: 5px;
|
||||
border: 3px solid black;
|
||||
border-style: solid;
|
||||
border-collapse: collapse;
|
||||
/* text-align: center; */
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #df3e23;
|
||||
font-style: italic;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #df3e23;
|
||||
font-style: italic;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
h1:before {
|
||||
content: "> ";
|
||||
}
|
||||
|
||||
h2:before {
|
||||
content: "=> ";
|
||||
}
|
||||
|
||||
|
|
78
src/main.rs
78
src/main.rs
|
@ -1,6 +1,6 @@
|
|||
use maud::*;
|
||||
use std::fs::File;
|
||||
use std::io::prelude::*;
|
||||
use maud::*;
|
||||
|
||||
fn head() -> Markup {
|
||||
html! {
|
||||
|
@ -17,7 +17,7 @@ fn head() -> Markup {
|
|||
}
|
||||
|
||||
fn template(inner: Markup) -> Markup {
|
||||
html!{
|
||||
html! {
|
||||
(DOCTYPE)
|
||||
|
||||
html {
|
||||
|
@ -32,12 +32,74 @@ fn template(inner: Markup) -> Markup {
|
|||
}
|
||||
}
|
||||
|
||||
fn index() -> Markup {
|
||||
template(
|
||||
fn project(name: &str, desc: &str, language: &str, link: &str) -> Markup {
|
||||
html! {
|
||||
h1 {"test"}
|
||||
tr {
|
||||
td { a href=(link) {(name)}}
|
||||
td {(desc)}
|
||||
td {(language)}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fn index() -> Markup {
|
||||
template(html! {
|
||||
h1 {"logan's site"}
|
||||
hr;
|
||||
h2 {"me"}
|
||||
p {
|
||||
"
|
||||
i am a programming and philosophy enthusiast. once upon a time i was a
|
||||
competitive debater on a few local and state circuits. after over 10
|
||||
years of doing robotics i'm finally starting to get the hang of it.
|
||||
currently in the process of discovering my love for hypertext and the
|
||||
world wide web!
|
||||
"
|
||||
hr;
|
||||
h2 {"my interests"}
|
||||
ul {
|
||||
li {"music"}
|
||||
li {"books"}
|
||||
li {"websites"}
|
||||
li {"you!"}
|
||||
}
|
||||
}
|
||||
hr;
|
||||
h2 {"writeups"}
|
||||
ul {
|
||||
li { "dependency paranoia" }
|
||||
li { "on build systems" }
|
||||
}
|
||||
hr;
|
||||
h2 {"programming"}
|
||||
p {
|
||||
"
|
||||
i have been making things for much longer than i have bothered
|
||||
to document (or finish) my work. i work on whatever happens to
|
||||
catch my interest, using whatever tools and languages i fancy at
|
||||
the time. here are some of my favorite projects i've worked on:
|
||||
"
|
||||
}
|
||||
table {
|
||||
tr {
|
||||
th {"project"}
|
||||
th {"summary"}
|
||||
th {"date"}
|
||||
}
|
||||
(project("web server", "https server implementation", "2024", ""))
|
||||
(project("html templater", "interpreter and inline templating language for html", "2024", ""))
|
||||
(project("forte", "safety focused stack machine emulator and assembly language", "2024", ""))
|
||||
(project("nrange", "cartesian product for N vectors in O(N) time/space", "2023", ""))
|
||||
(project("fishbowl", "kinematic image processing on the web", "2022", ""))
|
||||
(project("stocks", "play money stock trading algorithm", "2021", ""))
|
||||
(project("the crypt", "platforming video game in Godot", "2020", ""))
|
||||
}
|
||||
hr;
|
||||
h2 {"sites i manage"}
|
||||
ul {
|
||||
li { a href="https://utsa-rowdysub.org" {"UTSA Advanced Robotics RoboSub team website (2024)"}}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fn main() -> std::io::Result<()> {
|
||||
|
@ -47,9 +109,7 @@ fn main() -> std::io::Result<()> {
|
|||
|
||||
fn make_page(path: &str, html: Markup) -> std::io::Result<()> {
|
||||
let dist_path: String = "./dist/".to_owned();
|
||||
let mut file = File::create(
|
||||
dist_path + path + ".html"
|
||||
)?;
|
||||
let mut file = File::create(dist_path + path + ".html")?;
|
||||
|
||||
file.write_all(html.into_string().as_bytes())?;
|
||||
Ok(())
|
||||
|
|
Loading…
Reference in a new issue