fix the fix and template the cards of portfolio
Some checks are pending
ci/woodpecker/push/publish Pipeline is pending
Some checks are pending
ci/woodpecker/push/publish Pipeline is pending
This commit is contained in:
parent
15d02ff999
commit
8c306b2102
3 changed files with 14 additions and 22 deletions
|
@ -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,
|
||||
|
|
10
templates/portfolio/card.html
Normal file
10
templates/portfolio/card.html
Normal 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}}
|
|
@ -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) {
|
Loading…
Reference in a new issue