feat: favicon
This commit is contained in:
parent
bce103b086
commit
4dfa29d6f1
25
web/build.rs
25
web/build.rs
@ -18,6 +18,7 @@ fn main() -> std::io::Result<()> {
|
|||||||
|
|
||||||
let dist_path = Path::new("./static/dist");
|
let dist_path = Path::new("./static/dist");
|
||||||
let nm_path = Path::new("./static/node_modules");
|
let nm_path = Path::new("./static/node_modules");
|
||||||
|
let static_path = Path::new("./static");
|
||||||
|
|
||||||
if fs::metadata(dist_path).is_err() {
|
if fs::metadata(dist_path).is_err() {
|
||||||
fs::create_dir(dist_path)?;
|
fs::create_dir(dist_path)?;
|
||||||
@ -43,14 +44,22 @@ fn main() -> std::io::Result<()> {
|
|||||||
nm_path.join("hyperscript.org/dist/_hyperscript.min.js"),
|
nm_path.join("hyperscript.org/dist/_hyperscript.min.js"),
|
||||||
dist_path.join("_hyperscript.min.js"),
|
dist_path.join("_hyperscript.min.js"),
|
||||||
)?;
|
)?;
|
||||||
copy(
|
|
||||||
Path::new("./static/utils.js"),
|
let static_files = vec![
|
||||||
dist_path.join("utils.js"),
|
"utils.js",
|
||||||
)?;
|
"brass.jpeg",
|
||||||
copy(
|
"android-chrome-192x192.png",
|
||||||
Path::new("./static/brass.jpeg"),
|
"android-chrome-512x512.png",
|
||||||
dist_path.join("brass.jpeg"),
|
"apple-touch-icon.png",
|
||||||
)?;
|
"favicon-16x16.png",
|
||||||
|
"favicon-32x32.png",
|
||||||
|
"favicon.ico",
|
||||||
|
"site.webmanifest",
|
||||||
|
];
|
||||||
|
|
||||||
|
for file in static_files {
|
||||||
|
copy(static_path.join(file), dist_path.join(file))?;
|
||||||
|
}
|
||||||
|
|
||||||
resource_dir("./static/dist").build()
|
resource_dir("./static/dist").build()
|
||||||
}
|
}
|
||||||
|
BIN
web/static/android-chrome-192x192.png
Normal file
BIN
web/static/android-chrome-192x192.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 42 KiB |
BIN
web/static/android-chrome-512x512.png
Normal file
BIN
web/static/android-chrome-512x512.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 201 KiB |
BIN
web/static/apple-touch-icon.png
Normal file
BIN
web/static/apple-touch-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
BIN
web/static/favicon-16x16.png
Normal file
BIN
web/static/favicon-16x16.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 881 B |
BIN
web/static/favicon-32x32.png
Normal file
BIN
web/static/favicon-32x32.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
BIN
web/static/favicon.ico
Normal file
BIN
web/static/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
19
web/static/site.webmanifest
Normal file
19
web/static/site.webmanifest
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"name": "Brass",
|
||||||
|
"short_name": "Brass",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "/android-chrome-192x192.png",
|
||||||
|
"sizes": "192x192",
|
||||||
|
"type": "image/png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/android-chrome-512x512.png",
|
||||||
|
"sizes": "512x512",
|
||||||
|
"type": "image/png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"theme_color": "#FFFFFF",
|
||||||
|
"background_color": "#FFFFFF",
|
||||||
|
"display": "standalone"
|
||||||
|
}
|
@ -11,6 +11,10 @@
|
|||||||
<script src="/static/sweetalert2.min.js"></script>
|
<script src="/static/sweetalert2.min.js"></script>
|
||||||
<script src="/static/_hyperscript.min.js"></script>
|
<script src="/static/_hyperscript.min.js"></script>
|
||||||
<script type="module" src="/static/utils.js"></script>
|
<script type="module" src="/static/utils.js"></script>
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="/static/apple-touch-icon.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="/static/favicon-32x32.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="/static/favicon-16x16.png">
|
||||||
|
<link rel="manifest" href="/static/site.webmanifest">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="hero is-fullheight" hx-ext="response-targets">
|
<body class="hero is-fullheight" hx-ext="response-targets">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user