mirror of
https://github.com/Fluffy-Bean/Fluffys-website.git
synced 2025-05-29 06:43:13 +00:00
Make page not look shit
This commit is contained in:
parent
c1559307b6
commit
c32d7e3246
33 changed files with 716 additions and 715 deletions
|
@ -1,130 +0,0 @@
|
|||
@mixin aside-item($color) {
|
||||
background-color: rgba($color, 0.1);
|
||||
border: 1px solid rgba($color, 0.5);
|
||||
color: $color;
|
||||
}
|
||||
|
||||
.aside {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
background-color: $black;
|
||||
|
||||
box-sizing: border-box;
|
||||
z-index: 68;
|
||||
|
||||
hr {
|
||||
margin: 0.5rem auto;
|
||||
padding: 0;
|
||||
|
||||
width: 80%;
|
||||
height: 1px;
|
||||
|
||||
background-color: $white;
|
||||
border: none;
|
||||
}
|
||||
|
||||
br {
|
||||
margin: 0.5rem 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
.aside-container {
|
||||
margin: 0;
|
||||
padding: 1rem;
|
||||
|
||||
position: sticky;
|
||||
top: 0;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
.aside-item {
|
||||
margin: 0;
|
||||
padding: 0.75rem;
|
||||
|
||||
width: 100%;
|
||||
height: auto;
|
||||
|
||||
background-color: transparent;
|
||||
color: $white;
|
||||
|
||||
text-decoration: none;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
|
||||
border: 1px solid transparent;
|
||||
border-radius: 3px;
|
||||
|
||||
transition: all 0.2s ease-in-out;
|
||||
cursor: pointer;
|
||||
|
||||
i {
|
||||
opacity: 0;
|
||||
transform: translateX(1rem);
|
||||
transition: all 0.2s ease-in-out;
|
||||
filter: blur(0.1rem);
|
||||
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
&:hover i {
|
||||
opacity: 1;
|
||||
transform: translateX(0);
|
||||
filter: blur(0);
|
||||
}
|
||||
}
|
||||
.aside-red {
|
||||
@include aside-item($red);
|
||||
}
|
||||
.aside-yellow {
|
||||
@include aside-item($yellow);
|
||||
}
|
||||
.aside-green {
|
||||
@include aside-item($green);
|
||||
}
|
||||
.aside-blue {
|
||||
@include aside-item($blue);
|
||||
}
|
||||
.aside-purple {
|
||||
@include aside-item($purple);
|
||||
}
|
||||
|
||||
@media screen and (max-width: $phone-width) {
|
||||
@media screen and (min-width: calc(#{$phone-width} * 0.6)) {
|
||||
.aside {
|
||||
max-width: 20rem;
|
||||
}
|
||||
}
|
||||
|
||||
.aside {
|
||||
display: block;
|
||||
|
||||
position: fixed;
|
||||
top: 3rem;
|
||||
left: -100vw;
|
||||
|
||||
width: 100vw;
|
||||
height: calc(100vh - 3rem);
|
||||
|
||||
background-color: #121212;
|
||||
|
||||
overflow-y: auto;
|
||||
box-shadow: 0 0 0.5rem 5px rgba($black, 0.5);
|
||||
transition: left 0.2s ease-in-out, opacity 0.2s ease-in-out;
|
||||
|
||||
hr {
|
||||
margin: 1rem auto;
|
||||
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.aside-active {
|
||||
opacity: 1;
|
||||
left: 0;
|
||||
}
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
.footer {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
background-color: $black;
|
||||
color: $white;
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: $phone-width) {
|
||||
.footer {
|
||||
background-color: $black;
|
||||
color: $white;
|
||||
}
|
||||
}
|
|
@ -1,67 +0,0 @@
|
|||
.nav {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
background-color: $black;
|
||||
color: $white;
|
||||
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
|
||||
position: relative;
|
||||
|
||||
z-index: 69;
|
||||
|
||||
p {
|
||||
margin: 0 1rem;
|
||||
padding: 0;
|
||||
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
.nav-toggle {
|
||||
margin: 0;
|
||||
padding: 0.5rem 1rem;
|
||||
|
||||
display: none;
|
||||
|
||||
background-color: transparent;
|
||||
color: $white;
|
||||
|
||||
border: none;
|
||||
|
||||
i {
|
||||
font-size: 1.5rem;
|
||||
|
||||
display: inline-block;
|
||||
|
||||
// display the hamburger icon vertically centered
|
||||
line-height: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: $phone-width) {
|
||||
.nav {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
width: 100vw;
|
||||
height: 3rem;
|
||||
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
||||
justify-content: space-between;
|
||||
|
||||
background-color: $black;
|
||||
color: $white;
|
||||
}
|
||||
.nav-toggle {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
|
@ -1,147 +0,0 @@
|
|||
@mixin btn-hover($color) {
|
||||
background-color: rgba($color, 0.1);
|
||||
border: 1px solid rgba($color, 0.5);
|
||||
color: $color;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
background-color: #101010;
|
||||
color: $white;
|
||||
|
||||
border-radius: calc(0.8rem + 3px) 0 0 0;
|
||||
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
hr {
|
||||
margin: 0.5rem 1rem;
|
||||
padding: 0;
|
||||
|
||||
height: 1px;
|
||||
|
||||
background-color: $white;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
margin: 1rem;
|
||||
|
||||
position: relative;
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
.content-header {
|
||||
padding: 1rem;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
|
||||
background-color: rgba($white, 0.1);
|
||||
border: 1px solid rgba($white, 0.5);
|
||||
border-radius: 3px;
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
font-size: 2rem;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.content-default {
|
||||
padding: 1rem;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
|
||||
background-color: rgba($white, 0.1);
|
||||
border: 1px solid rgba($white, 0.5);
|
||||
border-radius: 3px;
|
||||
}
|
||||
.content-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
.content-img {
|
||||
padding: 1rem;
|
||||
|
||||
display: flex;
|
||||
|
||||
background-color: rgba($white, 0.1);
|
||||
border: 1px solid rgba($white, 0.5);
|
||||
border-radius: 3px;
|
||||
|
||||
img {
|
||||
margin: auto;
|
||||
padding: 0;
|
||||
|
||||
width: 100%;
|
||||
height: auto;
|
||||
|
||||
border-radius: 3px;
|
||||
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 0;
|
||||
padding: 1.5rem;
|
||||
|
||||
width: auto;
|
||||
height: auto;
|
||||
|
||||
background-color: transparent;
|
||||
color: $white;
|
||||
|
||||
text-decoration: none;
|
||||
font-size: 1rem;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.5rem;
|
||||
|
||||
border: 1px solid transparent;
|
||||
border-radius: 3px;
|
||||
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
.btn-red:hover {
|
||||
@include btn-hover($red);
|
||||
}
|
||||
.btn-yellow:hover {
|
||||
@include btn-hover($yellow);
|
||||
}
|
||||
.btn-green:hover {
|
||||
@include btn-hover($green);
|
||||
}
|
||||
.btn-blue:hover {
|
||||
@include btn-hover($blue);
|
||||
}
|
||||
.btn-purple:hover {
|
||||
@include btn-hover($purple);
|
||||
}
|
||||
|
||||
|
||||
@media screen and (max-width: $phone-width) {
|
||||
.wrapper {
|
||||
margin: 0;
|
||||
padding: 3rem 0 0 0;
|
||||
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
36
static/css/buttons.sass
Normal file
36
static/css/buttons.sass
Normal file
|
@ -0,0 +1,36 @@
|
|||
.btn
|
||||
margin: 0
|
||||
padding: 0.5rem 1rem
|
||||
|
||||
width: auto
|
||||
height: 2.5rem
|
||||
|
||||
position: relative
|
||||
|
||||
display: flex
|
||||
justify-content: center
|
||||
align-items: center
|
||||
|
||||
border: transparent 0 solid
|
||||
border-radius: 2px
|
||||
|
||||
background: $black
|
||||
color: $white !important
|
||||
|
||||
font-size: 1rem
|
||||
font-weight: 500
|
||||
line-height: 1
|
||||
|
||||
text-decoration: none
|
||||
text-align: center
|
||||
text-transform: uppercase
|
||||
|
||||
cursor: pointer
|
||||
transition: all 0.2s ease-in-out
|
||||
|
||||
&:hover
|
||||
background: $white
|
||||
color: $black !important
|
||||
|
||||
&:focus
|
||||
outline: none
|
|
@ -1,34 +0,0 @@
|
|||
body {
|
||||
min-height: 100vh;
|
||||
|
||||
display: grid;
|
||||
grid-template-areas: 'aside nav'
|
||||
'aside wrapper'
|
||||
'footer wrapper';
|
||||
|
||||
grid-template-rows: 3rem auto 3rem;
|
||||
grid-template-columns: 20rem 1fr;
|
||||
}
|
||||
|
||||
.nav {
|
||||
grid-area: nav;
|
||||
}
|
||||
.wrapper {
|
||||
grid-area: wrapper;
|
||||
}
|
||||
.aside {
|
||||
grid-area: aside;
|
||||
}
|
||||
.footer {
|
||||
grid-area: footer;
|
||||
}
|
||||
|
||||
@media screen and (max-width: $phone-width) {
|
||||
body {
|
||||
grid-template-areas: 'wrapper'
|
||||
'footer';
|
||||
|
||||
grid-template-rows: 1fr 3rem;
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
* {
|
||||
box-sizing: border-box;
|
||||
|
||||
font-family: $font-header;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
html {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
background-color: $black;
|
||||
color: $white;
|
||||
|
||||
-ms-overflow-style: none;
|
||||
scrollbar-width: none;
|
||||
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
min-height: 100vh;
|
||||
|
||||
background-color: $black;
|
||||
|
||||
scroll-behavior: smooth;
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
$black: #151515;
|
||||
$white: #e8e3e3;
|
||||
|
||||
$red: #B66467;
|
||||
$yellow: #D9BC8C;
|
||||
$green: #8C977D;
|
||||
$blue: #8DA3B9;
|
||||
//$dblue: #222c45;
|
||||
$purple: #A988B0;
|
||||
|
||||
$primary: #f5622d;
|
||||
|
||||
@font-face {
|
||||
font-family: 'Mona-Sans';
|
||||
src: url('../fonts/Mona-Sans.woff2') format('woff2 supports variations'),
|
||||
url('../fonts/Mona-Sans.woff2') format('woff2-variations');
|
||||
font-weight: 200 900;
|
||||
font-stretch: 75% 125%;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Hubot-Sans';
|
||||
src: url('../fonts/Hubot-Sans.woff2') format('woff2 supports variations'),
|
||||
url('../fonts/Hubot-Sans.woff2') format('woff2-variations');
|
||||
font-weight: 200 900;
|
||||
font-stretch: 75% 125%;
|
||||
}
|
||||
|
||||
$font-header: "Mona-Sans", sans-serif;
|
||||
$font-body: "Hubot-Sans", sans-serif;
|
||||
|
||||
$phone-width: 900px;
|
||||
|
||||
@function hexToRGB($hex) {
|
||||
@return red($hex), green($hex), blue($hex);
|
||||
}
|
||||
|
||||
:root {
|
||||
--red: #{hexToRGB($red)};
|
||||
--yellow: #{hexToRGB($yellow)};
|
||||
--green: #{hexToRGB($green)};
|
||||
--blue: #{hexToRGB($blue)};
|
||||
--purple: #{hexToRGB($purple)};
|
||||
}
|
||||
|
||||
// I want to use this somewhere
|
||||
//background: linear-gradient(200deg, rgba($primary, 0.5) 1.7%, rgba($black, 0) 30%);
|
300
static/css/style.sass
Normal file
300
static/css/style.sass
Normal file
|
@ -0,0 +1,300 @@
|
|||
$black: #101010
|
||||
$dark: #151515
|
||||
$grey: #808080
|
||||
$white: #e8e3e3
|
||||
$primary: #8C977D
|
||||
|
||||
@font-face
|
||||
font-family: 'jetbrains_monoitalic'
|
||||
src: url('../fonts/jetbrainsmono-italic-variablefont_wght-webfont.woff2') format('woff2'), url('../fonts/jetbrainsmono-italic-variablefont_wght-webfont.woff') format('woff')
|
||||
font-weight: normal
|
||||
font-style: normal
|
||||
font-display: swap
|
||||
@font-face
|
||||
font-family: 'jetbrains_monoregular'
|
||||
src: url('../fonts/jetbrainsmono-variablefont_wght-webfont.woff2') format('woff2'), url('../fonts/jetbrainsmono-variablefont_wght-webfont.woff') format('woff')
|
||||
font-weight: normal
|
||||
font-style: normal
|
||||
font-display: swap
|
||||
|
||||
html
|
||||
margin: 0
|
||||
padding: 0
|
||||
body
|
||||
margin: 0
|
||||
padding: 3rem 1rem 1rem
|
||||
width: 100vw
|
||||
min-height: 100vh
|
||||
|
||||
background-color: $black
|
||||
|
||||
font-family: 'jetbrains_monoregular', sans-serif
|
||||
|
||||
display: flex
|
||||
justify-content: center
|
||||
align-items: center
|
||||
|
||||
overflow-x: hidden
|
||||
box-sizing: border-box
|
||||
|
||||
*
|
||||
box-sizing: border-box
|
||||
|
||||
nav
|
||||
margin: 0
|
||||
padding: 0.5rem 1rem
|
||||
|
||||
width: 100vw
|
||||
height: 3rem
|
||||
|
||||
position: fixed
|
||||
top: 0
|
||||
left: 0
|
||||
|
||||
display: flex
|
||||
justify-content: center
|
||||
align-items: center
|
||||
gap: 1rem
|
||||
|
||||
z-index: 1
|
||||
|
||||
color: $white
|
||||
|
||||
a
|
||||
margin: 0
|
||||
padding: 0
|
||||
|
||||
width: auto
|
||||
height: 2rem
|
||||
|
||||
position: relative
|
||||
|
||||
display: flex
|
||||
justify-content: center
|
||||
align-items: center
|
||||
|
||||
font-size: 1.1rem
|
||||
font-weight: 400
|
||||
line-height: 1
|
||||
|
||||
text-align: left
|
||||
text-decoration: none
|
||||
text-transform: uppercase
|
||||
|
||||
color: $grey
|
||||
|
||||
&:hover
|
||||
color: $white
|
||||
|
||||
a.selected
|
||||
color: $primary
|
||||
|
||||
&:hover
|
||||
color: $white
|
||||
|
||||
span
|
||||
margin: 0 0 0.2rem 0
|
||||
padding: 0
|
||||
|
||||
width: 2px
|
||||
height: 1.25rem
|
||||
|
||||
position: relative
|
||||
|
||||
display: flex
|
||||
justify-content: center
|
||||
align-items: center
|
||||
|
||||
background-color: $grey
|
||||
|
||||
.wrapper
|
||||
margin: 0 auto
|
||||
padding: 1rem
|
||||
|
||||
width: 100%
|
||||
max-width: 621px
|
||||
|
||||
min-height: auto
|
||||
|
||||
position: relative
|
||||
|
||||
display: flex
|
||||
flex-direction: column
|
||||
gap: 1rem
|
||||
|
||||
background: $dark
|
||||
color: $white
|
||||
border-radius: 2px
|
||||
|
||||
z-index: 2
|
||||
box-sizing: border-box
|
||||
overflow: hidden
|
||||
|
||||
h1
|
||||
margin: 0 // 0 1rem 0
|
||||
padding: 0
|
||||
|
||||
font-size: 2.25rem
|
||||
font-weight: 600
|
||||
line-height: 1
|
||||
|
||||
text-align: left
|
||||
text-transform: uppercase
|
||||
white-space: break-spaces
|
||||
|
||||
h2
|
||||
margin: 0
|
||||
padding: 0
|
||||
|
||||
font-size: 1.5rem
|
||||
font-weight: 600
|
||||
line-height: 1
|
||||
|
||||
text-align: left
|
||||
text-transform: uppercase
|
||||
|
||||
h3
|
||||
margin: 0
|
||||
padding: 0
|
||||
|
||||
font-size: 1.25rem
|
||||
font-weight: 600
|
||||
line-height: 1
|
||||
|
||||
text-align: left
|
||||
text-transform: uppercase
|
||||
|
||||
p
|
||||
margin: 0
|
||||
padding: 0
|
||||
|
||||
font-size: 1.1rem
|
||||
font-weight: 400
|
||||
line-height: 1.2
|
||||
|
||||
text-align: left
|
||||
|
||||
color: $grey
|
||||
|
||||
a
|
||||
margin: 0
|
||||
padding: 0
|
||||
|
||||
font-size: 1.1rem
|
||||
font-weight: 400
|
||||
line-height: 1.2
|
||||
|
||||
text-align: left
|
||||
|
||||
color: $primary
|
||||
|
||||
&:hover
|
||||
color: $white
|
||||
|
||||
img
|
||||
margin: 0 auto
|
||||
padding: 0
|
||||
|
||||
width: auto
|
||||
max-width: 100%
|
||||
|
||||
position: relative
|
||||
|
||||
display: block
|
||||
|
||||
border-radius: 2px
|
||||
|
||||
object-fit: cover
|
||||
|
||||
z-index: 1
|
||||
|
||||
p.subtitle
|
||||
color: $white
|
||||
text-transform: uppercase
|
||||
|
||||
.content
|
||||
display: flex
|
||||
flex-direction: column
|
||||
justify-content: space-between
|
||||
gap: 0.5rem
|
||||
|
||||
overflow: hidden
|
||||
|
||||
.music
|
||||
display: flex
|
||||
flex-direction: row
|
||||
gap: 1rem
|
||||
|
||||
overflow: hidden
|
||||
|
||||
.music-image
|
||||
width: 5rem
|
||||
height: 5rem
|
||||
|
||||
border-radius: 2px
|
||||
background-color: $black
|
||||
|
||||
img
|
||||
margin: 0
|
||||
padding: 0
|
||||
|
||||
width: 5rem
|
||||
height: 5rem
|
||||
|
||||
display: block
|
||||
float: left
|
||||
|
||||
border-radius: 2px
|
||||
background-color: $dark
|
||||
|
||||
object-fit: cover
|
||||
|
||||
.music-info
|
||||
display: flex
|
||||
flex-direction: column
|
||||
//justify-content: space-between
|
||||
gap: 0.5rem
|
||||
|
||||
overflow: hidden
|
||||
|
||||
a
|
||||
margin: 0
|
||||
padding: 0
|
||||
|
||||
font-size: 1.1rem
|
||||
font-weight: 600
|
||||
line-height: 1.2
|
||||
|
||||
text-align: left
|
||||
text-decoration: none
|
||||
|
||||
color: $white
|
||||
|
||||
&:hover
|
||||
color: $primary
|
||||
|
||||
p.music-nowplaying
|
||||
color: $primary
|
||||
|
||||
|
||||
@import "buttons"
|
||||
@import "toast"
|
||||
|
||||
@media (max-width: 669px)
|
||||
.wrapper
|
||||
max-width: 100%
|
||||
border-radius: 0
|
||||
|
||||
h1
|
||||
font-size: 2rem
|
||||
text-align: center
|
||||
|
||||
p.subtitle
|
||||
text-align: center
|
||||
|
||||
.music
|
||||
padding-left: 0.5rem
|
||||
border-left: 2px solid $primary
|
||||
|
||||
span, img
|
||||
display: none
|
|
@ -1,64 +0,0 @@
|
|||
@import 'scss/variables';
|
||||
@import 'scss/grid';
|
||||
|
||||
@import 'scss/normalize';
|
||||
|
||||
@import 'nav';
|
||||
@import 'aside';
|
||||
@import 'wrapper';
|
||||
@import 'footer';
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
font-size: 2rem;
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
font-size: 1.5rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.error {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
width: 80%;
|
||||
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
font-size: 5rem;
|
||||
text-align: center;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
font-size: 1.5rem;
|
||||
text-align: center;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
89
static/css/toast.sass
Normal file
89
static/css/toast.sass
Normal file
|
@ -0,0 +1,89 @@
|
|||
@keyframes toastTimeout
|
||||
0%
|
||||
left: -100%
|
||||
100%
|
||||
left: 0%
|
||||
|
||||
.toast-container
|
||||
margin: 0
|
||||
padding: 0
|
||||
|
||||
width: 100%
|
||||
height: auto
|
||||
max-width: 400px
|
||||
|
||||
position: fixed
|
||||
bottom: 0.5rem
|
||||
left: 50%
|
||||
transform: translateX(-50%)
|
||||
|
||||
display: flex
|
||||
flex-direction: column
|
||||
gap: 0.5rem
|
||||
|
||||
font-size: 1rem
|
||||
font-weight: 500
|
||||
line-height: 1
|
||||
text-align: center
|
||||
|
||||
z-index: 9999
|
||||
|
||||
.toast
|
||||
margin: 0
|
||||
padding: 0.5rem 1rem
|
||||
|
||||
min-height: 2.5rem
|
||||
|
||||
position: relative
|
||||
|
||||
display: flex
|
||||
justify-content: center
|
||||
align-items: center
|
||||
|
||||
transform: scaleY(0)
|
||||
|
||||
color: $white
|
||||
background-color: $dark
|
||||
border-radius: 2px
|
||||
|
||||
opacity: 0
|
||||
|
||||
transition: all 0.3s ease-in-out
|
||||
overflow: hidden
|
||||
|
||||
&:hover
|
||||
cursor: pointer
|
||||
|
||||
.toast-show
|
||||
opacity: 1
|
||||
transform: scaleY(1)
|
||||
|
||||
.toast-hide
|
||||
opacity: 0
|
||||
tansform: translateY(5rem)
|
||||
|
||||
.toast-time
|
||||
margin: 0
|
||||
padding: 0
|
||||
|
||||
width: 100%
|
||||
height: 2px
|
||||
|
||||
position: absolute
|
||||
bottom: 0
|
||||
left: 0%
|
||||
|
||||
background-color: $primary
|
||||
|
||||
animation: toastTimeout 5s linear forwards
|
||||
|
||||
@media (max-width: 669px)
|
||||
.toast-container
|
||||
padding: 0.5rem
|
||||
|
||||
width: 100%
|
||||
max-width: 100%
|
||||
|
||||
bottom: 0
|
||||
left: 0
|
||||
transform: none
|
Binary file not shown.
Binary file not shown.
BIN
static/fonts/jetbrainsmono-italic-variablefont_wght-webfont.woff
Normal file
BIN
static/fonts/jetbrainsmono-italic-variablefont_wght-webfont.woff
Normal file
Binary file not shown.
Binary file not shown.
BIN
static/fonts/jetbrainsmono-variablefont_wght-webfont.woff
Normal file
BIN
static/fonts/jetbrainsmono-variablefont_wght-webfont.woff
Normal file
Binary file not shown.
BIN
static/fonts/jetbrainsmono-variablefont_wght-webfont.woff2
Normal file
BIN
static/fonts/jetbrainsmono-variablefont_wght-webfont.woff2
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 16 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.6 MiB |
Binary file not shown.
Before Width: | Height: | Size: 1.1 MiB |
BIN
static/images/ref.png
Normal file
BIN
static/images/ref.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 184 KiB |
BIN
static/images/taidum.png
Normal file
BIN
static/images/taidum.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 84 KiB |
87
static/js/main.js
Normal file
87
static/js/main.js
Normal file
|
@ -0,0 +1,87 @@
|
|||
function addToast(text='Sample toast notification') {
|
||||
var container = document.querySelector('.toast-container');
|
||||
|
||||
// Create notification element
|
||||
var parent = document.createElement('span');
|
||||
parent.classList.add('toast');
|
||||
parent.innerText = text;
|
||||
parent.onclick = function() {
|
||||
if (parent.parentNode) {
|
||||
parent.classList.add('toast-hide');
|
||||
|
||||
setTimeout(function() {
|
||||
container.removeChild(parent);
|
||||
}, 500);
|
||||
}
|
||||
};
|
||||
|
||||
// Create span to show time remaining
|
||||
var timer = document.createElement('span');
|
||||
timer.classList.add('toast-time');
|
||||
parent.appendChild(timer);
|
||||
|
||||
// Append notification to container
|
||||
container.appendChild(parent);
|
||||
setTimeout(function() {
|
||||
parent.classList.add('toast-show');
|
||||
}, 1);
|
||||
|
||||
// Remove notification after 5 seconds
|
||||
setTimeout(function() {
|
||||
if (parent.parentNode) {
|
||||
parent.classList.add('toast-hide');
|
||||
|
||||
setTimeout(function() {
|
||||
container.removeChild(parent);
|
||||
}, 500);
|
||||
}
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
function garble(obj, speed=1) {
|
||||
const letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_-"
|
||||
|
||||
let interval = null;
|
||||
let iteration = 0;
|
||||
|
||||
clearInterval(interval);
|
||||
|
||||
interval = setInterval(() => {
|
||||
obj.innerText = obj.innerText
|
||||
.split("")
|
||||
.map((letter, index) => {
|
||||
if (index < iteration) {
|
||||
return obj.dataset.value[index];
|
||||
}
|
||||
// 27 as hyphens wrap text that can make page jump a lot
|
||||
return letters[Math.floor(Math.random() * 27)]
|
||||
})
|
||||
.join("");
|
||||
|
||||
if(iteration >= obj.dataset.value.length){
|
||||
clearInterval(interval);
|
||||
}
|
||||
|
||||
iteration += 1 / speed;
|
||||
}, 30);
|
||||
}
|
||||
|
||||
|
||||
// Main title and subtitle, should only be one of each per page
|
||||
if (document.querySelector("h1")) {
|
||||
const title = document.querySelector("h1");
|
||||
garble(title, 1.5);
|
||||
}
|
||||
if (document.querySelector(".subtitle")) {
|
||||
const subtitle = document.querySelector(".subtitle");
|
||||
garble(subtitle);
|
||||
}
|
||||
|
||||
|
||||
// h2 and h3 headers on page, there can be multiple so we need to loop through them
|
||||
if (document.querySelectorAll("h2, h3")) {
|
||||
const headers = document.querySelectorAll("h2, h3");
|
||||
headers.forEach((header) => {
|
||||
garble(header);
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue