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( config.tmpl.render(
"portfolio.html", "portfolio/index.html",
PortfolioTemplate { PortfolioTemplate {
navbar: NavBar { navbar: NavBar {
portfolio: true, 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> <h2>Projets</h2>
<ul> <ul>
{{#apps}} {{#metadata}} {{#info}} {{#apps}} {{>portfolio/card.html}} {{/apps}}
<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}}
</ul> </ul>
{{#archived_apps_exists}} {{#archived_apps_exists}}
<h2>Archives</h2> <h2>Archives</h2>
<ul> <ul>
{{#archived_apps}} {{#metadata}} {{#info}} {{#archived_apps}} {{>portfolio/card.html}} {{/archived_apps}}
<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}}
</ul> </ul>
{{/archived_apps_exists}} {{/location_apps}} {{/data}} {{/archived_apps_exists}} {{/location_apps}} {{/data}}
</main> </main>
@ -55,7 +37,7 @@
<script> <script>
/* Fix links in list */ /* Fix links in list */
window.addEventListener("load", () => window.addEventListener("load", () =>
document.querySelectorAll("li a").forEach(function (link) { document.querySelectorAll("main a").forEach(function (link) {
link.setAttribute("target", "_blank"); link.setAttribute("target", "_blank");
link.setAttribute("rel", "noreferrer"); link.setAttribute("rel", "noreferrer");
link.addEventListener("click", function (event) { link.addEventListener("click", function (event) {