From 4da0824990e469f1687c656acf304c1ffe8849c8 Mon Sep 17 00:00:00 2001 From: Logan Date: Sat, 20 Jul 2024 06:15:37 -0500 Subject: [PATCH] Basic layout --- dist/index.html | 59 ++++++++++++++++++++++++++++++++--- src/index.js | 2 +- src/main.css | 44 ++++++++++++++++++++++++-- src/main.rs | 82 ++++++++++++++++++++++++++++++++++++++++++------- 4 files changed, 167 insertions(+), 20 deletions(-) diff --git a/dist/index.html b/dist/index.html index 186acc4..e0f199c 100644 --- a/dist/index.html +++ b/dist/index.html @@ -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: "=> "; +} +

test

\ No newline at end of file +

logan's site


me

+ 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! +


my interests

  • music
  • books
  • websites
  • you!


writeups

  • dependency paranoia
  • on build systems

programming

+ 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: +

projectsummarydate
web serverhttps server implementation2024
html templaterinterpreter and inline templating language for html2024
fortesafety focused stack machine emulator and assembly language2024
nrangecartesian product for N vectors in O(N) time/space2023
fishbowlkinematic image processing on the web2022
stocksplay money stock trading algorithm2021
the cryptplatforming video game in Godot2020

sites i manage

\ No newline at end of file diff --git a/src/index.js b/src/index.js index 285649a..78b3753 100644 --- a/src/index.js +++ b/src/index.js @@ -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); } diff --git a/src/main.css b/src/main.css index b65a947..662749d 100644 --- a/src/main.css +++ b/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: "=> "; +} + diff --git a/src/main.rs b/src/main.rs index fb9fce8..16a333a 100644 --- a/src/main.rs +++ b/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,24 +32,84 @@ fn template(inner: Markup) -> Markup { } } -fn index() -> Markup { - template( - html! { - h1 {"test"} +fn project(name: &str, desc: &str, language: &str, link: &str) -> Markup { + html! { + 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<()> { make_page("index", index())?; - Ok(()) + Ok(()) } 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(())