2
0
mirror of https://github.com/offen/website.git synced 2024-11-22 17:10:29 +01:00

Merge pull request #136 from offen/development

add localize section to index
This commit is contained in:
Hendrik Niefeld 2021-02-01 10:22:10 +01:00 committed by GitHub
commit c8bee4802f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 54 additions and 37 deletions

View File

@ -1,5 +1,7 @@
import os
from datetime import datetime
from pelican_decorate_content import decorate_content
# If your site is available via HTTPS, make sure SITEURL begins with https://
RELATIVE_URLS = False
@ -45,7 +47,7 @@ PAGE_SAVE_AS = '{slug}/index.html'
ARTICLE_SAVE_AS = 'blog/{slug}/index.html'
PLUGIN_PATHS = ['./plugins']
PLUGINS = ['decorate_content', 'assets']
PLUGINS = [decorate_content, 'assets']
MARKDOWN = {
'extension_configs': {

View File

@ -1 +0,0 @@
from .decorate_content import *

View File

@ -1,33 +0,0 @@
from json import loads
from pelican import signals
from pelican.contents import Article, Page, Static
from bs4 import BeautifulSoup
def content_object_init(instance):
if isinstance(instance, (Article, Page, Static)):
plugin_settings = instance.settings.get("DECORATE_CONTENT", {})
content_overrides = (
instance.metadata.get("decorate_content", None)
if instance.metadata is not None
else None
)
settings = plugin_settings.copy()
settings.update(
loads(content_overrides) if content_overrides is not None else {}
)
soup = BeautifulSoup(instance._content, "html.parser")
for selector, class_names in settings.items():
elems = soup.select(selector)
for elem in elems:
elem["class"] = elem.get("class", []) + class_names
instance._content = soup.decode()
def register():
signals.content_object_init.connect(content_object_init)

View File

@ -1,4 +1,4 @@
pelican==4.5.3
pelican==4.5.4
markdown==3.1.1
git+git://github.com/miracle2k/webassets#d1f3455e383446ca4ab0c644f326ee937e68e809
beautifulsoup4==4.8.1
pelican-decorate-content==0.1.1

View File

@ -120,6 +120,7 @@ LAYOUT
.hx-compare-c,
.hx-compare-d,
.hx-metrics,
.hx-localize,
.hx-difference {
height: 100%;
}
@ -161,6 +162,9 @@ LAYOUT
.hx-metrics {
height: 132rem;
}
.hx-localize {
height: 19rem;
}
.hx-difference {
height: 33rem;
}
@ -464,6 +468,11 @@ STACKING IMAGES
left: calc(100% - 10rem);
z-index : 550;
}
.bg-localize {
top: -7rem;
left: 3rem;
z-index : 560;
}
.bg-cta-pfeil {
top: -13rem;
left: 66%;
@ -485,6 +494,10 @@ STACKING IMAGES
top: 11rem;
left: calc(100% - 30rem);
}
.bg-localize {
top: -7rem;
left: calc(100% - 25rem);
}
.bg-cta-pfeil {
top: -14rem;
left: 72%;
@ -501,6 +514,10 @@ STACKING IMAGES
top: -3rem;
left: calc(100% - 20rem);
}
.bg-localize {
top: -2rem;
left: 35rem;
}
.bg-cta-pfeil {
top: -12rem;
left: 66%;

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

View File

@ -504,6 +504,38 @@
</div>
</div>
<!-- LOCALIZE -->
<div class="w-100">
<div class="w-100 hx-localize dib cclr-bg-white-fade">
<div class="h-100 bg-pattern">
<div class="relative">
<div class="absolute bg-localize">
<img src="/theme/images/gfx-localize.png" alt="smile" width="300px" height="150px">
</div>
</div>
<div class="wx24-metrics center">
<p class="f25 lh-solid ma0 ml0 ml5-l mt5 mb4">
<em>
Localize
</em>
</p>
<p class="ma0 ml0 ml5-l w-100 w-50-l mb2">
<i>Offen is currently available in</i> English and German.
</p>
<p class="ma0 ml0 ml5-l w-100 w-50-l mb5">
<i>Our</i> consent banner and the Auditorium <i>for operators as well as users can be displayed</i> in the respective locale.
</p>
</div>
</div>
</div>
</div>
<!-- TABLE -->
<div class="w-100">