sv/en toggle
This commit is contained in:
parent
20d21d09a4
commit
d5c1fe2d60
6
content/blog/_index.sv.md
Normal file
6
content/blog/_index.sv.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
+++
|
||||||
|
title = "Blog"
|
||||||
|
sort_by = "date"
|
||||||
|
weight = 5
|
||||||
|
+++
|
||||||
|
|
41
content/contact.sv.md
Normal file
41
content/contact.sv.md
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
+++
|
||||||
|
title = "Contact"
|
||||||
|
description = "How to get in contact"
|
||||||
|
weight = 10
|
||||||
|
template = "contact.html"
|
||||||
|
[extra]
|
||||||
|
disable_toc = true
|
||||||
|
+++
|
||||||
|
|
||||||
|
<div class="contact-form">
|
||||||
|
<div class="first-container">
|
||||||
|
<div class="info-container">
|
||||||
|
<div><img class="icon" />
|
||||||
|
<h3>Address</h3>
|
||||||
|
<p>Mada Center 8th floor, 379 Hudson St, New York, NY 10018 US</p>
|
||||||
|
</div>
|
||||||
|
<div> <img class="icon" />
|
||||||
|
<h3>Lets Talk</h3>
|
||||||
|
<p>+1 800 1236879</p>
|
||||||
|
</div>
|
||||||
|
<div><img class="icon" />
|
||||||
|
<h3>General Support</h3>
|
||||||
|
<p>contact@example.com</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="second-container">
|
||||||
|
<h2>Send Us A Message</h2>
|
||||||
|
<form>
|
||||||
|
<div class="form-group"><label for="name-input">Tell us your name*</label><input id="name-input" type="text"
|
||||||
|
placeholder="First name" required="required" /><input type="text" placeholder="Last name"
|
||||||
|
required="required" /></div>
|
||||||
|
<div class="form-group"><label for="email-input">Enter your email*</label><input id="email-input" type="text"
|
||||||
|
placeholder="Eg. example@email.com" required="required" /></div>
|
||||||
|
<div class="form-group"><label for="phone-input">Enter phone number*</label><input id="phone-input" type="text"
|
||||||
|
placeholder="Eg. +1 800 000000" required="required" /></div>
|
||||||
|
<div class="form-group"><label for="message-textarea">Message</label><textarea id="message-textarea"
|
||||||
|
placeholder="Write us a message"></textarea></div><button>Send message</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
14
content/it.sv.md
Normal file
14
content/it.sv.md
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
+++
|
||||||
|
title = "IT"
|
||||||
|
description = "IT Services and Consulting"
|
||||||
|
weight = 3
|
||||||
|
+++
|
||||||
|
|
||||||
|
## TODO
|
||||||
|
|
||||||
|
```rust
|
||||||
|
fn main() {
|
||||||
|
println!("Hello, World!");
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
14
content/software.sv.md
Normal file
14
content/software.sv.md
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
+++
|
||||||
|
title = "Software"
|
||||||
|
description = "Software Development Consulting"
|
||||||
|
weight = 1
|
||||||
|
+++
|
||||||
|
|
||||||
|
## TODO
|
||||||
|
|
||||||
|
```rust
|
||||||
|
fn main() {
|
||||||
|
println!("Hello, World!");
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
|
@ -1,6 +1,6 @@
|
||||||
{% macro render_header() %}
|
{% macro render_header(path) %}
|
||||||
{% set section = get_section(path="_index.md") %}
|
{% set root = get_section(path="_index.md") %}
|
||||||
<a href="{{ section.permalink | safe }}">
|
<a href="{{ root.permalink | safe }}">
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
<img src="{{ get_url(path=config.extra.juice_logo_path) }}" alt="logo">
|
<img src="{{ get_url(path=config.extra.juice_logo_path) }}" alt="logo">
|
||||||
{{ config.extra.juice_logo_name }}
|
{{ config.extra.juice_logo_name }}
|
||||||
|
@ -15,14 +15,29 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
{% for page in section.pages %}
|
{% for page in root.pages %}
|
||||||
|
{% if lang == "en" %}
|
||||||
<a class="nav-item subtitle-text" href="{{ page.permalink | safe }}">{{ page.title }}</a>
|
<a class="nav-item subtitle-text" href="{{ page.permalink | safe }}">{{ page.title }}</a>
|
||||||
|
{% else %}
|
||||||
|
<a class="nav-item subtitle-text" href="/{{lang}}{{ page.path }}">{{ page.title }}</a>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% for path in section.subsections %}
|
{% for path in root.subsections %}
|
||||||
{% set child = get_section(path=path) %}
|
{% set child = get_section(path=path) %}
|
||||||
<a class="nav-item subtitle-text" href="{{ child.permalink }}">{{ child.title }}</a>
|
{% if lang == "en"%}
|
||||||
|
<a class="nav-item subtitle-text" href="{{ child.permalink | safe }}">{{ child.title }}</a>
|
||||||
|
{% else %}
|
||||||
|
<a class="nav-item subtitle-text" href="/{{lang}}{{ child.path }}">{{ child.title }}</a>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
{% if lang == "en"%}
|
||||||
|
<a class="nav-item subtitle-text" href="/sv{{ path }}">sv</a>
|
||||||
|
{% else %}
|
||||||
|
<a class="nav-item subtitle-text" href="{{ path }}">en</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
{% block header %}
|
{% block header %}
|
||||||
<header class="box-shadow">
|
<header class="box-shadow">
|
||||||
{{ macros::render_header() }}
|
{{ macros::render_header(path=page.path) }}
|
||||||
</header>
|
</header>
|
||||||
{% endblock header %}
|
{% endblock header %}
|
||||||
|
|
||||||
|
|
|
@ -23,50 +23,59 @@
|
||||||
|
|
||||||
{% endblock head %}
|
{% endblock head %}
|
||||||
|
|
||||||
|
<body>
|
||||||
|
{% block header %}
|
||||||
|
|
||||||
<div class="hero">
|
<header class="pos-absolute" style="background-color: transparent">
|
||||||
|
{{ macros::render_header(path = section.path ) }}
|
||||||
|
</header>
|
||||||
|
|
||||||
{% block hero %}
|
<div class="hero">
|
||||||
|
|
||||||
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
{% block hero %}
|
||||||
<section class="text-center">
|
|
||||||
<h1 class="heading-text" style="font-size: 50px">
|
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
||||||
{{ config.extra.slogan }}
|
<section class="text-center">
|
||||||
</h1>
|
<h1 class="heading-text" style="font-size: 50px">
|
||||||
<h3 class="title-text">
|
{{ config.extra.slogan }}
|
||||||
{{ section.extra.intro | safe }}
|
</h1>
|
||||||
</h3>
|
<h3 class="title-text">
|
||||||
<div>
|
{{ section.extra.intro | safe }}
|
||||||
<!-- <a class="github-button" href="https://github.com/huhu/juice" data-size="large" data-show-count="true" -->
|
</h3>
|
||||||
<!-- aria-label="Star huhu/juice on GitHub">Star</a> -->
|
<div>
|
||||||
<!-- <a class="github-button" href="https://github.com/huhu/juice/fork" data-size="large" data-show-count="true" -->
|
<!-- <a class="github-button" href="https://github.com/huhu/juice" data-size="large" data-show-count="true" -->
|
||||||
<!-- aria-label="Fork huhu/juice on GitHub">Repos</a> -->
|
<!-- aria-label="Star huhu/juice on GitHub">Star</a> -->
|
||||||
|
<!-- <a class="github-button" href="https://github.com/huhu/juice/fork" data-size="large" data-show-count="true" -->
|
||||||
|
<!-- aria-label="Fork huhu/juice on GitHub">Repos</a> -->
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<img class="hero-image" style="width: 50%" src="{{ get_url(path='build-blocks.svg') }}">
|
||||||
|
|
||||||
|
<div class="explore-more text" onclick="document.getElementById('features').scrollIntoView({behavior: 'smooth'})">
|
||||||
|
Explore More ⇩
|
||||||
</div>
|
</div>
|
||||||
</section>
|
<style>
|
||||||
<img class="hero-image" style="width: 50%" src="{{ get_url(path='build-blocks.svg') }}">
|
|
||||||
|
|
||||||
<div class="explore-more text" onclick="document.getElementById('features').scrollIntoView({behavior: 'smooth'})">
|
|
||||||
Explore More ⇩
|
|
||||||
</div>
|
|
||||||
<style>
|
|
||||||
.hero section {
|
|
||||||
padding: 0 5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: 768px) {
|
|
||||||
.hero section {
|
.hero section {
|
||||||
padding: 0 2rem;
|
padding: 0 5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hero-image {
|
@media screen and (max-width: 768px) {
|
||||||
display: none
|
.hero section {
|
||||||
|
padding: 0 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-image {
|
||||||
|
display: none
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
</style>
|
||||||
</style>
|
|
||||||
|
|
||||||
{% endblock hero %}
|
{% endblock hero %}
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endblock header %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
22
templates/page.html
Normal file
22
templates/page.html
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{% import "_macros.html" as macros %}
|
||||||
|
{% extends "index.html" %}
|
||||||
|
|
||||||
|
{% block title %}{{ page.title }} | {{ super() }} {% endblock title %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block header %}
|
||||||
|
<header class="box-shadow">
|
||||||
|
{% if lang =="en" %}
|
||||||
|
{% set path = [""] | concat(with=page.components) | join(sep="/") %}
|
||||||
|
{% else %}
|
||||||
|
{% set path = [""] | concat(with=page.components | slice(start=1)) | join(sep="/") %}
|
||||||
|
{% endif %}
|
||||||
|
{{ macros::render_header(path=path) }}
|
||||||
|
</header>
|
||||||
|
{% endblock header %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
<div class="heading-text">{{ page.description }}</div>
|
||||||
|
{{ page.content | safe }}
|
||||||
|
{% endblock content %}
|
|
@ -5,7 +5,13 @@
|
||||||
|
|
||||||
{% block header %}
|
{% block header %}
|
||||||
<header class="box-shadow">
|
<header class="box-shadow">
|
||||||
{{ macros::render_header() }}
|
{% if lang =="en" %}
|
||||||
|
{% set path = [""] | concat(with=section.components) | join(sep="/") %}
|
||||||
|
{% else %}
|
||||||
|
{% set path = [""] | concat(with=section.components | slice(start=1)) | join(sep="/") %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{{ macros::render_header(path=path) }}
|
||||||
</header>
|
</header>
|
||||||
{% endblock header %}
|
{% endblock header %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue