Skip to content

Commit

Permalink
feat: add attribution page
Browse files Browse the repository at this point in the history
  • Loading branch information
ashhhleyyy committed Apr 9, 2024
1 parent 2108eff commit d31b7c0
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/routes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use tower_http::trace::TraceLayer;
use crate::{
apis::{CachingFetcher, NowPlayingInfo, PronounsPageProfile},
templates::{
AboutTemplate, ErrorTemplate, HtmlTemplate, LinksTemplate, MusicTemplate, WordsTemplate,
AboutTemplate, AttributionTemplate, ErrorTemplate, HtmlTemplate, LinksTemplate, MusicTemplate, WordsTemplate,
},
};

Expand All @@ -33,6 +33,7 @@ macro_rules! simple_template {

simple_template!(index, "/", AboutTemplate);
simple_template!(links, "/me", LinksTemplate);
simple_template!(attribution, "/attribution", AttributionTemplate);

async fn about() -> Redirect {
Redirect::permanent(Uri::from_static("/"))
Expand Down Expand Up @@ -83,6 +84,7 @@ pub fn build_router() -> Router {
.route("/about", get(about))
.route("/about/words", get(words))
.route("/about/music", get(music))
.route("/attribution", get(attribution))
.route("/blog/", get(blog::index))
.route("/blog/:post", get(blog::post))
.route("/projects/", get(projects::index))
Expand Down
1 change: 1 addition & 0 deletions src/templates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ macro_rules! simple_template {
simple_template!("index.html", IndexTemplate);
simple_template!("about.html", AboutTemplate);
simple_template!("links.html", LinksTemplate);
simple_template!("attribution.html", AttributionTemplate);

#[derive(Template)]
#[template(path = "words.html")]
Expand Down
26 changes: 26 additions & 0 deletions templates/attribution.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{% extends "base.html" %}

{% block title %}Attribution{% endblock %}
{% block description %}Things that make this website work{% endblock %}

{% block content %}
<main class="content">
<h1>Attribution</h1>

<p>
Powered by <a href="https://rust-lang.org">Rust</a>, running on a Raspberry Pi 4.
</p>

<p>
<h2>Characters</h2>
<ul>
<li>My profile picture is from <a href="https://picrew.me/en/image_maker/1904634/">this picrew</a>.</li>
<li>Leah's profile picture is also from <a href="https://picrew.me/en/image_maker/1904634/">the same picrew</a>.</li>
</ul>
</p>

<p>
The code for this website is <a href="https://github.com/ashhhleyyy/website">on GitHub</a>
</p>
</main>
{% endblock %}
2 changes: 1 addition & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
</div>

<p>
Copyright (c) 2022-<copyright-year></copyright-year> Ashhhleyyy. All rights reserved.
Copyright (c) 2022-<copyright-year></copyright-year> Ashhhleyyy. All rights reserved. <a href="/attribution">Powered by these things!</a>
</p>
<p class="generated">
Page generated at <page-generated></page-generated>
Expand Down

0 comments on commit d31b7c0

Please sign in to comment.