mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-06-29 03:26:16 +00:00
Switch to Manrope font
Fix inconsistent buttons
Removed default header background
Added info button with version and ❤️
Random fixes
This commit is contained in:
parent
ad8da1ae4e
commit
4e7301b9de
15 changed files with 169 additions and 64 deletions
|
@ -2,7 +2,7 @@
|
||||||
function showLogin() {
|
function showLogin() {
|
||||||
popUpShow(
|
popUpShow(
|
||||||
'Login!',
|
'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" onclick="popupDissmiss()">Cancelee</button>' +
|
||||||
'<button class="btn-block primary" form="loginForm" type="submit">Login</button>',
|
'<button class="btn-block primary" form="loginForm" type="submit">Login</button>',
|
||||||
'<form id="loginForm" onsubmit="return login(event)">' +
|
'<form id="loginForm" onsubmit="return login(event)">' +
|
||||||
|
@ -57,7 +57,7 @@ function login(event) {
|
||||||
function showRegister() {
|
function showRegister() {
|
||||||
popUpShow(
|
popUpShow(
|
||||||
'Who are you?',
|
'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" onclick="popupDissmiss()">Canceleee</button>\
|
||||||
<button class="btn-block primary" form="registerForm" type="submit">Register</button>',
|
<button class="btn-block primary" form="registerForm" type="submit">Register</button>',
|
||||||
'<form id="registerForm" onsubmit="return register(event)">\
|
'<form id="registerForm" onsubmit="return register(event)">\
|
||||||
|
|
|
@ -73,11 +73,8 @@ window.onload = function () {
|
||||||
// Convert to local time
|
// Convert to local time
|
||||||
times[i].innerHTML = dateTime.toLocaleDateString() + ' ' + dateTime.toLocaleTimeString();
|
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');
|
let topOfPage = document.querySelector('.top-of-page');
|
||||||
if (document.body.scrollTop > 300 || document.documentElement.scrollTop > 20) {
|
if (document.body.scrollTop > 300 || document.documentElement.scrollTop > 20) {
|
||||||
topOfPage.classList.add('show');
|
topOfPage.classList.add('show');
|
||||||
|
@ -88,6 +85,45 @@ window.onscroll = function () {
|
||||||
document.body.scrollTop = 0;
|
document.body.scrollTop = 0;
|
||||||
document.documentElement.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 () {
|
window.onresize = function () {
|
||||||
loadOnView();
|
loadOnView();
|
||||||
|
|
|
@ -4,13 +4,16 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="banner">
|
<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">
|
<div class="banner-content">
|
||||||
<p>{{ config.WEBSITE.motto }}</p>
|
<p>{{ config.WEBSITE.motto }}</p>
|
||||||
<h1>Groups</h1>
|
<h1>Photo Groups</h1>
|
||||||
<p>{{ groups|length }} Groups</p>
|
{% 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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -4,13 +4,16 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="banner">
|
<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">
|
<div class="banner-content">
|
||||||
<p>{{ config.WEBSITE.motto }}</p>
|
<p>{{ config.WEBSITE.motto }}</p>
|
||||||
<h1>{{ config.WEBSITE.name }}</h1>
|
<h1>{{ config.WEBSITE.name }}</h1>
|
||||||
|
{% 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>
|
<p>Serving {{ images|length }} images</p>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -28,12 +31,7 @@
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="big-text">
|
<div class="big-text">
|
||||||
<h1>No images</h1>
|
<h1>*crickets chirping*</h1>
|
||||||
{% if g.user %}
|
|
||||||
<p>You can get started by uploading an image!</p>
|
|
||||||
{% else %}
|
|
||||||
<p>Login to start uploading images!</p>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -38,7 +38,12 @@
|
||||||
<body>
|
<body>
|
||||||
<div class="notifications"></div>
|
<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">
|
<div class="pop-up">
|
||||||
<span class="pop-up__click-off" onclick="popupDissmiss()"></span>
|
<span class="pop-up__click-off" onclick="popupDissmiss()"></span>
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
.banner
|
.banner
|
||||||
width: 100%
|
width: 100%
|
||||||
height: 40vh
|
height: 50vh
|
||||||
|
|
||||||
position: relative
|
position: relative
|
||||||
|
|
||||||
background-color: $black
|
background-color: $black
|
||||||
color: $black
|
color: $white
|
||||||
|
|
||||||
overflow: hidden
|
overflow: hidden
|
||||||
transition: opacity 0.3s ease-in-out
|
transition: opacity 0.3s ease-in-out
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
width: 100%
|
width: 100%
|
||||||
height: 100%
|
height: 100%
|
||||||
|
|
||||||
background-color: $black
|
background-color: $black2
|
||||||
|
|
||||||
object-fit: cover
|
object-fit: cover
|
||||||
object-position: center center
|
object-position: center center
|
||||||
|
@ -46,7 +46,6 @@
|
||||||
display: flex
|
display: flex
|
||||||
flex-direction: column
|
flex-direction: column
|
||||||
justify-content: flex-end
|
justify-content: flex-end
|
||||||
gap: 0.5rem
|
|
||||||
|
|
||||||
z-index: +2
|
z-index: +2
|
||||||
|
|
||||||
|
@ -55,23 +54,20 @@
|
||||||
padding: 0
|
padding: 0
|
||||||
|
|
||||||
font-size: 6.9rem
|
font-size: 6.9rem
|
||||||
font-weight: 700
|
font-weight: 800
|
||||||
line-height: 1
|
|
||||||
text-align: left
|
text-align: left
|
||||||
|
|
||||||
color: $black
|
color: $primary
|
||||||
|
|
||||||
p
|
p
|
||||||
margin: 0
|
margin: 0
|
||||||
padding: 0
|
padding: 0
|
||||||
|
|
||||||
font-size: 1rem
|
font-size: 1rem
|
||||||
font-weight: 600
|
font-weight: 500
|
||||||
line-height: 1
|
line-height: 1
|
||||||
text-align: left
|
text-align: left
|
||||||
|
|
||||||
color: $black
|
|
||||||
|
|
||||||
@media (max-width: $breakpoint)
|
@media (max-width: $breakpoint)
|
||||||
.banner
|
.banner
|
||||||
width: 100vw
|
width: 100vw
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
font-weight: 600
|
font-weight: 600
|
||||||
text-align: center
|
text-align: center
|
||||||
|
|
||||||
background-color: transparent
|
background-color: rgba($white, 0.1)
|
||||||
color: $white
|
color: $white
|
||||||
border: none
|
border: none
|
||||||
border-radius: $rad-inner
|
border-radius: $rad-inner
|
||||||
|
@ -36,10 +36,10 @@
|
||||||
transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out
|
transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
background-color: $black
|
background-color: rgba($white, 0.3)
|
||||||
|
|
||||||
&:focus-visible
|
&:focus-visible
|
||||||
outline: 2px solid rgba($black, 0.5)
|
outline: 2px solid rgba($white, 0.5)
|
||||||
|
|
||||||
&.primary
|
&.primary
|
||||||
@include btn-block($primary)
|
@include btn-block($primary)
|
||||||
|
@ -152,6 +152,10 @@
|
||||||
opacity: 0
|
opacity: 0
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
background-color: rgba($white, 0.2)
|
||||||
|
color: $white
|
||||||
|
|
||||||
&.active
|
&.active
|
||||||
background-color: rgba($primary, 0.2)
|
background-color: rgba($primary, 0.2)
|
||||||
color: $primary
|
color: $primary
|
||||||
|
|
41
gallery/themes/default/components/buttons/info-button.sass
Normal file
41
gallery/themes/default/components/buttons/info-button.sass
Normal 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
|
|
@ -1,33 +1,37 @@
|
||||||
.top-of-page
|
.top-of-page
|
||||||
margin: 0
|
margin: 0
|
||||||
padding: 0.55rem
|
padding: 0
|
||||||
|
|
||||||
width: 2.5rem
|
width: auto
|
||||||
height: 2.5rem
|
height: auto
|
||||||
|
|
||||||
position: fixed
|
position: fixed
|
||||||
bottom: 0.75rem
|
bottom: 0.75rem
|
||||||
right: -3rem
|
right: -3rem
|
||||||
|
|
||||||
display: flex // hidden
|
display: flex
|
||||||
justify-content: center
|
justify-content: center
|
||||||
align-items: center
|
align-items: center
|
||||||
|
|
||||||
border-radius: 50%
|
background-color: $black2
|
||||||
background-color: $black
|
|
||||||
color: $white
|
color: $white
|
||||||
opacity: 0 // hidden
|
border-radius: $rad
|
||||||
|
border: none
|
||||||
z-index: 2
|
opacity: 0
|
||||||
|
|
||||||
|
z-index: 20
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
|
|
||||||
transition: all 0.2s cubic-bezier(.86, 0, .07, 1)
|
transition: all 0.2s cubic-bezier(.86, 0, .07, 1)
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
background-color: $black
|
|
||||||
color: $primary
|
color: $primary
|
||||||
|
|
||||||
|
svg
|
||||||
|
margin: 0.5rem
|
||||||
|
|
||||||
|
width: 1.25rem
|
||||||
|
height: 1.25rem
|
||||||
|
|
||||||
&.show
|
&.show
|
||||||
right: 0.75rem
|
right: 0.75rem
|
||||||
opacity: 1
|
opacity: 1
|
||||||
|
|
|
@ -70,9 +70,8 @@
|
||||||
top: 0
|
top: 0
|
||||||
|
|
||||||
font-size: 2.25rem
|
font-size: 2.25rem
|
||||||
font-weight: 600
|
font-weight: 700
|
||||||
text-align: center
|
text-align: center
|
||||||
line-height: 1
|
|
||||||
|
|
||||||
color: $white
|
color: $white
|
||||||
background-color: $black
|
background-color: $black
|
||||||
|
@ -85,10 +84,30 @@
|
||||||
font-size: 1rem
|
font-size: 1rem
|
||||||
font-weight: 500
|
font-weight: 500
|
||||||
text-align: center
|
text-align: center
|
||||||
line-height: 1
|
|
||||||
|
|
||||||
color: $white
|
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
|
img
|
||||||
margin: auto
|
margin: auto
|
||||||
padding: 0
|
padding: 0
|
||||||
|
@ -133,18 +152,10 @@
|
||||||
.pop-up-wrapper
|
.pop-up-wrapper
|
||||||
transform: translate(-50%, 50%) scale(1)
|
transform: translate(-50%, 50%) scale(1)
|
||||||
|
|
||||||
.pop-up__link
|
|
||||||
color: $primary
|
|
||||||
text-decoration: none
|
|
||||||
|
|
||||||
&:hover
|
|
||||||
text-decoration: underline
|
|
||||||
cursor: pointer
|
|
||||||
|
|
||||||
@media (max-width: $breakpoint)
|
@media (max-width: $breakpoint)
|
||||||
.pop-up
|
.pop-up
|
||||||
.pop-up-wrapper
|
.pop-up-wrapper
|
||||||
width: calc(100% - 1rem)
|
width: calc(100% - 0.75rem)
|
||||||
max-height: 95vh
|
max-height: 95vh
|
||||||
|
|
||||||
.pop-up-content
|
.pop-up-content
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
margin: 0
|
margin: 0
|
||||||
padding: 0
|
padding: 0
|
||||||
|
|
||||||
font-size: 1.5rem
|
font-size: 1.75rem
|
||||||
font-weight: 600
|
font-weight: 700
|
||||||
|
|
||||||
color: $white
|
color: $primary
|
||||||
|
|
||||||
p
|
p
|
||||||
margin: 0
|
margin: 0
|
||||||
|
|
BIN
gallery/themes/default/fonts/Manrope[wght].ttf
Normal file
BIN
gallery/themes/default/fonts/Manrope[wght].ttf
Normal file
Binary file not shown.
BIN
gallery/themes/default/fonts/Manrope[wght].woff2
Normal file
BIN
gallery/themes/default/fonts/Manrope[wght].woff2
Normal file
Binary file not shown.
|
@ -14,6 +14,7 @@
|
||||||
@import "components/gallery"
|
@import "components/gallery"
|
||||||
|
|
||||||
@import "components/buttons/top-of-page"
|
@import "components/buttons/top-of-page"
|
||||||
|
@import "components/buttons/info-button"
|
||||||
@import "components/buttons/pill"
|
@import "components/buttons/pill"
|
||||||
@import "components/buttons/block"
|
@import "components/buttons/block"
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ $rad-inner: 3px
|
||||||
$animation-smooth: cubic-bezier(0.76, 0, 0.17, 1)
|
$animation-smooth: cubic-bezier(0.76, 0, 0.17, 1)
|
||||||
$animation-bounce: cubic-bezier(.68,-0.55,.27,1.55)
|
$animation-bounce: cubic-bezier(.68,-0.55,.27,1.55)
|
||||||
|
|
||||||
$font: "Work Sans", sans-serif
|
$font: "Manrope", sans-serif
|
||||||
$breakpoint: 800px
|
$breakpoint: 800px
|
||||||
|
|
||||||
@font-face
|
@font-face
|
||||||
|
@ -39,3 +39,9 @@ $breakpoint: 800px
|
||||||
font-family: 'Work Sans'
|
font-family: 'Work Sans'
|
||||||
src: url('fonts/worksans-black.woff2')
|
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;
|
Loading…
Add table
Add a link
Reference in a new issue