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