Browse Source

page

master
Xsivax 3 years ago
parent
commit
8c3a8a7ff9
9 changed files with 130 additions and 20 deletions
  1. +5
    -4
      src/build_rocket/get.rs
  2. +15
    -0
      src/build_rocket/templates.rs
  3. +7
    -0
      templates/assets/css/base.css
  4. +0
    -7
      templates/assets/css/index.css
  5. +68
    -0
      templates/assets/css/pages.css
  6. BIN
      templates/assets/img/hemp_1.JPG
  7. BIN
      templates/assets/img/hemp_field.JPG
  8. +29
    -3
      templates/hemp.html.tera
  9. +6
    -6
      templates/nav.html.tera

+ 5
- 4
src/build_rocket/get.rs View File

@ -1,13 +1,13 @@
// Responder Type NamedFile
// serve file with Content-Type based on name
use rocket::fs::NamedFile;
// Error type 404
use rocket::response::status::NotFound;
use crate::build_rocket::{ templates };
use rocket_dyn_templates::Template;
// Add Error Handling
// To Do: Work with Accept Language Header, return matching Template
// dynamic routes (i.e /de)
#[get("/")]
@ -20,8 +20,9 @@ use rocket_dyn_templates::Template;
// serve other pages (html GET)
// create routes for main pages
#[get("/hemp")]
pub async fn hemp() -> Result<NamedFile, NotFound<String>> {
NamedFile::open("templates/experiments.html").await.map_err(|e|NotFound(e.to_string()))
pub async fn hemp() -> Template {
let context = templates::TplPages::new();
Template::render("hemp", &context)
}
#[get("/spider")]

+ 15
- 0
src/build_rocket/templates.rs View File

@ -23,9 +23,24 @@ impl TplIndexDe {
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
#[derive(Serialize)]
pub struct TplPrivacy {

+ 7
- 0
templates/assets/css/base.css View File

@ -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;
padding: 0;

+ 0
- 7
templates/assets/css/index.css View File

@ -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 */
.height {

+ 68
- 0
templates/assets/css/pages.css View 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 View File

Before After
Width: 2976  |  Height: 1984  |  Size: 576 KiB

BIN
templates/assets/img/hemp_field.JPG View File

Before After
Width: 2976  |  Height: 1984  |  Size: 719 KiB

+ 29
- 3
templates/hemp.html.tera View File

@ -1,9 +1,35 @@
{%extends "base"%}
{%block title %}Cannabinieri CBD{%endblock title %}
{%block title %} {{ title[0] }} {%endblock title %}
{%block head%}
{{super()}}
<link rel="stylesheet" type="text/css" href="css/index.css" />
<link rel="stylesheet" type="text/css" href="../css/pages.css" />
{%endblock head%}
{%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%}

+ 6
- 6
templates/nav.html.tera View File

@ -19,15 +19,15 @@
<div id="mobile_dropdown">
<ul>
<li>
<a type="text/html" href="/experiments">HANF</a>
<a type="text/html" href="/hemp">HANF</a>
<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">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width=".75" d="M19 9l-7 7-7-7"></path>
</svg>
</span>
<ul class="down" id ="down_1">
<li><a type="text/html" href="/experiments/oil">Öle</a></li>
<li><a type="text/html" href="/experiments/flower">Blüten</a></li>
<li><a type="text/html" href="/hemp/oil">Öle</a></li>
<li><a type="text/html" href="/hemp/flower">Blüten</a></li>
</ul>
</li>
</ul>
@ -72,10 +72,10 @@
<!--desktop nav-->
<nav class="desktop_navigation">
<ul>
<li><a type="text/html" href="/experiments"> HANF </a>
<li><a type="text/html" href="/hemp"> HANF </a>
<ul id="experiments">
<li><a type="text/html" href="/experiments/oil">Öle</a></li>
<li><a type="text/html" href="/experiments/flower">Blüten</a></li>
<li><a type="text/html" href="/hemp/oil">Öle</a></li>
<li><a type="text/html" href="/hemp/flower">Blüten</a></li>
</ul>
</li>
</ul>

Loading…
Cancel
Save