2
0
mirror of https://github.com/offen/website.git synced 2024-11-22 17:10:29 +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 { .nav-bar {
height: 70px; height: 70px;
} }
.brand, .brand {
.brand-index {
position: absolute; position: absolute;
padding: 12px 0 0 20px; padding: 12px 0 0 20px;
float: left; float: left;
line-height: 70px; line-height: 70px;
} }
.brand-index { body.index .brand {
opacity: 0; opacity: 0;
} }
.nav-container { .nav-container {

View File

@ -2,7 +2,7 @@
$(document).ready(function () { $(document).ready(function () {
$(window).scroll(function () { $(window).scroll(function () {
var scrollProgress = parseInt($(window).scrollTop(), 10) 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) })(window.jQuery)

View File

@ -1,11 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block brand %}
<div class="brand">
{{ super() }}
</div>
{% endblock %}
{% block content %} {% block content %}
<div class="content"> <div class="content">
<div class="container-full"> <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> <script async src="https://script-alpha.offen.dev/script.js" data-account-id="{{ OFFEN_ACCOUNT_ID }}"></script>
{% endif %} {% endif %}
</head> </head>
<body> <body class="{{page.template}}">
<div class="menu"> <div class="menu">
<section class="nav-bar"> <section class="nav-bar">
<div class="nav-container"> <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> <a href="/"><img src="/theme/images/offen-brand-white.svg" alt="offen logo" width="42" height="46" class="logo"></a>
{% endblock %} </div>
<nav> <nav>
<div class="nav-mobile"><span id="nav-toggle"><span></span></span></div> <div class="nav-mobile"><span id="nav-toggle"><span></span></span></div>
<ul class="nav-list"> <ul class="nav-list">

View File

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

View File

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