page
This commit is contained in:
parent
4ae0c103ed
commit
8c3a8a7ff9
9 changed files with 131 additions and 21 deletions
|
@ -1,13 +1,13 @@
|
||||||
// Responder Type NamedFile
|
// Responder Type NamedFile
|
||||||
// serve file with Content-Type based on name
|
// serve file with Content-Type based on name
|
||||||
use rocket::fs::NamedFile;
|
use rocket::fs::NamedFile;
|
||||||
// Error type 404
|
|
||||||
use rocket::response::status::NotFound;
|
|
||||||
|
|
||||||
use crate::build_rocket::{ templates };
|
use crate::build_rocket::{ templates };
|
||||||
|
|
||||||
use rocket_dyn_templates::Template;
|
use rocket_dyn_templates::Template;
|
||||||
|
|
||||||
|
// Add Error Handling
|
||||||
|
|
||||||
// To Do: Work with Accept Language Header, return matching Template
|
// To Do: Work with Accept Language Header, return matching Template
|
||||||
// dynamic routes (i.e /de)
|
// dynamic routes (i.e /de)
|
||||||
#[get("/")]
|
#[get("/")]
|
||||||
|
@ -20,8 +20,9 @@ use rocket_dyn_templates::Template;
|
||||||
// serve other pages (html GET)
|
// serve other pages (html GET)
|
||||||
// create routes for main pages
|
// create routes for main pages
|
||||||
#[get("/hemp")]
|
#[get("/hemp")]
|
||||||
pub async fn hemp() -> Result<NamedFile, NotFound<String>> {
|
pub async fn hemp() -> Template {
|
||||||
NamedFile::open("templates/experiments.html").await.map_err(|e|NotFound(e.to_string()))
|
let context = templates::TplPages::new();
|
||||||
|
Template::render("hemp", &context)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[get("/spider")]
|
#[get("/spider")]
|
||||||
|
|
|
@ -23,9 +23,24 @@ impl TplIndexDe {
|
||||||
lang: String::from("de"),
|
lang: String::from("de"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// add language handling to pages
|
||||||
|
#[derive(Serialize)]
|
||||||
|
pub struct TplPages {
|
||||||
|
pub title: Value,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl TplPages {
|
||||||
|
pub fn new() -> TplPages {
|
||||||
|
TplPages {
|
||||||
|
title: json!(["Hanf"]),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// context privacy-policy
|
// context privacy-policy
|
||||||
#[derive(Serialize)]
|
#[derive(Serialize)]
|
||||||
pub struct TplPrivacy {
|
pub struct TplPrivacy {
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Lato', sans-serif;
|
||||||
|
src: url('fonts/Lato-Thin.ttf') format('truetype');
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 100;
|
||||||
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
@font-face {
|
|
||||||
font-family: 'Lato', sans-serif;
|
|
||||||
src: url('fonts/Lato-Thin.ttf') format('truetype');
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* small mobile */
|
/* small mobile */
|
||||||
|
|
||||||
.height {
|
.height {
|
||||||
|
|
68
templates/assets/css/pages.css
Normal file
68
templates/assets/css/pages.css
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
.container {
|
||||||
|
height: calc(100% -30vh);
|
||||||
|
width: 100vw;
|
||||||
|
font-family: 'Lato', sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content_container {
|
||||||
|
display: grid;
|
||||||
|
justify-items: center;
|
||||||
|
padding: 1vh 1vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content_container img {
|
||||||
|
grid-row: 2;
|
||||||
|
grid-column: 1/2;
|
||||||
|
height: 80vw;
|
||||||
|
width: 80vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content_container h1 {
|
||||||
|
grid-row: 1;
|
||||||
|
color: #333;
|
||||||
|
font-size: 8vh;
|
||||||
|
text-transform: uppercase;
|
||||||
|
padding: 1vh 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content_container h1 span {
|
||||||
|
opacity: 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content_container p {
|
||||||
|
grid-row: 2/3;
|
||||||
|
grid-column: 1/2;
|
||||||
|
text-align: center;
|
||||||
|
background-color: rgba(255, 255, 255, 0.5);
|
||||||
|
margin-top: 25vh;
|
||||||
|
color: #333;
|
||||||
|
font-size: 2.5vh;
|
||||||
|
padding: 2vh 2vw;
|
||||||
|
letter-spacing: .1vw;
|
||||||
|
line-height: 4vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content_container a {
|
||||||
|
grid-row: 3;
|
||||||
|
text-decoration: none;
|
||||||
|
background-color: rgba(61, 189, 146, 1);
|
||||||
|
opacity: 80%;
|
||||||
|
color: #eee;
|
||||||
|
padding: 2vh 7vw;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: .35vw;
|
||||||
|
transition: all ease .4s;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.content_container a:active {
|
||||||
|
box-shadow: 0px 0px 10px #63caa7;
|
||||||
|
}
|
||||||
|
|
||||||
|
#withbutton {
|
||||||
|
padding-bottom: 4vh;
|
||||||
|
}
|
BIN
templates/assets/img/hemp_1.JPG
Normal file
BIN
templates/assets/img/hemp_1.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 576 KiB |
BIN
templates/assets/img/hemp_field.JPG
Normal file
BIN
templates/assets/img/hemp_field.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 719 KiB |
|
@ -1,9 +1,35 @@
|
||||||
{%extends "base"%}
|
{%extends "base"%}
|
||||||
{%block title %}Cannabinieri CBD{%endblock title %}
|
{%block title %} {{ title[0] }} {%endblock title %}
|
||||||
{%block head%}
|
{%block head%}
|
||||||
{{super()}}
|
{{super()}}
|
||||||
<link rel="stylesheet" type="text/css" href="css/index.css" />
|
<link rel="stylesheet" type="text/css" href="../css/pages.css" />
|
||||||
{%endblock head%}
|
{%endblock head%}
|
||||||
{%block content%}
|
{%block content%}
|
||||||
<h1>Hemp</h1>
|
<div class ="container">
|
||||||
|
<div class ="content_container">
|
||||||
|
<img src="../img/bliss.JPG">
|
||||||
|
<h1>Hanf</h1>
|
||||||
|
<p>Unsere Mission ist konsequent biologisches CBD anzubauen und mit Hilfe von Technik mehr über sie zu.<br>
|
||||||
|
All unsere Produkte sind Experimente die Auswirkungen von Wechselwirkungen in unserem Ökosystem erforschen.
|
||||||
|
Unser Dünger sind unsere Partnerpflanzen und Insekten sind unsere Helfer gegen Schädlinge.
|
||||||
|
<br>Entdecke unser erstes Experiment !</p>
|
||||||
|
</div>
|
||||||
|
<div class ="content_container" id="withbutton">
|
||||||
|
<img src="../img/bliss.JPG">
|
||||||
|
<h1><span>CBD </span>Öl</h1>
|
||||||
|
<p>Unsere CBD Pflanzen verarbeiten wir selbst zu Vollspektrum Ölen. Jedes ein Unikat, wie die Experimente.
|
||||||
|
Unsere ersten Öle gewinnen wir durch Extraktion mit Trinkalkohol und natürlich ohne artifizielle Zusätze.
|
||||||
|
Wir experimentieren mit verschiedenen Trägerölen und Konzentration.
|
||||||
|
<br>Entdecke mehr über unsere Öle !<br>
|
||||||
|
</p>
|
||||||
|
<a href="hemp/oil">Mehr</a>
|
||||||
|
</div>
|
||||||
|
<div class ="content_container" id="withbutton">
|
||||||
|
<img src="../img/hemp_1.JPG">
|
||||||
|
<h1><span>CBD</span> Blüten</h1>
|
||||||
|
<p>Unsere Ziel ist es unsere Experimente auch als Blüten anzubieten. Der Verkauf und die Einfuhr von Blüten ist für uns und viele andere Firmen, die ins CBD Business einsteigen wollen ohne rechtliche Absicherung zu riskant.
|
||||||
|
Hier findest du mehr zu unseren Blüten, aus denen wir auch unsere Öle herstellen. </p>
|
||||||
|
<a href="hemp/flower">Mehr</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{%endblock content%}
|
{%endblock content%}
|
|
@ -19,15 +19,15 @@
|
||||||
<div id="mobile_dropdown">
|
<div id="mobile_dropdown">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a type="text/html" href="/experiments">HANF</a>
|
<a type="text/html" href="/hemp">HANF</a>
|
||||||
<span class="drop">
|
<span class="drop">
|
||||||
<svg type="image/svg+xml" id="chevron_1" class="chevron" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
<svg type="image/svg+xml" id="chevron_1" class="chevron" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width=".75" d="M19 9l-7 7-7-7"></path>
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width=".75" d="M19 9l-7 7-7-7"></path>
|
||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
<ul class="down" id ="down_1">
|
<ul class="down" id ="down_1">
|
||||||
<li><a type="text/html" href="/experiments/oil">Öle</a></li>
|
<li><a type="text/html" href="/hemp/oil">Öle</a></li>
|
||||||
<li><a type="text/html" href="/experiments/flower">Blüten</a></li>
|
<li><a type="text/html" href="/hemp/flower">Blüten</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -72,10 +72,10 @@
|
||||||
<!--desktop nav-->
|
<!--desktop nav-->
|
||||||
<nav class="desktop_navigation">
|
<nav class="desktop_navigation">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a type="text/html" href="/experiments"> HANF </a>
|
<li><a type="text/html" href="/hemp"> HANF </a>
|
||||||
<ul id="experiments">
|
<ul id="experiments">
|
||||||
<li><a type="text/html" href="/experiments/oil">Öle</a></li>
|
<li><a type="text/html" href="/hemp/oil">Öle</a></li>
|
||||||
<li><a type="text/html" href="/experiments/flower">Blüten</a></li>
|
<li><a type="text/html" href="/hemp/flower">Blüten</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in a new issue