restructure layouts and includes to be written around njk blocks
This commit is contained in:
parent
e870450b2b
commit
457eb8b733
7 changed files with 86 additions and 64 deletions
|
|
@ -1,6 +1,8 @@
|
|||
<div class="footer-flex">
|
||||
<div class="footer-left">
|
||||
{% include "lang-available.njk" %}
|
||||
{% if show-lang-in-footer %}
|
||||
{% include "lang-available.njk" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="footer-middle">
|
||||
<div class="nekojiru-angel"></div>
|
||||
11
_includes/default_header.njk
Normal file
11
_includes/default_header.njk
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<div class="header">
|
||||
<h1>{{ meta.sitename }}</h1>
|
||||
<a href={{ "/" | locale_url }}><div class="header-banner" title="{{ "home" | i18n }}"></div></a>
|
||||
<!--<div class="motd">
|
||||
<marquee behavior="scroll" direction="left">
|
||||
<p>{{ meta.motd }}</p>
|
||||
</marquee>
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
{% include "default_navbar.njk" %}
|
||||
|
|
@ -1,47 +1,39 @@
|
|||
---
|
||||
lastfm: false
|
||||
flight:
|
||||
img: "/img/Witch-on-broom.gif"
|
||||
url: "https://www.youtube.com/embed/w1dXpAJ1qfA"
|
||||
---
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ lang }}">
|
||||
<head>
|
||||
{% include "base_head.njk" %}
|
||||
{% block head %}
|
||||
{% include "base_head.njk" %}
|
||||
{% endblock head %}
|
||||
</head>
|
||||
<body>
|
||||
<div class="main-page-wrapper">
|
||||
<div class="header-wrapper">
|
||||
<div class="header">
|
||||
<h1>{{ meta.sitename }}</h1>
|
||||
<a href={{ "/" | locale_url }}><div class="header-banner" title="{{ "home" | i18n }}"></div></a>
|
||||
<!--<div class="motd">
|
||||
<marquee behavior="scroll" direction="left">
|
||||
<p>{{ meta.motd }}</p>
|
||||
</marquee>
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
{% include "default_navbar.njk" %}
|
||||
{% block header %}
|
||||
{% include "default_header.njk" %}
|
||||
{% endblock header %}
|
||||
</div>
|
||||
|
||||
<div id="mobile-warning" class="warning">
|
||||
<p>{{ "mobile-warning" | i18n }}</p>
|
||||
</div>
|
||||
|
||||
<div class="base-content-wrapper">
|
||||
{{ content | safe }}
|
||||
{% block content %}
|
||||
<!-- default fallback -->
|
||||
{% endblock content %}
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<marquee behavior="scroll" direction="left">
|
||||
<a href="{{ flight.url }}" target="_blank"><img src="{{ flight.img }}" alt=""></a>
|
||||
</marquee>
|
||||
{% include "footer.njk" %}
|
||||
{% block footer %}
|
||||
{% if flight %}
|
||||
<marquee behavior="scroll" direction="left">
|
||||
<a href="{{ flight.url }}" target="_blank"><img src="{{ flight.img }}" alt=""></a>
|
||||
</marquee>
|
||||
{% endif %}
|
||||
{% include "default_footer.njk" %}
|
||||
{% endblock footer %}
|
||||
</footer>
|
||||
</div>
|
||||
{% if lastfm %}
|
||||
<script src="/js/lastfm.js"></script>
|
||||
{% endif %}
|
||||
|
||||
{% block scripts %}{% endblock scripts %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,42 +1,53 @@
|
|||
---
|
||||
layout: base
|
||||
title: home
|
||||
lastfm: true
|
||||
flight:
|
||||
img: "/img/Witch-on-broom.gif"
|
||||
url: "https://www.youtube.com/embed/w1dXpAJ1qfA"
|
||||
---
|
||||
<div class="welcome-aside-left">
|
||||
<div id="listening" title="{{ "listening-to" | i18n }}"></div>
|
||||
<!-- TODO: fake ad
|
||||
<div class="leftside-fake-ad"></div>
|
||||
-->
|
||||
<div class="buttons-wrapper box">
|
||||
<h2>{{ "please-visit" | i18n }}</h2>
|
||||
<div class="buttons">
|
||||
{% for button in 88x31.buttons.people.slice(0, 5) %}
|
||||
<a href="{{ button.link }}" target="_blank" title="{{ button.name }}">
|
||||
{% if button.image.startsWith("http") %}
|
||||
<img src="{{ button.image }}" alt="{{ button.name }}">
|
||||
{% else %}
|
||||
<img src="/img/buttons/{{ button.image }}.gif" alt="{{ button.name }}">
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% extends "_layouts/base.njk" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="welcome-aside-left">
|
||||
<div id="listening" title="{{ "listening-to" | i18n }}"></div>
|
||||
<!-- TODO: fake ad
|
||||
<div class="leftside-fake-ad"></div>
|
||||
-->
|
||||
<div class="buttons-wrapper box">
|
||||
<h2>{{ "please-visit" | i18n }}</h2>
|
||||
<div class="buttons">
|
||||
{% for button in 88x31.buttons.people.slice(0, 5) %}
|
||||
<a href="{{ button.link }}" target="_blank" title="{{ button.name }}">
|
||||
{% if button.image.startsWith("http") %}
|
||||
<img src="{{ button.image }}" alt="{{ button.name }}">
|
||||
{% else %}
|
||||
<img src="/img/buttons/{{ button.image }}.gif" alt="{{ button.name }}">
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="true-content welcome-content">
|
||||
{{ content | safe }}
|
||||
</div>
|
||||
|
||||
<div class="welcome-aside-right">
|
||||
<div class="recent-posts box">
|
||||
<h2>{{ "recent-posts" | i18n }}</h2>
|
||||
<ul>
|
||||
{% for post in collections.post | i18n_filter(5) %}
|
||||
<li><p><a href="{{ post.url }}">{{ post.data.title }}</a><br><span class="date"> {{ post.date.toLocaleString("en-GB", {year: 'numeric', month: '2-digit', day: '2-digit'}) }}</span></p></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="true-content welcome-content">
|
||||
{{ content | safe }}
|
||||
</div>
|
||||
<!-- TODO: rightside home image -->
|
||||
<img src="/img/home_rightside.jpg" id="rightside">
|
||||
</div>
|
||||
|
||||
<div class="welcome-aside-right">
|
||||
<div class="recent-posts box">
|
||||
<h2>{{ "recent-posts" | i18n }}</h2>
|
||||
<ul>
|
||||
{% for post in collections.post | i18n_filter(5) %}
|
||||
<li><p><a href="{{ post.url }}">{{ post.data.title }}</a><br><span class="date"> {{ post.date.toLocaleString("en-GB", {year: 'numeric', month: '2-digit', day: '2-digit'}) }}</span></p></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<!-- TODO: better rightside home image -->
|
||||
<img src="/img/home_rightside.jpg" id="rightside">
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
||||
{% block scripts %}
|
||||
{% if lastfm %}
|
||||
<script src="/js/lastfm.js"></script>
|
||||
{% endif %}
|
||||
{% endblock scripts %}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
---
|
||||
layout: base
|
||||
# TODO: finish post page
|
||||
tags: post
|
||||
---
|
||||
{% extends "_layouts/base.njk" %}
|
||||
{% block content %}
|
||||
{{ content | safe }}
|
||||
{% endblock content %}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
---
|
||||
title: home
|
||||
layout: home
|
||||
---
|
||||
#### hey...
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
layout: home
|
||||
title: home
|
||||
---
|
||||
#### holaaa
|
||||
bienvenid@ a mi sitio!! aun no lo termino pero revisa lo que tenga hecho <3 pienso terminar primero:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue