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-left">
{% if show-lang-in-footer %}
{% include "lang-available.njk" %}
{% endif %}
</div>
<div class="footer-middle">
<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>
<html lang="{{ lang }}">
<head>
{% 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>-->
{% block header %}
{% include "default_header.njk" %}
{% endblock header %}
</div>
{% include "default_navbar.njk" %}
</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>
{% block footer %}
{% if flight %}
<marquee behavior="scroll" direction="left">
<a href="{{ flight.url }}" target="_blank"><img src="{{ flight.img }}" alt=""></a>
</marquee>
{% include "footer.njk" %}
{% endif %}
{% include "default_footer.njk" %}
{% endblock footer %}
</footer>
</div>
{% if lastfm %}
<script src="/js/lastfm.js"></script>
{% endif %}
{% block scripts %}{% endblock scripts %}
</body>
</html>

View file

@ -1,9 +1,13 @@
---
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">
{% 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>
@ -22,13 +26,13 @@ lastfm: true
{% endfor %}
</div>
</div>
</div>
</div>
<div class="true-content welcome-content">
<div class="true-content welcome-content">
{{ content | safe }}
</div>
</div>
<div class="welcome-aside-right">
<div class="welcome-aside-right">
<div class="recent-posts box">
<h2>{{ "recent-posts" | i18n }}</h2>
<ul>
@ -37,6 +41,13 @@ lastfm: true
{% endfor %}
</ul>
</div>
<!-- TODO: rightside home image -->
<!-- TODO: better rightside home image -->
<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
---
{% extends "_layouts/base.njk" %}
{% block content %}
{{ content | safe }}
{% endblock content %}

View file

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

View file

@ -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: