Switch to Manrope font

Fix inconsistent buttons
Removed default header background
Added info button with version and ❤️
Random fixes
This commit is contained in:
Michał 2023-03-23 15:47:35 +00:00
parent ad8da1ae4e
commit 4e7301b9de
15 changed files with 169 additions and 64 deletions

View file

@ -2,7 +2,7 @@
function showLogin() {
popUpShow(
'Login!',
'Need an account? <span class="pop-up__link" onclick="showRegister()">Register!</span>',
'Need an account? <span class="link" onclick="showRegister()">Register!</span>',
'<button class="btn-block" onclick="popupDissmiss()">Cancelee</button>' +
'<button class="btn-block primary" form="loginForm" type="submit">Login</button>',
'<form id="loginForm" onsubmit="return login(event)">' +
@ -57,7 +57,7 @@ function login(event) {
function showRegister() {
popUpShow(
'Who are you?',
'Already have an account? <span class="pop-up__link" onclick="showLogin()">Login!</span>',
'Already have an account? <span class="link" onclick="showLogin()">Login!</span>',
'<button class="btn-block" onclick="popupDissmiss()">Canceleee</button>\
<button class="btn-block primary" form="registerForm" type="submit">Register</button>',
'<form id="registerForm" onsubmit="return register(event)">\

View file

@ -73,11 +73,8 @@ window.onload = function () {
// Convert to local time
times[i].innerHTML = dateTime.toLocaleDateString() + ' ' + dateTime.toLocaleTimeString();
}
};
window.onscroll = function () {
loadOnView();
// Jump to top button
// Top Of Page button
let topOfPage = document.querySelector('.top-of-page');
if (document.body.scrollTop > 300 || document.documentElement.scrollTop > 20) {
topOfPage.classList.add('show');
@ -88,6 +85,45 @@ window.onscroll = function () {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
// Info button
let infoButton = document.querySelector('.info-button');
if (document.body.scrollTop > 300 || document.documentElement.scrollTop > 20) {
infoButton.classList.remove('show');
} else {
infoButton.classList.add('show');
}
infoButton.onclick = function () {
popUpShow('OnlyLegs Gallery', 'Made by Fluffy with ❤️ <br>' +
'<a href="https://github.com/Fluffy-Bean/onlylegs">Version: 23.03.23</a>');
}
};
window.onscroll = function () {
loadOnView();
// Top Of Page button
let topOfPage = document.querySelector('.top-of-page');
if (document.body.scrollTop > 300 || document.documentElement.scrollTop > 20) {
topOfPage.classList.add('show');
} else {
topOfPage.classList.remove('show');
}
topOfPage.onclick = function () {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
// Info button
let infoButton = document.querySelector('.info-button');
if (document.body.scrollTop > 300 || document.documentElement.scrollTop > 20) {
infoButton.classList.remove('show');
} else {
infoButton.classList.add('show');
}
infoButton.onclick = function () {
popUpShow('OnlyLegs Gallery', 'Made by Fluffy with ❤️ <br>' +
'<a href="https://github.com/Fluffy-Bean/onlylegs">Version: 23.03.23</a>');
}
};
window.onresize = function () {
loadOnView();

View file

@ -4,13 +4,16 @@
{% block content %}
<div class="banner">
<img src="{{ url_for('static', filename='images/bg.svg') }}" onload="imgFade(this)" style="opacity:0;"/>
<span class="banner-filter"></span>
<div class="banner-content">
<p>{{ config.WEBSITE.motto }}</p>
<h1>Groups</h1>
<p>{{ groups|length }} Groups</p>
<h1>Photo Groups</h1>
{% if groups|length == 0 %}
<p>0 photo groups :<</p>
{% elif groups|length == 69 %}
<p>{{ groups|length }} photo groups, uwu</p>
{% else %}
<p>{{ groups|length }} photo groups</p>
{% endif %}
</div>
</div>

View file

@ -4,13 +4,16 @@
{% block content %}
<div class="banner">
<img src="{{ url_for('static', filename='images/bg.svg') }}" onload="imgFade(this)" style="opacity:0;"/>
<span class="banner-filter"></span>
<div class="banner-content">
<p>{{ config.WEBSITE.motto }}</p>
<h1>{{ config.WEBSITE.name }}</h1>
<p>Serving {{ images|length }} images</p>
{% if images|length == 0 %}
<p>Serving 0 images :<</p>
{% elif images|length == 69 %}
<p>Serving {{ images|length }} images, nice</p>
{% else %}
<p>Serving {{ images|length }} images</p>
{% endif %}
</div>
</div>
@ -28,12 +31,7 @@
</div>
{% else %}
<div class="big-text">
<h1>No images</h1>
{% if g.user %}
<p>You can get started by uploading an image!</p>
{% else %}
<p>Login to start uploading images!</p>
{% endif %}
<h1>*crickets chirping*</h1>
</div>
{% endif %}
{% endblock %}

View file

@ -38,7 +38,12 @@
<body>
<div class="notifications"></div>
<svg class="top-of-page" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 256 256"><path d="M224,120H176v88a8,8,0,0,1-8,8H88a8,8,0,0,1-8-8V120H32l96-96Z" opacity="0.2"></path><path d="M229.66,114.34l-96-96a8,8,0,0,0-11.32,0l-96,96A8,8,0,0,0,32,128H72v80a16,16,0,0,0,16,16h80a16,16,0,0,0,16-16V128h40a8,8,0,0,0,5.66-13.66ZM176,112a8,8,0,0,0-8,8v88H88V120a8,8,0,0,0-8-8H51.31L128,35.31,204.69,112Z"></path></svg>
<button class="top-of-page">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 256 256"><path d="M200,144H56l72-72Z" opacity="0.2"></path><path d="M133.66,66.34a8,8,0,0,0-11.32,0l-72,72A8,8,0,0,0,56,152h64v72a8,8,0,0,0,16,0V152h64a8,8,0,0,0,5.66-13.66ZM75.31,136,128,83.31,180.69,136ZM224,40a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,40Z"></path></svg>
</button>
<button class="info-button">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 256 256"><path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"></path><path d="M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z"></path></svg>
</button>
<div class="pop-up">
<span class="pop-up__click-off" onclick="popupDissmiss()"></span>

View file

@ -1,11 +1,11 @@
.banner
width: 100%
height: 40vh
height: 50vh
position: relative
background-color: $black
color: $black
color: $white
overflow: hidden
transition: opacity 0.3s ease-in-out
@ -18,7 +18,7 @@
width: 100%
height: 100%
background-color: $black
background-color: $black2
object-fit: cover
object-position: center center
@ -46,7 +46,6 @@
display: flex
flex-direction: column
justify-content: flex-end
gap: 0.5rem
z-index: +2
@ -55,22 +54,19 @@
padding: 0
font-size: 6.9rem
font-weight: 700
line-height: 1
font-weight: 800
text-align: left
color: $black
color: $primary
p
margin: 0
padding: 0
font-size: 1rem
font-weight: 600
font-weight: 500
line-height: 1
text-align: left
color: $black
text-align: left
@media (max-width: $breakpoint)
.banner

View file

@ -26,7 +26,7 @@
font-weight: 600
text-align: center
background-color: transparent
background-color: rgba($white, 0.1)
color: $white
border: none
border-radius: $rad-inner
@ -36,10 +36,10 @@
transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out
&:hover
background-color: $black
background-color: rgba($white, 0.3)
&:focus-visible
outline: 2px solid rgba($black, 0.5)
outline: 2px solid rgba($white, 0.5)
&.primary
@include btn-block($primary)
@ -152,6 +152,10 @@
opacity: 0
cursor: pointer
&:hover
background-color: rgba($white, 0.2)
color: $white
&.active
background-color: rgba($primary, 0.2)
color: $primary

View file

@ -0,0 +1,41 @@
.info-button
margin: 0
padding: 0
width: auto
height: auto
position: fixed
bottom: 0.75rem
right: -3rem
display: flex
justify-content: center
align-items: center
background-color: $black2
color: $white
border-radius: $rad
border: none
opacity: 0
z-index: 20
cursor: pointer
transition: all 0.2s cubic-bezier(.86, 0, .07, 1)
&:hover
color: $info
svg
margin: 0.5rem
width: 1.25rem
height: 1.25rem
&.show
right: 0.75rem
opacity: 1
@media (max-width: $breakpoint)
.info-button
bottom: 4.25rem

View file

@ -1,33 +1,37 @@
.top-of-page
margin: 0
padding: 0.55rem
padding: 0
width: 2.5rem
height: 2.5rem
width: auto
height: auto
position: fixed
bottom: 0.75rem
right: -3rem
display: flex // hidden
display: flex
justify-content: center
align-items: center
border-radius: 50%
background-color: $black
background-color: $black2
color: $white
opacity: 0 // hidden
z-index: 2
border-radius: $rad
border: none
opacity: 0
z-index: 20
cursor: pointer
transition: all 0.2s cubic-bezier(.86, 0, .07, 1)
&:hover
background-color: $black
color: $primary
svg
margin: 0.5rem
width: 1.25rem
height: 1.25rem
&.show
right: 0.75rem
opacity: 1

View file

@ -70,9 +70,8 @@
top: 0
font-size: 2.25rem
font-weight: 600
font-weight: 700
text-align: center
line-height: 1
color: $white
background-color: $black
@ -85,10 +84,30 @@
font-size: 1rem
font-weight: 500
text-align: center
line-height: 1
color: $white
svg
width: 1rem
height: 1rem
display: inline-block
vertical-align: middle
a, .link
font-size: 1rem
font-weight: 500
text-align: center
line-height: 1
color: $primary
cursor: pointer
text-decoration: none
&:hover
text-decoration: underline
img
margin: auto
padding: 0
@ -133,18 +152,10 @@
.pop-up-wrapper
transform: translate(-50%, 50%) scale(1)
.pop-up__link
color: $primary
text-decoration: none
&:hover
text-decoration: underline
cursor: pointer
@media (max-width: $breakpoint)
.pop-up
.pop-up-wrapper
width: calc(100% - 1rem)
width: calc(100% - 0.75rem)
max-height: 95vh
.pop-up-content

View file

@ -18,10 +18,10 @@
margin: 0
padding: 0
font-size: 1.5rem
font-weight: 600
font-size: 1.75rem
font-weight: 700
color: $white
color: $primary
p
margin: 0

Binary file not shown.

Binary file not shown.

View file

@ -14,6 +14,7 @@
@import "components/gallery"
@import "components/buttons/top-of-page"
@import "components/buttons/info-button"
@import "components/buttons/pill"
@import "components/buttons/block"

View file

@ -22,7 +22,7 @@ $rad-inner: 3px
$animation-smooth: cubic-bezier(0.76, 0, 0.17, 1)
$animation-bounce: cubic-bezier(.68,-0.55,.27,1.55)
$font: "Work Sans", sans-serif
$font: "Manrope", sans-serif
$breakpoint: 800px
@font-face
@ -38,4 +38,10 @@ $breakpoint: 800px
@font-face
font-family: 'Work Sans'
src: url('fonts/worksans-black.woff2')
font-weight: 900
font-weight: 900
@font-face
font-family: 'Manrope'
src: url('fonts/Manrope[wght].woff2') format('woff2')
font-style: normal;
font-display: swap;