Nikola auto commit.

Nikola version: 8.3.3
src
Patricio García 2025-08-20 20:07:24 +01:00
parent 183b7dd262
commit d510895ccd
9 changed files with 170 additions and 1 deletions

Binary file not shown.

13
conf.py
View File

@ -185,6 +185,18 @@ THEME = "bootstrap4"
# as an accent color (the default ones dont). Must be a HEX value. # as an accent color (the default ones dont). Must be a HEX value.
THEME_COLOR = '#5670d4' THEME_COLOR = '#5670d4'
MASTODON_TIMELINE_INIT = """
instanceUrl: "https://txs.es",
timelineType: "profile",
userId: "44",
profileName: "@EDUCATIC",
dateFormatLocale: "es",
btnSeeMore: "Ver mas publicaciones en Mastodon",
btnReload: "Recargar",
maxNbPostFetch: "5",
maxNbPostShow: "5",
"""
# Theme configuration. Fully theme-dependent. (translatable) # Theme configuration. Fully theme-dependent. (translatable)
# Samples for bootblog4 (enabled) and bootstrap4 (commented) follow. # Samples for bootblog4 (enabled) and bootstrap4 (commented) follow.
# bootblog4 supports: featured_large featured_small featured_on_mobile # bootblog4 supports: featured_large featured_small featured_on_mobile
@ -222,6 +234,7 @@ THEME_CONFIG = {
'navbar_custom_bg': '', 'navbar_custom_bg': '',
'imghdr_url': '/assets/img/header.jpg', 'imghdr_url': '/assets/img/header.jpg',
'imghdr_height': '100px', 'imghdr_height': '100px',
'mastodon_timeline_init': MASTODON_TIMELINE_INIT,
} }
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -4,7 +4,7 @@
% if i % cols == 0: % if i % cols == 0:
<div class="row"> <div class="row">
% endif % endif
<div class="col-md-${cwidth}"> <div class="col-md-${cwidth} col-lg-12 col-xl-${cwidth}">
<div class="card"> <div class="card">
<div class="card-header" id="heading_${i}_${hex_uuid4}"> <div class="card-header" id="heading_${i}_${hex_uuid4}">
<h1 class="mb-0"> <h1 class="mb-0">

117
templates/base.tmpl Normal file
View File

@ -0,0 +1,117 @@
## -*- coding: utf-8 -*-
<%namespace name="base" file="base_helper.tmpl" import="*" />
<%namespace name="mastodon" file="mastodon.tmpl" import="*" />
${set_locale(lang)}
${base.html_headstart()}
${mastodon.extra_head()}
<%block name="extra_head">
### Leave this block alone.
</%block>
${template_hooks['extra_head']()}
</head>
<body>
<a href="#content" class="sr-only sr-only-focusable">${messages("Skip to main content")}</a>
<!-- Menubar -->
<nav class="navbar navbar-expand-md static-top mb-4
% if theme_config.get('navbar_light'):
navbar-light
% else:
navbar-dark
% endif
% if theme_config.get('navbar_custom_bg'):
${theme_config['navbar_custom_bg']}
% elif theme_config.get('navbar_light'):
bg-light
% else:
bg-dark
%endif
">
<div class="container-xl"><!-- This keeps the margins nice -->
<a class="navbar-brand" href="${_link("root", None, lang)}">
%if logo_url:
<img src="${logo_url}" alt="${blog_title|h}" id="logo" class="d-inline-block align-top">
%endif
% if show_blog_title:
<span id="blog-title">${blog_title|h}</span>
% endif
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#bs-navbar" aria-controls="bs-navbar" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="bs-navbar">
<ul class="navbar-nav mr-auto">
${base.html_navigation_links_entries(navigation_links)}
${template_hooks['menu']()}
</ul>
%if search_form:
${search_form}
%endif
<ul class="navbar-nav navbar-right">
${base.html_navigation_links_entries(navigation_alt_links)}
<%block name="belowtitle">
%if len(translations) > 1:
<li>${base.html_translations()}</li>
%endif
</%block>
% if show_sourcelink:
<%block name="sourcelink"></%block>
%endif
${template_hooks['menu_alt']()}
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container -->
</nav>
<!-- End of Menubar -->
<div class="container-xl" id="content" role="main">
<div class="body-content">
<div class="row">
<div class="col">
<!--Body content-->
${template_hooks['page_header']()}
<%block name="extra_header"></%block>
<%block name="content"></%block>
<!--End of body content-->
</div>
<div class="col-lg-5 col-xl-4">
<!--Mastodon content-->
${mastodon.timeline()}
<!--End of Mastodon content-->
</div>
<footer id="footer">
${content_footer}
${template_hooks['page_footer']()}
<%block name="extra_footer"></%block>
</footer>
</div>
</div>
</div>
${base.late_load_js()}
%if date_fanciness != 0:
<!-- fancy dates -->
<script>
luxon.Settings.defaultLocale = "${luxon_locales[lang]}";
fancydates(${date_fanciness}, ${luxon_date_format});
</script>
<!-- end fancy dates -->
%endif
${mastodon.extra_js()}
<%block name="extra_js"></%block>
<script>
baguetteBox.run('div#content', {
ignoreClass: 'islink',
captions: function(element){var i=element.getElementsByTagName('img')[0];return i===undefined?'':i.alt;}});
</script>
${body_end}
${template_hooks['body_end']()}
</body>
</html>

28
templates/mastodon.tmpl Normal file
View File

@ -0,0 +1,28 @@
## -*- coding: utf-8 -*-
<%def name="timeline()">
<div class="dummy-wrapper-timeline">
<!-- Mastodon Timeline -->
<div id="mt-container" class="mt-container">
<div class="mt-body" role="feed">
<div class="mt-loading-spinner"></div>
</div>
</div>
</div>
</%def>
<%def name="extra_head()">
<link href="/assets/css/mastodon-timeline.min.css" rel="stylesheet" />
</%def>
<%def name="extra_js()">
## Load Mastodon embed timeline script
<script src="/assets/js/mastodon-timeline.umd.js"></script>
<script>
const myTimeline = new MastodonTimeline.Init({
${theme_config.get('mastodon_timeline_init')}
});
</script>
</%def>

View File

@ -3,6 +3,7 @@
<%namespace name="pheader" file="post_header.tmpl"/> <%namespace name="pheader" file="post_header.tmpl"/>
<%namespace name="comments" file="comments_helper.tmpl"/> <%namespace name="comments" file="comments_helper.tmpl"/>
<%namespace name="math" file="math_helper.tmpl"/> <%namespace name="math" file="math_helper.tmpl"/>
## <%namespace name="mastodon" file="mastodon.tmpl"/>
<%inherit file="post.tmpl"/> <%inherit file="post.tmpl"/>
<%block name="content"> <%block name="content">
@ -50,3 +51,4 @@
${math.math_scripts_ifpost(post)} ${math.math_scripts_ifpost(post)}
</article> </article>
</%block> </%block>