Skip to content

Commit

Permalink
Add kawaii mode~ ✨
Browse files Browse the repository at this point in the history
Signed-off-by: Asahi Lina <[email protected]>
  • Loading branch information
asahilina committed May 2, 2024
1 parent cbf010c commit cf4fe5b
Show file tree
Hide file tree
Showing 6 changed files with 299 additions and 2 deletions.
2 changes: 1 addition & 1 deletion layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h2>Install from macOS</h2>
<h3><a class="more" href="/fedora/#device-support">Device support<i class="fas fa-angle-right more"></i></a></h3>
</div>
<div>
<img src="/img/asahilinux_laptop.svg?{{ slicestr (readFile "static/img/asahilinux_laptop.svg" | md5) 0 8 }}" alt="Asahi Linux on a laptop">
<img class="laptop" src="/img/asahilinux_laptop.svg?{{ slicestr (readFile "static/img/asahilinux_laptop.svg" | md5) 0 8 }}" alt="Asahi Linux on a laptop">
</div>
</div>
</section>
Expand Down
4 changes: 3 additions & 1 deletion layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
<img src="/img/AsahiLinux_logomark.svg" class="logo" alt="Asahi Linux logo">
</a>
<span class="license">Licensed under CC BY-SA 4.0</span>
<span class="disclaimer">Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries. All other product names, logos, and brands are property of their respective owners.</span>
<span class="disclaimer">Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries. All other product names, logos, and brands are property of their respective owners.
<span class="kawaii-disclaimer">Kawaii Asahi Linux logo by <a href="https://github.com/SAWARATSUKI/Logos">SAWARATSUKI</a> (see link for license).</span>
</span>
</div>
<div class="footer-links">
<ul class="footer-services">
Expand Down
9 changes: 9 additions & 0 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@

<meta property="og:image" content="https://asahilinux.org/img/AsahiLinux_logomark_256px.png">
<meta property="og:title" content="{{ if not .IsHome }}{{.Title}} - {{ end }}Asahi Linux">
<script>
var kawaii = (new URLSearchParams(window.location.search)).get("kawaii") ?? localStorage.getItem("kawaii");
if (kawaii == "true") {
document.documentElement.classList.add("kawaii");
localStorage.setItem("kawaii", "true");
} else {
localStorage.removeItem("kawaii");
}
</script>
</head>
<body class="{{ .Scratch.Get "body_class" }}">
<header id="header">
Expand Down
21 changes: 21 additions & 0 deletions static/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1311,6 +1311,27 @@ ul.footer-services i {
opacity: 0.8;
}

.disclaimer a {
text-decoration: underline;
}

/* Kawaii mode */
html.kawaii img.logo {
content: url("/img/AsahiLinux_kawaii_logo.png");
}

html.kawaii img.laptop {
content: url("/img/asahilinux_kawaii_laptop.svg");
}

.kawaii-disclaimer {
display: none;
}

html.kawaii .kawaii-disclaimer {
display: inline;
}

@media screen and (max-width: 1050px) {
.community-links > div {
display: block;
Expand Down
Binary file added static/img/AsahiLinux_kawaii_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
265 changes: 265 additions & 0 deletions static/img/asahilinux_kawaii_laptop.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cf4fe5b

Please sign in to comment.