More Theme updates

This commit is contained in:
Patrick Neff 2019-05-05 10:06:20 +02:00
parent 99b9dcad5c
commit 23ced61908
25 changed files with 83 additions and 92 deletions

View File

@ -3,8 +3,8 @@
{{- end -}}
{{- define "main" -}}
<main id="single">
<article>
<main class="row" id="single">
<article class="col-sm-12">
{{- partial "single.html" . -}}
</article>
</main>

View File

@ -17,6 +17,6 @@
{{ $image = index $images 0 }}
{{ end }}
{{ with $image }}
<li class="padding"> {{- partial "catalog.html" (dict "ctx" $ctx "image" . "class" "catalog" "showTitle" true "showDescription" true) -}}
<li class="col-xs-6 col-sm-4"> {{- partial "catalog.html" (dict "ctx" $ctx "image" . "class" "catalog" "showTitle" true "showDescription" true) -}}
</li>
{{ end }}

View File

@ -3,9 +3,9 @@
{{- end -}}
{{ define "main" }}
<main id="list">
<h1 class="padding">{{ .Title }}</h1>
<ul class="list-unstyled flex row gallery">
<main class="row" id="list">
<h1 class="col-xs">{{ .Title }}</h1>
<ul class="list-unstyled row">
{{- range .Sections -}}
{{- .Render "li" -}}
{{- end -}}
@ -14,8 +14,8 @@
{{- end -}}
</ul>
{{- with .Content -}}
<div class="content flex column">
<div class="padding">
<div class="content row">
<div class="col-sm-12">
{{ . }}
</div>
</div>

View File

@ -3,8 +3,8 @@
{{- end -}}
{{- define "main" -}}
<main class="catalog" id="single">
<article id="catalog-article">
<main class="catalog row" id="single">
<article id="catalog-article" class="col-sm-12">
{{- partial "catalog-article.html" . -}}
</article>
</main>

View File

@ -16,7 +16,7 @@
{{ else }}
{{ $image = index $images 0 }}
{{ end }}
{{ with $images }}
<li class="padding"> {{- partial "figure.html" (dict "ctx" $ctx "image" $image "class" "gallery" "showTitle" true "showDescription" true) -}}
{{ with $image }}
<li class="col-xs-6 col-sm-4"> {{- partial "figure.html" (dict "ctx" $ctx "image" . "class" "catalog" "showTitle" true "showDescription" true) -}}
</li>
{{ end }}

10
themes/neff/layouts/gallery/list.html Executable file → Normal file
View File

@ -4,8 +4,10 @@
{{ define "main" }}
<main id="list">
<h1 class="padding">{{ .Title }}</h1>
<ul class="list-unstyled flex row gallery">
<div class="row">
<h1 class="col-xs-12">{{ .Title }}</h1>
</div>
<ul class="list-unstyled row">
{{- range .Sections -}}
{{- .Render "li" -}}
{{- end -}}
@ -14,8 +16,8 @@
{{- end -}}
</ul>
{{- with .Content -}}
<div class="content flex column">
<div class="padding">
<div class="content row">
<div class="col-sm-12">
{{ . }}
</div>
</div>

View File

@ -36,7 +36,7 @@
<a class="anchor" id="{{ i18n "about-us" }}"><h1 class="padding">{{ (replace (replace (i18n "about-us") "-" " ") "ue" "ü") | title}}</h1></a>
<div class="row">
{{- range (first 3 (where .Site.Pages.ByWeight ".Params.type" "ueber-uns")) -}}
<div class="col-xs-4">
<div class="col-xs-12 col-sm-4">
{{- partial "hero.html" . -}}
</div>
{{- end -}}
@ -45,8 +45,8 @@
</div>
<div class="container">
<section id="index-contact">
<div>
<section class="row" id="index-contact">
<div class="col-xs-12">
<a class="anchor" id="{{ i18n "contact" }}"><h1 class="padding">Kontakt</h1></a>
<div class="call-to-action flex row text-center">
<div class="padding">
@ -64,14 +64,14 @@
</div>
<div class="container">
<section id="index-gallery">
<h1 class="padding">
<section class="row" id="index-gallery">
<h1 class="col-xs-12 padding">
<a class="anchor" href="/galerie" id="{{ i18n "gallery" }}">{{ i18n "gallery" | title}}</a>
<span class="small"></span>
</h1>
<ul class="row list-unstyled">
{{- range .Params.galleries }}
<li class="col-xs-4">
<li class="col-xs-12 col-sm-4">
{{- $section := $.Site.GetPage "section" "galerie" -}}
{{- $page := $section.GetPage . -}}
{{- $image := ((index $page.Pages 0).Resources.GetMatch "**.jpg") -}}
@ -79,8 +79,8 @@
</li>
{{- end -}}
</ul>
<div class="padding">
<p class="text-right">
<div class="col-xs-12 end-sm">
<p>
<a href="/galerie"><strong>Alle Galerien</strong></a>
</p>
</div>
@ -88,15 +88,15 @@
</div>
<div class="container">
<section id="index-news">
<h1 class="padding"><a class="anchor" href="/neuigkeiten" id="{{ i18n "news" }}">{{ i18n "news" | title}}</a></h1>
<section class="row" id="index-news">
<h1 class="col-xs-12 padding"><a class="anchor" href="/neuigkeiten" id="{{ i18n "news" }}">{{ i18n "news" | title}}</a></h1>
<ul class="list-unstyled row">
{{- range (first 3 (where .Site.Pages.ByWeight ".Params.type" "news")) -}}
{{- partial "news.html" . -}}
{{- end -}}
</ul>
<div class="padding">
<p class="text-right">
<div class="col-xs-12 end-sm">
<p>
<a href="/neuigkeiten"><strong>Alle Neuigkeiten</strong></a>
</p>
</div>

