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

add body class for propagating chosen template

This commit is contained in:
Frederik Ring 2019-08-30 19:20:07 +02:00
parent a553147a94
commit b14493c911
6 changed files with 6 additions and 25 deletions

View File

@ -406,14 +406,13 @@ MENU
.nav-bar {
height: 70px;
}
.brand,
.brand-index {
.brand {
position: absolute;
padding: 12px 0 0 20px;
float: left;
line-height: 70px;
}
.brand-index {
body.index .brand {
opacity: 0;
}
.nav-container {

View File

@ -2,7 +2,7 @@
$(document).ready(function () {
$(window).scroll(function () {
var scrollProgress = parseInt($(window).scrollTop(), 10)
$('.brand-index').css('opacity', Math.min(scrollProgress / 100, 1))
$('body.index .brand').css('opacity', Math.min(scrollProgress / 100, 1))
})
})
})(window.jQuery)

View File

@ -1,11 +1,5 @@
{% extends "base.html" %}
{% block brand %}
<div class="brand">
{{ super() }}
</div>
{% endblock %}
{% block content %}
<div class="content">
<div class="container-full">

View File

@ -26,13 +26,13 @@
<script async src="https://script-alpha.offen.dev/script.js" data-account-id="{{ OFFEN_ACCOUNT_ID }}"></script>
{% endif %}
</head>
<body>
<body class="{{page.template}}">
<div class="menu">
<section class="nav-bar">
<div class="nav-container">
{% block brand %}
<div class="brand">
<a href="/"><img src="/theme/images/offen-brand-white.svg" alt="offen logo" width="42" height="46" class="logo"></a>
{% endblock %}
</div>
<nav>
<div class="nav-mobile"><span id="nav-toggle"><span></span></span></div>
<ul class="nav-list">

View File

@ -1,11 +1,5 @@
{% extends "base.html" %}
{% block brand %}
<div class="brand-index">
{{ super() }}
</div>
{% endblock %}
{% block content %}
<div class="intro">
<div class="bg" id="bg-intro">

View File

@ -1,7 +1 @@
{% extends "base.html" %}
{% block brand %}
<div class="brand">
{{ super() }}
</div>
{% endblock %}