Add logo to header and favicon.
This commit is contained in:
parent
0cf9dda4fd
commit
eb48cc70c1
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue