fix the fix and template the cards of portfolio
Some checks are pending
ci/woodpecker/push/publish Pipeline is pending

This commit is contained in:
Mylloon 2023-10-15 22:30:35 +02:00
parent 15d02ff999
commit 8c306b2102
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
3 changed files with 14 additions and 22 deletions

View file

@ -60,7 +60,7 @@ fn build_page(config: Config, url: String) -> String {
};
config.tmpl.render(
"portfolio.html",
"portfolio/index.html",
PortfolioTemplate {
navbar: NavBar {
portfolio: true,

View file

@ -0,0 +1,10 @@
{{#metadata}} {{#info}}
<li onclick="window.open('{{link}}', '_blank', 'noreferrer');">
<div>
<h3>{{title}}</h3>
<span>{{&content}}</span> {{#language}}
<p data-lang="{{language}}"></p>
{{/language}}
</div>
</li>
{{/info}} {{/metadata}}

View file

@ -23,31 +23,13 @@
<h2>Projets</h2>
<ul>
{{#apps}} {{#metadata}} {{#info}}
<li onclick="window.open('{{link}}', '_blank', 'noreferrer');">
<div>
<h3>{{title}}</h3>
<span>{{&content}}</span> {{#language}}
<p data-lang="{{language}}"></p>
{{/language}}
</div>
</li>
{{/info}} {{/metadata}} {{/apps}}
{{#apps}} {{>portfolio/card.html}} {{/apps}}
</ul>
{{#archived_apps_exists}}
<h2>Archives</h2>
<ul>
{{#archived_apps}} {{#metadata}} {{#info}}
<li onclick="window.open('{{link}}', '_blank', 'noreferrer');">
<div>
<h3>{{title}}</h3>
<span>{{&content}}</span> {{#language}}
<p data-lang="{{language}}"></p>
{{/language}}
</div>
</li>
{{/info}} {{/metadata}} {{/archived_apps}}
{{#archived_apps}} {{>portfolio/card.html}} {{/archived_apps}}
</ul>
{{/archived_apps_exists}} {{/location_apps}} {{/data}}
</main>
@ -55,7 +37,7 @@
<script>
/* Fix links in list */
window.addEventListener("load", () =>
document.querySelectorAll("li a").forEach(function (link) {
document.querySelectorAll("main a").forEach(function (link) {
link.setAttribute("target", "_blank");
link.setAttribute("rel", "noreferrer");
link.addEventListener("click", function (event) {