View File

@ -3,8 +3,8 @@
{{- end -}}
{{- define "main" -}}
<main class="model" id="single">
<article id="model">
<main class="model row" id="single">
<article id="model" class="col-sm-12">
<div id="model-viewer-root"></div>
</article>
</main>

View File

@ -1,4 +1,4 @@
<section class="address col-xs-4">
<section class="address col-xs-12 col-sm-4">
<header>
<h3>{{ .address.address.addressLocality }}</h3>
</header>

View File

@ -6,7 +6,7 @@
{{- with $page -}}
<section id="banner">
<div class="container">
<div id="banner-container" class="padding">
<div id="banner-container" class="col-xs-12">
<h1>{{ .Title }}</h1>
<p>{{ .Params.description }}</p>
<p><a href="{{ .Permalink }}" class="btn btn-primary">{{ i18n "more-info" }}</a></p>

View File

@ -1,5 +1,5 @@
<nav class="breadcrumbs">
<ol class="nav navbar-nav">
<nav class="breadcrumbs row">
<ol class="nav navbar-nav col-xs-12">
{{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
</ol>
{{ define "breadcrumbnav" }}

View File

@ -1,7 +1,7 @@
<header class="flex column padding">
<header class="flex padding">
<h1>{{ .Title }}</h1>
</header>
<div class="content flex column">
<div class="content flex">
<div class="padding">
{{- with .Resources.GetMatch "bilder/*" -}}
{{- $orig := . -}}

View File

@ -1,7 +1,7 @@
<div class="clearfix"></div>
<ul class="list-unstyled flex row gallery">
{{- range .Resources.ByType "image" -}}
<li class="padding">
<li class="col-xs-12 col-sm-4 padding">
{{- partial "figure.html" (dict "image" . "ctx" . "lightbox" true "class" "gallery" "showTitle" true "showDescription" true) }}
</li>
{{- end -}}

View File

@ -1,4 +1,5 @@
<div class="flex row">
<div class="col-xs-12">
<div class="navbar-logo padding">
<a href="{{.Site.BaseURL }}">
<picture>
@ -36,3 +37,4 @@
</div>
</div>
</div>
</div>

View File

@ -1,4 +1,4 @@
<li class="col-xs-4">
<li class="col-xs-12 col-sm-4">
<div>
{{- $site := . -}}
{{- range .Resources.ByType "image" -}}

View File

@ -1,4 +1,4 @@
<header class="flex column padding">
<header class="flex padding">
<h1>{{ .Title }}</h1>
</header>
{{- $resources := .Resources -}}

View File

@ -1,5 +1,5 @@
<h4>{{ i18n "translations" | title }}</h4>
<ul>
<ul class="col-xs-12">
{{- range .Translations -}}
<li>
<a href="{{ .Permalink }}" hreflang="{{ .Language.Lang }}">{{ .Language.LanguageName }}: {{ .Title }}</a>

View File

@ -39,14 +39,14 @@
<div class="clearfix"></div>
{{ with .Inner }}
<ul class="list-unstyled flex row gallery neg-margin">
<ul class="list-unstyled row gallery">
{{ . }}
</ul>
{{ else }}
<ul class="list-unstyled flex row gallery neg-margin">
<ul class="list-unstyled row gallery">
{{ range $.Page.Resources.Match $search }}
{{- if (ne .Params.featured true) -}}
<li class="padding">
<li class="col-xs-6 col-sm-4">
{{- partial "figure.html" (dict "image" . "ctx" . "lightbox" $lightbox "class" "gallery" "showTitle" $title "showDescription" $description "keepOriginal" $keep) -}}
</li>
{{- end -}}

View File

@ -47,7 +47,7 @@
{{ end }}
{{ $image := $.Page.Resources.GetMatch $search }}
{{ if $list }}
<li class="padding">
<li class="col-xs-6 col-sm-4 padding">
{{ end }}
{{ partial "figure.html" (dict "image" $image "ctx" $image "class" $class "lightbox" $lightbox "showTitle" $showTitle "showDescription" $showDescription) }}
{{ if $list }}

View File

@ -1,7 +1,7 @@
/* VARIABLES */
$gutter-width: 0.5rem !default;
$outer-margin: 2rem !default;
$outer-margin: 1rem !default;
$xs-min: 30rem !default;
$sm-min: 48rem !default;
@ -36,16 +36,13 @@ $gutter-compensation: $half-gutter-width * -1;
.container,
.container-fluid {
margin: 0 auto;
}
.container-fluid {
padding: 0 $outer-margin;
}
.row {
@include flex();
flex-direction: row;
margin: $gutter-compensation 0;
margin: 0 $gutter-compensation;
&.reverse {
flex-direction: row-reverse;
@ -180,7 +177,7 @@ $gutter-compensation: $half-gutter-width * -1;
.col-offset-sm-12 {
box-sizing: border-box;
flex: 0 0 auto;
padding: $half-gutter-width 0;
padding: 0 $half-gutter-width;
}
.col-sm {
@ -271,7 +268,7 @@ $gutter-compensation: $half-gutter-width * -1;
.col-offset-lg-12 {
box-sizing: border-box;
flex: 0 0 auto;
padding: $half-gutter-width 0;
padding: 0 $half-gutter-width;
}
.col-lg {
@ -362,7 +359,7 @@ $gutter-compensation: $half-gutter-width * -1;
.col-offset-xl-12 {
box-sizing: border-box;
flex: 0 0 auto;
padding: $half-gutter-width 0;
padding: 0 $half-gutter-width;
}
.col-xl {

View File

@ -184,6 +184,7 @@ table {
background-color: rgba(255, 255, 255, 0.9);
border-radius: $border-radius;
margin-bottom: $gutter-width;
padding: $gutter-width * 0.5 $gutter-width;
&.transparent {
background-color: transparent;
@ -220,7 +221,6 @@ table {
.list-unstyled {
list-style: none;
margin: 0;
padding: 0;
}
@ -343,6 +343,7 @@ figure {
border-radius: $border-radius;
color: black
margin 0 1rem;
line-height: 3rem;
&.btn-small {
padding: .3rem 1rem;
@ -418,13 +419,9 @@ a.btn-primary {
nav.breadcrumbs {
ol {
list-style: none;
padding: 0;
margin: 0;
li {
display: inline-block;
padding: 0;
margin: 0;
&.active {
font-weight: bold;

View File

@ -24,19 +24,10 @@
font-size: 1.1rem;
align-items: flex-start;
background-color: rgba(255, 255, 255, 0.9);
height: 90px;
border-radius: $border-radius;
padding: $gutter-width;
margin: calc(100vh - 310px) -$gutter-width 0 -$gutter-width;
margin: calc(100vh - 280px) -$half-gutter-width 0 auto;
padding: $half-gutter-width $gutter-width;
overflow: hidden;
min-width: 100%;
@media only screen and (min-width: $sm-min) {
margin-top: calc(100vh - 285px);
margin-bottom: -$gutter-width;
margin-right: -$gutter-width;
padding-right: $gutter-width;
}
ul {
list-style: none;

View File

@ -1,16 +1,17 @@
<template>
<article v-if="articleData">
<header class="flex column padding">
<article class="row"v-if="articleData">
<header class="col-xs-12">
<h1>{{ articleData.title }}</h1>
</header>
<div class="content flex column">
<div class="padding">
<div v-if="hasWebGl && articleData.model" class="featured left wide">
<div class="col-xs-12">
<div class="row">
<div v-if="hasWebGl && articleData.model" class="featured col-xs-12 col-sm-8">
<model-viewer :modelData="articleData.model"/>
</div>
<figure v-else class="featured left wide">
<figure v-else class="featured col-xs-12 col-sm-8">
<img alt="" title="" class="" srcset="" sizes="" src="">
</figure>
<div class="col-sm-4 col-xs-12">
<p v-if="hasWebGl && articleData.model && articleData.model.textures.length > 1">
<strong>Material ändern</strong>
<material-switcher :modelData="articleData.model"/>
@ -25,6 +26,7 @@
<p class="article-id">Art. Nr.: {{ articleData.article_id }}</p>
</div>
</div>
</div>
</article>
</template>

View File

@ -1,9 +1,9 @@
<template>
<article v-if="articleData">
<header class="flex column padding">
<header class="flex padding">
<h1>{{ articleData.title }}</h1>
</header>
<div class="content flex column">
<div class="content flex">
<div class="padding">
<div v-if="articleData.model" class="featured left wide">
<model-viewer class="model-viewer" :modelData="articleData.model"/>

View File

@ -58,16 +58,16 @@ export default {
this.scene = new Scene()
},
getWidth() {
let el = document.getElementById('model-viewer') || 0
let el = this.$el.parentElement || 0
if (el) {
return el.offsetWidth
}
return 0
},
getHeight() {
let el = document.getElementById('model-viewer') || 0
let el = this.$el.parentElement || 0
if (el) {
return el.offsetHeight
return el.offsetWidth / 1.333333;
}
return 0
},