diff --git a/src/build_actix/route.rs b/src/build_actix/route.rs index 9398802..ce34bdd 100644 --- a/src/build_actix/route.rs +++ b/src/build_actix/route.rs @@ -14,7 +14,7 @@ pub async fn index( req: HttpRequest ) -> Result { .content_type("text/html") // set response body to template context .body( - // render template context + // render index template template::TplIndex { // lang to value of Accept-Language header lang : &template::get_lang(&req), @@ -131,4 +131,7 @@ pub async fn off( req: HttpRequest ) -> Result { error::crash( template::get_lang(&req), "error_tplrender" ) })?, ).await -} \ No newline at end of file +} + + + diff --git a/src/build_actix/template.rs b/src/build_actix/template.rs index f2af12c..1297f85 100644 --- a/src/build_actix/template.rs +++ b/src/build_actix/template.rs @@ -8,10 +8,13 @@ use actix_web::HttpRequest; // define path to use template in #[template(path="index.html")] pub struct TplIndex<'a> { - // replace with lang + pub lang: &'a str, } + + + #[derive(Template)] // define path to use template in #[template(path="hemp.html")] diff --git a/templates/assets/css/box.css b/templates/assets/css/box.css new file mode 100644 index 0000000..f5de7e1 --- /dev/null +++ b/templates/assets/css/box.css @@ -0,0 +1,12 @@ +.box { + z-index: 1000; + position: fixed; + max-height: 60vh; + max-width: 80vw; + top: 680px; + left: 155px; + display: flex; + margin: 0; + background-color: fuchsia; + opacity: 85%; +} \ No newline at end of file diff --git a/templates/assets/css/net.css b/templates/assets/css/net.css deleted file mode 100644 index 6e2418f..0000000 --- a/templates/assets/css/net.css +++ /dev/null @@ -1,77 +0,0 @@ -svg { - max-height: 90vh; - width: 100%; -} - -.link { - stroke: #000; - stroke-width: 1.5px; - } - - .node { - cursor: move; - stroke: #000; - stroke-width: .07vw; - fill-rule: evenodd; - } - - .node.fixed { - stroke: #30dfdf; - stroke-width: .05vw; - } - - - - /* box */ - - div#box { - position: absolute; - pointer-events: none; - top: 0px; - right: 0px; -} - -/* visibility box */ - -div.box_off { - visibility: hidden; - pointer-events: none; -} - -div.box_on { - visibility: visible; - pointer-events: all; -} - -/* box content */ - -div#box_content { - position: relative; - /* cursor: text; change to something cool */ - width: 50vw; - height: 50vh; - z-index: 1000; - background: #000; - opacity: 85%; - border: solid .2vw #30dfdf; - border-radius: 8px; - font-family: Helvetica, sans-serif; /* change */ - font-size: 2vh; - padding: 2vh 2vw; - text-align: right; - color: #fff; -} - - -/* !! somehow adjust screenwidth for desktop (in js */ -/* @media(min-width: 768px) { - - #mobile_network { - display: none; - } -} */ - - - - - \ No newline at end of file diff --git a/templates/assets/css/nojs_net.css b/templates/assets/css/nojs_net.css index d98196e..a0c8887 100644 --- a/templates/assets/css/nojs_net.css +++ b/templates/assets/css/nojs_net.css @@ -24,7 +24,12 @@ svg { .nodes:active, .nodes:hover { - animation: svg_pulse 2s ease-in-out forwards; + animation: svg_pulse 2s ease-in-out forwards; + +} + +#circle_one:active { + opacity: 100% !important; } @keyframes svg_pulse { @@ -58,27 +63,88 @@ svg { animation: glowing 2s ease-in forwards; } +.group_1:active > #edge_1 { + animation: glowing 2s ease-in forwards; +} + + .group_1:hover > #edge_2 { animation: glowing 2s ease-in forwards; } +.group_1:active > #edge_2 { + animation: glowing 2s ease-in forwards; + +} + + .group_2:hover > #edge_3 { animation: glowing 2s ease-in forwards; } +.group_2:active > #edge_3 { + animation: glowing 2s ease-in forwards; +} + .group_2:hover > #edge_4 { animation: glowing 2s ease-in forwards; } +.group_2:active > #edge_4 { + animation: glowing 2s ease-in forwards; +} + .group_2:hover > #edge_5 { animation: glowing 2s ease-in forwards; } +.group_2:active > #edge_5 { + animation: glowing 2s ease-in forwards; +} + .group_2:hover > #edge_6 { animation: glowing 2s ease-in forwards; } +.group_2:active > #edge_6 { + animation: glowing 2s ease-in forwards; +} + + + +.group_3:hover > #edge_7 { + animation: glowing 2s ease-in forwards; +} + +.group_3:active > #edge_7 { + animation: glowing 2s ease-in forwards; +} + +.group_3:hover > #edge_8 { + animation: glowing 2s ease-in forwards; +} + +.group_3:active > #edge_8 { + animation: glowing 2s ease-in forwards; +} + +.group_4:hover > #edge_9 { + animation: glowing 2s ease-in forwards; +} + +.group_4:active > #edge_9 { + animation: glowing 2s ease-in forwards; +} + +.group_5:hover > #edge_10 { + animation: glowing 2s ease-in forwards; +} + +.group_5:active > #edge_10 { + animation: glowing 2s ease-in forwards; +} + @keyframes glowing { diff --git a/templates/assets/img/sample-permapp-screen.webp b/templates/assets/img/sample-permapp-screen.webp new file mode 100644 index 0000000..7f5a87e Binary files /dev/null and b/templates/assets/img/sample-permapp-screen.webp differ diff --git a/templates/base.html b/templates/base.html index b7b78d9..5b5d54e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -12,7 +12,6 @@ - Cannabinieri {% endblock %} diff --git a/templates/index.html b/templates/index.html index 09bd407..c77301a 100644 --- a/templates/index.html +++ b/templates/index.html @@ -14,6 +14,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -22,7 +52,7 @@ - + @@ -31,49 +61,42 @@ - + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + - + - - - - - -
- +
+ + {% endblock %} \ No newline at end of file diff --git a/templates/info.html b/templates/info.html new file mode 100644 index 0000000..0d56896 --- /dev/null +++ b/templates/info.html @@ -0,0 +1,11 @@ +{% extends "index.html" %} +{% block head } + +{% endblock %} + +{%block info} +
+ + Logo +
+{% endblock %} \ No newline at end of file