mirror of
https://github.com/offen/website.git
synced 2024-12-23 13:30:20 +01:00
add body class for propagating chosen template
This commit is contained in:
parent
a553147a94
commit
b14493c911
@ -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 {
|
||||
|
@ -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)
|
||||
|
@ -1,11 +1,5 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block brand %}
|
||||
<div class="brand">
|
||||
{{ super() }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="content">
|
||||
<div class="container-full">
|
||||
|
@ -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">
|
||||
|
@ -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">
|
||||
|
@ -1,7 +1 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block brand %}
|
||||
<div class="brand">
|
||||
{{ super() }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user