Compare commits
2 Commits
a3a4ae8ca4
...
eb48cc70c1
Author | SHA1 | Date |
---|---|---|
Bauke | eb48cc70c1 | |
Bauke | 0cf9dda4fd |
|
@ -0,0 +1,14 @@
|
|||
//! Miscellaneous assets.
|
||||
|
||||
use {
|
||||
async_std::{fs::write, path::PathBuf},
|
||||
color_eyre::Result,
|
||||
};
|
||||
|
||||
/// Write all misellaneous asset files to where they belong.
|
||||
pub async fn write_assets(parent: &PathBuf) -> Result<()> {
|
||||
let logo = include_bytes!("tildes-statistics.png");
|
||||
write(parent.join("tildes-statistics.png"), logo).await?;
|
||||
|
||||
Ok(())
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
|
@ -6,6 +6,7 @@ use {
|
|||
};
|
||||
|
||||
use crate::{
|
||||
assets::write_assets,
|
||||
charts::UserCountChart,
|
||||
cli::{
|
||||
Cli, MainSubcommands, MigrateSubcommands, SnapshotSubcommands,
|
||||
|
@ -112,6 +113,7 @@ pub async fn run() -> Result<()> {
|
|||
.render_to_file(&output)
|
||||
.await?;
|
||||
generate_css(&output).await?;
|
||||
write_assets(&output).await?;
|
||||
|
||||
if let Some(group) = user_count_group {
|
||||
let groups =
|
||||
|
|
|
@ -11,6 +11,7 @@ use {
|
|||
tracing_subscriber::filter::{EnvFilter, LevelFilter},
|
||||
};
|
||||
|
||||
pub mod assets;
|
||||
pub mod charts;
|
||||
pub mod cli;
|
||||
pub mod group_data;
|
||||
|
|
|
@ -26,11 +26,6 @@ a:visited {
|
|||
}
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
|
|
|
@ -17,8 +17,15 @@
|
|||
}
|
||||
|
||||
.page-header {
|
||||
align-items: center;
|
||||
border-bottom: 4px solid var(--background-2);
|
||||
display: flex;
|
||||
padding: var(--large-spacing);
|
||||
|
||||
img {
|
||||
height: 4rem;
|
||||
margin-right: var(--large-spacing);
|
||||
}
|
||||
}
|
||||
|
||||
.page-main {
|
||||
|
@ -59,6 +66,11 @@
|
|||
background-color: var(--background-2);
|
||||
}
|
||||
}
|
||||
|
||||
.chart {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.page-footer {
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ page_title }}</title>
|
||||
<link rel="shortcut icon" href="/tildes-statistics.png" type="image/png">
|
||||
<link rel="stylesheet" href="/css/modern-normalize.css">
|
||||
<link rel="stylesheet" href="/css/common.css">
|
||||
{% block head %}{% endblock %}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
{% block body %}
|
||||
<header class="page-header">
|
||||
<img src="/tildes-statistics.png" alt="Tildes Statistics Logo">
|
||||
<h1>Tildes Statistics</h1>
|
||||
</header>
|
||||
|
||||
|
@ -18,7 +19,7 @@
|
|||
registered users on Tildes.
|
||||
</p>
|
||||
|
||||
<img src="/charts/user-count.svg" alt="User Count Chart">
|
||||
<img class="chart" src="/charts/user-count.svg" alt="User Count Chart">
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
|
|
Loading…
Reference in New Issue