From 76b09a6f2b49cb997cc2dce1595989d3daebb2e5 Mon Sep 17 00:00:00 2001 From: Folyd Date: Sat, 10 Jul 2021 14:09:34 +0800 Subject: [PATCH] Use Rust and tera to build manage html pages --- .gitignore | 3 +- extension/manage/index.html | 85 ---- extension/manage/settings.html | 78 --- manage/Cargo.lock | 468 ++++++++++++++++++ manage/Cargo.toml | 10 + manage/src/main.rs | 46 ++ .../crates.html => manage/templates/base.html | 18 +- manage/templates/crates.html | 10 + .../templates/css}/balloon.min.css | 0 .../templates/css}/calendar-heatmap.css | 0 .../libs => manage/templates/css}/charts.css | 0 .../manage => manage/templates/css}/index.css | 0 .../manage => manage/templates/css}/text.css | 0 manage/templates/index.html | 62 +++ .../libs => manage/templates/js}/bar-chart.js | 0 .../templates/js}/calendar-heatmap.js | 0 .../libs => manage/templates/js}/charts.js | 0 .../manage => manage/templates/js}/crates.js | 0 .../libs => manage/templates/js}/d3.min.js | 0 .../manage => manage/templates/js}/index.js | 0 .../templates/js}/moment.min.js | 0 .../templates/js}/settings.js | 0 manage/templates/settings.html | 45 ++ .../templates/static}/info.svg | 0 24 files changed, 652 insertions(+), 173 deletions(-) delete mode 100644 extension/manage/index.html delete mode 100644 extension/manage/settings.html create mode 100644 manage/Cargo.lock create mode 100644 manage/Cargo.toml create mode 100644 manage/src/main.rs rename extension/manage/crates.html => manage/templates/base.html (79%) create mode 100644 manage/templates/crates.html rename {extension/libs => manage/templates/css}/balloon.min.css (100%) rename {extension/libs => manage/templates/css}/calendar-heatmap.css (100%) rename {extension/libs => manage/templates/css}/charts.css (100%) rename {extension/manage => manage/templates/css}/index.css (100%) rename {extension/manage => manage/templates/css}/text.css (100%) create mode 100644 manage/templates/index.html rename {extension/libs => manage/templates/js}/bar-chart.js (100%) rename {extension/libs => manage/templates/js}/calendar-heatmap.js (100%) rename {extension/libs => manage/templates/js}/charts.js (100%) rename {extension/manage => manage/templates/js}/crates.js (100%) rename {extension/libs => manage/templates/js}/d3.min.js (100%) rename {extension/manage => manage/templates/js}/index.js (100%) rename {extension/libs => manage/templates/js}/moment.min.js (100%) rename {extension/manage => manage/templates/js}/settings.js (100%) create mode 100644 manage/templates/settings.html rename {extension/manage => manage/templates/static}/info.svg (100%) diff --git a/.gitignore b/.gitignore index c88946f..99d0811 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ web-ext-artifacts node_modules target docs/public -manifest.json \ No newline at end of file +manifest.json +extension/manage/ \ No newline at end of file diff --git a/extension/manage/index.html b/extension/manage/index.html deleted file mode 100644 index 0c0d279..0000000 --- a/extension/manage/index.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - Rust Search Extension - - - - - - - - - - - - - - - -
-
- -
- - -
-
-
-
- 0 searches in total since the first day, approximately saved 0 seconds. - - info - -
-
-
-
-
-
-
    -
-
-
-
-
-
-

Searches per weekday

-
-
-
-

Searches per day of month

-
-
-
-

Searches per hour (local time)

-
-
-
- -
-

Top searched crates

