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(
|
config.tmpl.render(
|
||||||
"portfolio.html",
|
"portfolio/index.html",
|
||||||
PortfolioTemplate {
|
PortfolioTemplate {
|
||||||
navbar: NavBar {
|
navbar: NavBar {
|
||||||
portfolio: true,
|
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>
|
<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) {
|
Loading…
Reference in a new issue