feat: version number display

This commit is contained in:
Zynh Ludwig 2025-01-14 00:09:43 -08:00
parent 7891157c53
commit e7b28b3214
6 changed files with 11 additions and 3 deletions

2
Cargo.lock generated
View file

@ -1335,7 +1335,7 @@ dependencies = [
[[package]]
name = "nyazoom"
version = "0.2.3"
version = "0.2.4"
dependencies = [
"async-bincode",
"async-trait",

View file

@ -1,6 +1,6 @@
[package]
name = "nyazoom"
version = "0.2.3"
version = "0.2.4"
edition = "2021"
authors = ["Zynh Ludwig <Zynh0722@gmail.com>"]
readme = "README.md"

6
dist/css/main.css vendored
View file

@ -25,7 +25,6 @@ body {
justify-content: center;
}
.cat-img {
width: 250px;
height: 250px;
@ -44,6 +43,11 @@ body {
text-align: center;
}
#version {
align-self: end;
padding-right: 0.25em;
}
[type="file"] {
border: 0;
clip: rect(0, 0, 0, 0);

View file

@ -10,6 +10,7 @@ pub use views::*;
use std::{path::PathBuf, sync::LazyLock};
pub static CARGO_VERSION: &str = concat!("v", env!("CARGO_PKG_VERSION"));
pub static CACHE_DIR: LazyLock<PathBuf> = LazyLock::new(|| {
std::env::var("CACHE_DIR")
.ok()

View file

@ -2,6 +2,8 @@ use rinja_axum::Template;
use crate::db::CacheRecord;
use crate::CARGO_VERSION;
#[derive(Template)]
#[template(path = "welcome.html")]
pub struct WelcomeTemplate {

View file

@ -18,5 +18,6 @@
<body>
<h1>NyaZoom<sup>2</sup></h1>
{% block content %}{% endblock %}
<footer id="version">{{ CARGO_VERSION }}</footer>
</body>
</html>