Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Logo option UwU #292

Merged
merged 10 commits into from
May 5, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions site/css/hl.css
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,17 @@ img {
max-width: 100%;
height: auto; }

.uwu-visible {
display: none; }

.uwu .uwu-visible,.uwu-hidden {
display: block;
max-width: 100%;
height: auto; }

.uwu .uwu-hidden {
display: none; }

.img-rounded {
border-radius: 6px; }

Expand Down
Binary file added site/img/haskell-uwu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
<div class="row">
<div class=" span6 col-md-6">
<div class="branding">
<br class="hidden-xs">
<img src="/img/haskell-logo.svg" alt="Haskell" class="img-responsive">
<br class="hidden-xs uwu-hidden">
<img src="/img/haskell-logo.svg" alt="Haskell" class="img-responsive uwu-hidden">
<img src="/img/haskell-uwu.png" alt="Haskell UwU" class="uwu-visible">
<h4 class="summary">An advanced, purely functional programming language</h4>
</div>
</div>
Expand Down
26 changes: 26 additions & 0 deletions site/templates/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,32 @@
<link rel="stylesheet" href="/css/hl.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/glider-js@1/glider.min.css">
<script src="https://cdn.jsdelivr.net/npm/glider-js@1/glider.min.js"></script>
<script>
(function () {
try {
var preferredUwu = localStorage.getItem('uwu');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var preferredUwu = localStorage.getItem('uwu');
const preferredUwu = localStorage.getItem('uwu');


const isUwuValue = window.location
&& window.location.search
&& window.location.search.match(/uwu=(true|false)/);

if (isUwuValue) {
const isUwu = isUwuValue[1] === 'true';
if (isUwu) {
localStorage.setItem('uwu', true);

document.documentElement.classList.add('uwu');
console.log('uwu mode enabled. turn off with ?uwu=false')
console.log('logo credit to @sawaratsuki1004 via https://github.com/SAWARATSUKI/ServiceLogos');
} else {
localStorage.removeItem('uwu', false);
}
} else if (preferredUwu) {
document.documentElement.classList.add('uwu');
}
} catch (err) { }
})();
</script>
</head>
<body class="page-$page$">
<div class="wrap">
Expand Down
Loading