Basic cours support #44

Merged
Anri merged 67 commits from cours into main 2024-04-01 18:11:49 +02:00
4 changed files with 15 additions and 8 deletions
Showing only changes of commit 3280a454b6 - Show all commits

View file

@ -629,7 +629,7 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found. the "copyright" line and a pointer to where the full notice is found.
Copyright (C) 2023 Mylloon Copyright (C) 2023-2024 Mylloon
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published it under the terms of the GNU Affero General Public License as published

View file

@ -20,7 +20,7 @@ main {
} }
/* List */ /* List */
main ul { main ul:not(ul ul) {
padding: 0; padding: 0;
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, 1fr);
@ -34,7 +34,7 @@ main ul {
} }
/* Card */ /* Card */
main li { main li:not(ul ul > li) {
display: flex; display: flex;
border-radius: 8px; border-radius: 8px;
@ -50,12 +50,12 @@ main li {
margin-inline: 5px; margin-inline: 5px;
} }
main li:hover { main li:hover:not(ul ul > li) {
background: color-mix(in srgb, var(--background) 40%, var(--extreme)); background: color-mix(in srgb, var(--background) 40%, var(--extreme));
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.3); box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.3);
} }
main li[role="button"]:hover { main li[role="button"]:hover:not(ul ul > li) {
cursor: pointer; cursor: pointer;
} }
@ -91,10 +91,17 @@ span {
/* Element text */ /* Element text */
div p, div p,
div a { div a,
ul ul li {
font-size: var(--font-size-card); font-size: var(--font-size-card);
} }
/* Element list */
ul ul {
list-style: initial;
padding: 1em;
}
/* Element language */ /* Element language */
p[data-lang] { p[data-lang] {
margin: 0; margin: 0;

View file

@ -1,5 +1,5 @@
{{#metadata}} {{#info}} {{#portfolio}} {{#link}} {{#metadata}} {{#info}} {{#portfolio}} {{#link}}
<li role="button" onmousedown="openLink('{{link}}');"> <li role="button" onmouseup="openLink('{{link}}');">
{{>portfolio/project.html}} {{>portfolio/project.html}}
</li> </li>
{{/link}} {{^link}} {{/link}} {{^link}}

View file

@ -36,7 +36,7 @@
document.querySelectorAll("main 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("mousedown", function (event) { link.addEventListener("mouseup", function (event) {
event.stopPropagation(); event.stopPropagation();
}); });
}) })