mylloon.fr/templates/portfolio/index.html

89 lines
2.2 KiB
HTML
Raw Normal View History

2023-02-09 10:45:59 +01:00
<!DOCTYPE html>
<html lang="fr">
2023-04-24 17:22:12 +02:00
<head dir="ltr">
{{>head.html}}
<link rel="stylesheet" href="/css/portfolio.css" />
<link rel="stylesheet" href="/css/languages.css" />
2023-04-24 17:22:12 +02:00
</head>
2023-02-09 10:45:59 +01:00
<body>
<header>{{>navbar.html}}</header>
<main>
{{#data}}
<h1>Portfolio</h1>
2024-01-25 18:23:07 +01:00
{{#about}} {{&content}} {{/about}}
2023-04-19 16:57:16 +02:00
<!-- Error message -->
2024-01-25 18:23:07 +01:00
{{#location_apps}}
<p>{{location_apps}} {{err_msg}}</p>
{{/location_apps}} {{^location_apps}}
<h2>Projets</h2>
<ul>
2023-10-16 12:31:52 +02:00
{{#apps}} {{>portfolio/card.html}} {{/apps}}
</ul>
2023-10-15 22:27:08 +02:00
{{#archived_apps_exists}}
<h2>Archives</h2>
<ul>
{{#archived_apps}} {{>portfolio/card.html}} {{/archived_apps}}
2023-10-15 22:27:08 +02:00
</ul>
2024-06-02 20:02:23 +02:00
{{/archived_apps_exists}} {{/location_apps}}
</main>
2024-06-02 20:02:23 +02:00
{{#about}} {{#metadata}}
{{#mail_obfsucated}}{{>libs/mail_obfuscater.html}}{{/mail_obfsucated}}
{{/metadata}} {{/about}} {{/data}}
<script>
/* Fix links in list */
window.addEventListener("load", () =>
document.querySelectorAll("main a").forEach(function (link) {
link.setAttribute("target", "_blank");
link.setAttribute("rel", "noreferrer");
2024-01-26 17:02:01 +01:00
link.addEventListener("mouseup", function (event) {
event.stopPropagation();
});
})
);
2024-01-19 12:10:38 +01:00
/* Middle click */
const disableScroll = () => {
if (event.button === 1) {
event.preventDefault();
}
};
2024-01-19 12:10:38 +01:00
/* Open cards link */
const openLink = (url) => {
const backgroundtab = () =>
Object.assign(document.createElement("a"), {
href: url,
target: "_blank",
rel: "noreferrer",
}).dispatchEvent(
new MouseEvent("click", { ctrlKey: true, metaKey: true })
);
2024-01-19 12:10:38 +01:00
switch (event.button) {
case 0:
/* Left click */
if (event.ctrlKey || event.metaKey) {
backgroundtab();
} else {
window.open(url, "_blank", "noreferrer");
}
2024-01-19 12:10:38 +01:00
break;
2024-01-19 12:10:38 +01:00
case 1:
/* Middle click */
backgroundtab();
2024-01-19 12:10:38 +01:00
break;
2024-01-19 12:10:38 +01:00
default:
break;
}
};
</script>
2023-02-09 10:45:59 +01:00
</body>
</html>