feat: added article translation templating
This commit is contained in:
parent
b50833f19f
commit
4bc7a6d980
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>{article_language_flag} {article_title}</title>
|
||||
<title>{{language.flag}} {{title}}</title>
|
||||
<link rel="stylesheet" href="/static/bulma.min.css" />
|
||||
</head>
|
||||
<body>
|
||||
@ -14,9 +14,9 @@
|
||||
aria-label="main navigation"
|
||||
>
|
||||
<div class="navbar-brand">
|
||||
<a class="navbar-item" href="{article_overview_url}">
|
||||
<strong>{article_language_flag} {article_title}</strong>
|
||||
<time datetime="{article_datetime_iso}">{article_datetime}</time>
|
||||
<a class="navbar-item" href="{{article_url}}">
|
||||
<strong>{{language.flag}} {{title}}</strong>
|
||||
<time datetime="{{meta.iso_date}}">{{meta.date}}</time>
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
@ -24,13 +24,7 @@
|
||||
<!-- Main Content -->
|
||||
<section class="section">
|
||||
<div class="content">
|
||||
{article_content}
|
||||
|
||||
<h1>Further Reading</h1>
|
||||
|
||||
<div class="row">
|
||||
{article_children_cards}
|
||||
</div>
|
||||
{{content}}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
@ -148,6 +148,7 @@ class ArticleTranslation:
|
||||
self.context["meta"] = self.article.context_meta
|
||||
self.context["url"] = self.url
|
||||
self.context["language"] = LANGUAGES[self.language_code]
|
||||
self.context["article_url"] = self.article.url
|
||||
|
||||
html_content = self.file.read_text()
|
||||
if self.file.suffix == ".md":
|
||||
|
Loading…
x
Reference in New Issue
Block a user