-
-
-
-
-
-
-
-
- - - - - - - \ No newline at end of file diff --git a/extension/manage/settings.html b/extension/manage/settings.html deleted file mode 100644 index b992dc2..0000000 --- a/extension/manage/settings.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - Rust Search Statistics - - - - - - - - -
-
-
- -
- -
-
- Enable auto update - - info - - -
-
-
-
- Enable offline mode - - info - - -
- - -
-
- - -
-
- Website - Changelog - Github -
-
- -
-
- - - - - - - \ No newline at end of file diff --git a/manage/Cargo.lock b/manage/Cargo.lock new file mode 100644 index 0000000..a3187d7 --- /dev/null +++ b/manage/Cargo.lock @@ -0,0 +1,468 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +dependencies = [ + "memchr", +] + +[[package]] +name = "bitflags" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" + +[[package]] +name = "block-buffer" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +dependencies = [ + "block-padding", + "byte-tools", + "byteorder", + "generic-array", +] + +[[package]] +name = "block-padding" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +dependencies = [ + "byte-tools", +] + +[[package]] +name = "bstr" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90682c8d613ad3373e66de8c6411e0ae2ab2571e879d2efbf73558cc66f21279" +dependencies = [ + "memchr", +] + +[[package]] +name = "byte-tools" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "crossbeam-utils" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +dependencies = [ + "cfg-if", + "lazy_static", +] + +[[package]] +name = "digest" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +dependencies = [ + "generic-array", +] + +[[package]] +name = "fake-simd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "generic-array" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" +dependencies = [ + "typenum", +] + +[[package]] +name = "globset" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10463d9ff00a2a068db14231982f5132edebad0d7660cd956a1c30292dbcbfbd" +dependencies = [ + "aho-corasick", + "bstr", + "fnv", + "log", + "regex", +] + +[[package]] +name = "globwalk" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93e3af942408868f6934a7b85134a3230832b9977cf66125df2f9edcfce4ddcc" +dependencies = [ + "bitflags", + "ignore", + "walkdir", +] + +[[package]] +name = "ignore" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "713f1b139373f96a2e0ce3ac931cd01ee973c3c5dd7c40c0c2efe96ad2b6751d" +dependencies = [ + "crossbeam-utils", + "globset", + "lazy_static", + "log", + "memchr", + "regex", + "same-file", + "thread_local", + "walkdir", + "winapi-util", +] + +[[package]] +name = "itoa" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "log" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "manage" +version = "0.1.0" +dependencies = [ + "tera", +] + +[[package]] +name = "maplit" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" + +[[package]] +name = "memchr" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc" + +[[package]] +name = "once_cell" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" + +[[package]] +name = "opaque-debug" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" + +[[package]] +name = "pest" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" +dependencies = [ + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pest_meta" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d" +dependencies = [ + "maplit", + "pest", + "sha-1", +] + +[[package]] +name = "proc-macro2" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "quote" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "regex" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.6.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" + +[[package]] +name = "ryu" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "serde" +version = "1.0.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec7505abeacaec74ae4778d9d9328fe5a5d04253220a85c4ee022239fc996d03" + +[[package]] +name = "serde_json" +version = "1.0.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha-1" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" +dependencies = [ + "block-buffer", + "digest", + "fake-simd", + "opaque-debug", +] + +[[package]] +name = "syn" +version = "1.0.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "tera" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7571541dff0e57eaa2e931249f0d7489eb2b24b6b105546f8c2f1a47f15aaa3a" +dependencies = [ + "globwalk", + "lazy_static", + "pest", + "pest_derive", + "regex", + "serde", + "serde_json", + "unic-segment", +] + +[[package]] +name = "thread_local" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" +dependencies = [ + "once_cell", +] + +[[package]] +name = "typenum" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" + +[[package]] +name = "ucd-trie" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" + +[[package]] +name = "unic-char-property" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" +dependencies = [ + "unic-char-range", +] + +[[package]] +name = "unic-char-range" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" + +[[package]] +name = "unic-common" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" + +[[package]] +name = "unic-segment" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4ed5d26be57f84f176157270c112ef57b86debac9cd21daaabbe56db0f88f23" +dependencies = [ + "unic-ucd-segment", +] + +[[package]] +name = "unic-ucd-segment" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2079c122a62205b421f499da10f3ee0f7697f012f55b675e002483c73ea34700" +dependencies = [ + "unic-char-property", + "unic-char-range", + "unic-ucd-version", +] + +[[package]] +name = "unic-ucd-version" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" +dependencies = [ + "unic-common", +] + +[[package]] +name = "unicode-xid" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" + +[[package]] +name = "walkdir" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +dependencies = [ + "same-file", + "winapi", + "winapi-util", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/manage/Cargo.toml b/manage/Cargo.toml new file mode 100644 index 0000000..ab63898 --- /dev/null +++ b/manage/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "manage" +version = "0.1.0" +authors = ["Folyd "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +tera = { version = "1.12", default-features = false } diff --git a/manage/src/main.rs b/manage/src/main.rs new file mode 100644 index 0000000..37edef5 --- /dev/null +++ b/manage/src/main.rs @@ -0,0 +1,46 @@ +//! Build manage directory html pages. + +use std::{error::Error, fs, io::Write, path::PathBuf}; + +use tera::{Context, Tera}; + +pub type Result = std::result::Result>; + +const TEMPLATES: [&str; 3] = ["index.html", "crates.html", "settings.html"]; +const ASSETS: [&str; 3] = ["css", "js", "static"]; +const BUILD_DIR: &str = "../extension/manage"; + +fn main() -> Result<()> { + copy_asset()?; + + let tera = Tera::new("templates/*.html")?; + let context = Context::new(); + for template in TEMPLATES.iter() { + let mut buf = vec![]; + tera.render_to(template, &context, &mut buf)?; + let path = format!("{}/{}", BUILD_DIR, template); + fs::File::create(&path)?.write_all(&buf)?; + } + Ok(()) +} + +fn copy_asset() -> Result<()> { + for asset in ASSETS.iter() { + let path = format!("templates/{}", asset); + for entry in fs::read_dir(&path)? { + let entry = entry?; + let from = entry.path(); + if let Some(file_name) = from.file_name() { + let mut to = PathBuf::new(); + to.push(format!("{}/{}", BUILD_DIR, asset)); + if !to.exists() { + fs::create_dir_all(&to)?; + } + + to.push(file_name.to_string_lossy().to_string()); + fs::copy(from, to)?; + } + } + } + Ok(()) +} diff --git a/extension/manage/crates.html b/manage/templates/base.html similarity index 79% rename from extension/manage/crates.html rename to manage/templates/base.html index 32dd801..4ce7eb2 100644 --- a/extension/manage/crates.html +++ b/manage/templates/base.html @@ -5,14 +5,15 @@ Rust Search Extension - + - - + + + {% block head %} + {% endblock %} -
@@ -25,13 +26,12 @@ -
    -
+ {% block content %} + {% endblock %}
- - + {% block js %} + {% endblock %} - \ No newline at end of file diff --git a/manage/templates/crates.html b/manage/templates/crates.html new file mode 100644 index 0000000..e09794e --- /dev/null +++ b/manage/templates/crates.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} + +{% block content %} +
    +{% endblock %} + +{% block js %} + + +{% endblock %} diff --git a/extension/libs/balloon.min.css b/manage/templates/css/balloon.min.css similarity index 100% rename from extension/libs/balloon.min.css rename to manage/templates/css/balloon.min.css diff --git a/extension/libs/calendar-heatmap.css b/manage/templates/css/calendar-heatmap.css similarity index 100% rename from extension/libs/calendar-heatmap.css rename to manage/templates/css/calendar-heatmap.css diff --git a/extension/libs/charts.css b/manage/templates/css/charts.css similarity index 100% rename from extension/libs/charts.css rename to manage/templates/css/charts.css diff --git a/extension/manage/index.css b/manage/templates/css/index.css similarity index 100% rename from extension/manage/index.css rename to manage/templates/css/index.css diff --git a/extension/manage/text.css b/manage/templates/css/text.css similarity index 100% rename from extension/manage/text.css rename to manage/templates/css/text.css diff --git a/manage/templates/index.html b/manage/templates/index.html new file mode 100644 index 0000000..9919483 --- /dev/null +++ b/manage/templates/index.html @@ -0,0 +1,62 @@ +{% extends "base.html" %} + +{% block head %} + + + + + + + +{% endblock head %} + +{% block content %} +
    +
    +
    +
    + 0 searches in total since the first day, approximately saved 0 seconds. + + info + +
    +
    +
    +
    +
    +
    +
      +
    +
    +
    +
    +
    +
    +

    Searches per weekday

    +
    +
    +
    +

    Searches per day of month

    +
    +
    +
    +

    Searches per hour (local time)

    +
    +
    +
    + +
    +

    Top searched crates

    +
    +
    +
    +
    +
    +{% endblock %} + +{% block js %} + + + + +{% endblock %} diff --git a/extension/libs/bar-chart.js b/manage/templates/js/bar-chart.js similarity index 100% rename from extension/libs/bar-chart.js rename to manage/templates/js/bar-chart.js diff --git a/extension/libs/calendar-heatmap.js b/manage/templates/js/calendar-heatmap.js similarity index 100% rename from extension/libs/calendar-heatmap.js rename to manage/templates/js/calendar-heatmap.js diff --git a/extension/libs/charts.js b/manage/templates/js/charts.js similarity index 100% rename from extension/libs/charts.js rename to manage/templates/js/charts.js diff --git a/extension/manage/crates.js b/manage/templates/js/crates.js similarity index 100% rename from extension/manage/crates.js rename to manage/templates/js/crates.js diff --git a/extension/libs/d3.min.js b/manage/templates/js/d3.min.js similarity index 100% rename from extension/libs/d3.min.js rename to manage/templates/js/d3.min.js diff --git a/extension/manage/index.js b/manage/templates/js/index.js similarity index 100% rename from extension/manage/index.js rename to manage/templates/js/index.js diff --git a/extension/libs/moment.min.js b/manage/templates/js/moment.min.js similarity index 100% rename from extension/libs/moment.min.js rename to manage/templates/js/moment.min.js diff --git a/extension/manage/settings.js b/manage/templates/js/settings.js similarity index 100% rename from extension/manage/settings.js rename to manage/templates/js/settings.js diff --git a/manage/templates/settings.html b/manage/templates/settings.html new file mode 100644 index 0000000..ed92a50 --- /dev/null +++ b/manage/templates/settings.html @@ -0,0 +1,45 @@ +{% extends "base.html" %} + +{% block content %} +
    +
    + Enable auto update + + info + + +
    +
    +
    +
    + Enable offline mode + + info + + +
    + + +
    +
    + + +
    +
    +{% endblock %} + +{% block js %} + + + + +{% endblock %} \ No newline at end of file diff --git a/extension/manage/info.svg b/manage/templates/static/info.svg similarity index 100% rename from extension/manage/info.svg rename to manage/templates/static/info.svg