restructure layouts and includes to be written around njk blocks

This commit is contained in:
yuki 2025-10-15 17:28:01 -03:00
parent e870450b2b
commit 457eb8b733
Signed by: yuki
GPG key ID: 0C98E6FF04EC3915
7 changed files with 86 additions and 64 deletions

View file

@ -1,6 +1,8 @@
<div class="footer-flex"> <div class="footer-flex">
<div class="footer-left"> <div class="footer-left">
{% if show-lang-in-footer %}
{% include "lang-available.njk" %} {% include "lang-available.njk" %}
{% endif %}
</div> </div>
<div class="footer-middle"> <div class="footer-middle">
<div class="nekojiru-angel"></div> <div class="nekojiru-angel"></div>

View 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" %}

View file

@ -1,47 +1,39 @@
---
lastfm: false
flight:
img: "/img/Witch-on-broom.gif"
url: "https://www.youtube.com/embed/w1dXpAJ1qfA"
---
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ lang }}"> <html lang="{{ lang }}">
<head> <head>
{% block head %}
{% include "base_head.njk" %} {% include "base_head.njk" %}
{% endblock head %}
</head> </head>
<body> <body>
<div class="main-page-wrapper"> <div class="main-page-wrapper">
<div class="header-wrapper"> <div class="header-wrapper">
<div class="header"> {% block header %}
<h1>{{ meta.sitename }}</h1> {% include "default_header.njk" %}
<a href={{ "/" | locale_url }}><div class="header-banner" title="{{ "home" | i18n }}"></div></a> {% endblock header %}
<!--<div class="motd">
<marquee behavior="scroll" direction="left">
<p>{{ meta.motd }}</p>
</marquee>
</div>-->
</div> </div>
{% include "default_navbar.njk" %}
</div>
<div id="mobile-warning" class="warning"> <div id="mobile-warning" class="warning">
<p>{{ "mobile-warning" | i18n }}</p> <p>{{ "mobile-warning" | i18n }}</p>
</div> </div>
<div class="base-content-wrapper"> <div class="base-content-wrapper">
{{ content | safe }} {% block content %}
<!-- default fallback -->
{% endblock content %}
</div> </div>
<footer> <footer>
{% block footer %}
{% if flight %}
<marquee behavior="scroll" direction="left"> <marquee behavior="scroll" direction="left">
<a href="{{ flight.url }}" target="_blank"><img src="{{ flight.img }}" alt=""></a> <a href="{{ flight.url }}" target="_blank"><img src="{{ flight.img }}" alt=""></a>
</marquee> </marquee>
{% include "footer.njk" %} {% endif %}
{% include "default_footer.njk" %}
{% endblock footer %}
</footer> </footer>
</div> </div>
{% if lastfm %}
<script src="/js/lastfm.js"></script> {% block scripts %}{% endblock scripts %}
{% endif %}
</body> </body>
</html> </html>

View file

@ -1,9 +1,13 @@
--- ---
layout: base
title: home
lastfm: true lastfm: true
flight:
img: "/img/Witch-on-broom.gif"
url: "https://www.youtube.com/embed/w1dXpAJ1qfA"
--- ---
<div class="welcome-aside-left"> {% extends "_layouts/base.njk" %}
{% block content %}
<div class="welcome-aside-left">
<div id="listening" title="{{ "listening-to" | i18n }}"></div> <div id="listening" title="{{ "listening-to" | i18n }}"></div>
<!-- TODO: fake ad <!-- TODO: fake ad
<div class="leftside-fake-ad"></div> <div class="leftside-fake-ad"></div>
@ -22,13 +26,13 @@ lastfm: true
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
</div> </div>
<div class="true-content welcome-content"> <div class="true-content welcome-content">
{{ content | safe }} {{ content | safe }}
</div> </div>
<div class="welcome-aside-right"> <div class="welcome-aside-right">
<div class="recent-posts box"> <div class="recent-posts box">
<h2>{{ "recent-posts" | i18n }}</h2> <h2>{{ "recent-posts" | i18n }}</h2>
<ul> <ul>
@ -37,6 +41,13 @@ lastfm: true
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
<!-- TODO: rightside home image --> <!-- TODO: better rightside home image -->
<img src="/img/home_rightside.jpg" id="rightside"> <img src="/img/home_rightside.jpg" id="rightside">
</div> </div>
{% endblock content %}
{% block scripts %}
{% if lastfm %}
<script src="/js/lastfm.js"></script>
{% endif %}
{% endblock scripts %}

View file

@ -1,4 +1,8 @@
--- ---
layout: base # TODO: finish post page
tags: post tags: post
--- ---
{% extends "_layouts/base.njk" %}
{% block content %}
{{ content | safe }}
{% endblock content %}

View file

@ -1,4 +1,5 @@
--- ---
title: home
layout: home layout: home
--- ---
#### hey... #### hey...

View file

@ -1,5 +1,6 @@
--- ---
layout: home layout: home
title: home
--- ---
#### holaaa #### holaaa
bienvenid@ a mi sitio!! aun no lo termino pero revisa lo que tenga hecho <3 pienso terminar primero: bienvenid@ a mi sitio!! aun no lo termino pero revisa lo que tenga hecho <3 pienso terminar primero: