This commit is contained in:
codepupper 2019-11-16 22:04:54 +01:00
parent a97d0e4d47
commit 329ac23ca2
5 changed files with 102 additions and 101 deletions

View File

@ -1,10 +1,4 @@
/* #box { @import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro&display=swap");
background-color: aquamarine;
height: 80vh;
margin: 2%;
// border-radius: 20px 0px 20px 0px;
border-radius: 0px 20px 0px 20px;
} */
body { body {
background-color: black; background-color: black;
color: white; color: white;
@ -15,19 +9,14 @@ body {
padding: 0; padding: 0;
} }
a {
text-decoration: none;
color: white;
}
#box { #box {
position: absolute; position: absolute;
z-index: 999; z-index: 999;
border: 25px solid white; border: 25px solid white;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
width: 100vw; top: 0;
height: 100vh; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
pointer-events: none; pointer-events: none;
@ -35,45 +24,67 @@ a {
transition: border-color 0.5s ease-in-out; transition: border-color 0.5s ease-in-out;
} }
a:hover ~ #box .colorBorder { a {
border-color: red; text-decoration: none;
color: white;
}
.portfolio:hover {
color: #ff6a5f;
}
.portfolio:hover ~ #box {
border-color: #ff6a5f;
}
.lore:hover {
color: #92a9f3;
}
.lore:hover ~ #box {
border-color: #92a9f3;
}
.art:hover {
color: #c974da;
}
.art:hover ~ #box {
border-color: #c974da;
}
.portfolio {
font-size: 6vh;
}
.lore {
font-size: 6vh;
}
.art {
font-size: 6vh;
} }
.title { .title {
font-size: 6vw; font-family: 'Source Sans Pro', sans-serif;
font-size: 13vh;
margin: 0; margin: 0;
text-align: center;
} }
.center { .center {
position: absolute; height: 100%;
top: 50%; display: -webkit-box;
left: 50%; display: -ms-flexbox;
-webkit-transform: translate(-50%, -50%); display: flex;
transform: translate(-50%, -50%); -webkit-box-orient: vertical;
} -webkit-box-direction: normal;
-ms-flex-direction: column;
.portfolio, flex-direction: column;
.lore, -webkit-box-align: center;
.art { -ms-flex-align: center;
font-size: 3vw; align-items: center;
} -webkit-box-pack: center;
-ms-flex-pack: center;
@-webkit-keyframes LinkHover { justify-content: center;
from {
color: white;
}
to {
color: red;
}
}
@keyframes LinkHover {
from {
color: white;
}
to {
color: red;
}
} }
/*# sourceMappingURL=main.css.map */ /*# sourceMappingURL=main.css.map */

View File

@ -1,9 +1,8 @@
{ {
"version": 3, "version": 3,
"mappings": "AACA;;;;;;IAMI;AAIJ,AAAA,IAAI,CAAC;EACJ,gBAAgB,EAAE,KAAY;EAC9B,KAAK,EAAE,KAAkB;CACzB;;AAED,AAAA,CAAC,CAAC;EACD,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,CAAC;CACV;;AACD,AAAA,CAAC,CAAC;EACD,eAAe,EAAE,IAAI;EACrB,KAAK,EAAE,KAAK;CACZ;;AAED,AAAA,IAAI,CAAC;EACJ,QAAQ,EAAE,QAAQ;EAClB,OAAO,EAAE,GAAG;EACZ,MAAM,EAAE,gBAAgB;EACxB,UAAU,EAAE,UAAU;EACtB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,KAAK;EACb,KAAK,EAAE,CAAC;EACR,MAAM,EAAE,CAAC;EACT,cAAc,EAAE,IAAI;EACpB,UAAU,EAAE,6BAA6B;CACzC;;AAED,AAAA,CAAC,AAAA,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC;EAC3B,YAAY,EA9BE,GAAG;CA+BjB;;AACD,AAAA,MAAM,CAAC;EACN,SAAS,EAAE,GAAG;EACd,MAAM,EAAE,CAAC;EACT,UAAU,EAAE,MAAM;CAClB;;AAED,AAAA,OAAO,CAAC;EC9CJ,QAAQ,EAAE,QAAQ;EAGd,GAAG,EAAE,GAAG;EACR,IAAI,EAAE,GAAG;EACT,SAAS,EAAE,qBAAqB;CD2CvC;;AAED,AAAA,UAAU;AACV,KAAK;AACL,IAAI,CAAC;EACJ,SAAS,EAAE,GAAG;CACd;;AAED,UAAU,CAAV,SAAU;EACT,IAAI;IACH,KAAK,EAAE,KAAK;;EAGb,EAAE;IACD,KAAK,E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AAM,EAAE,CAAC;CACT;;AAED,AAAA,OAAO,CAAC;EACP,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,cAAc,EAAE,MAAM;EACtB,WAAW,EAAE,MAAM;EACnB,eAAe,EAAE,MAAM;CACvB",
"sources": [ "sources": [
"main.scss", "main.scss"
"_functions.scss"
], ],
"names": [], "names": [],
"file": "main.css" "file": "main.css"

View File

@ -1,67 +1,62 @@
@import '_functions.scss'; @import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro&display=swap');
/* #box {
background-color: aquamarine;
height: 80vh;
margin: 2%;
// border-radius: 20px 0px 20px 0px;
border-radius: 0px 20px 0px 20px;
} */
$accent-color: red; $accent-color: red;
body { body {
background-color: rgb(0, 0, 0); background-color: rgb(0, 0, 0);
color: rgb(255, 255, 255); color: rgb(255, 255, 255);
//font-size: 3vw;
} }
* { * {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
a {
text-decoration: none;
color: white;
}
#box { #box {
position: absolute; position: absolute;
z-index: 999; z-index: 999;
border: 25px solid white; border: 25px solid white;
box-sizing: border-box; box-sizing: border-box;
width: 100vw; top: 0;
height: 100vh; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
pointer-events: none; pointer-events: none;
transition: border-color 0.5s ease-in-out; transition: border-color 0.5s ease-in-out;
} }
a:hover ~ #box .colorBorder { a {
border-color: $accent-color; text-decoration: none;
color: white;
}
$accents: ("portfolio": #ff6a5f, "lore": #92a9f3, "art": #c974da);
$links: ('portfolio', 'lore', 'art');
$time: 2s;
@each $link, $color in $accents {
.#{$link}:hover {
color: $color;
& ~ #box {
border-color: $color;
}
}
}
@each $link in $links {
.#{$link} {
font-size: 6vh;
}
} }
.title { .title {
font-size: 6vw; font-family: 'Source Sans Pro', sans-serif;
font-size: 13vh;
margin: 0; margin: 0;
text-align: center;
} }
.center { .center {
@include centerer(); height: 100%;
} display: flex;
flex-direction: column;
.portfolio, align-items: center;
.lore, justify-content: center;
.art {
font-size: 3vw;
}
@keyframes LinkHover {
from {
color: white;
//border: 25px solid white;
}
to {
color: $accent-color;
//border: 25px solid $accent-color;
}
} }

View File

@ -1,4 +1,4 @@
let portfolio = document.getElementsByClassName('portfolio'); /* let portfolio = document.getElementsByClassName('portfolio');
let art = document.getElementsByClassName('art'); let art = document.getElementsByClassName('art');
let lore = document.getElementsByClassName('lore'); let lore = document.getElementsByClassName('lore');
let box = document.getElementById('box'); let box = document.getElementById('box');
@ -6,12 +6,8 @@ let box = document.getElementById('box');
let links = [ portfolio[0], art[0], lore[0] ]; let links = [ portfolio[0], art[0], lore[0] ];
links.forEach((link) => { links.forEach((link) => {
link.addEventListener('mouseover', (e) => { setTimeout(() => {
//console.log('hovered'); link.classList.add('show');
box.classList.add('colorBorder'); }, 3 * 1000);
});
link.addEventListener('mouseleave', (e) => {
//console.log('left');
box.classList.remove('colorBorder');
});
}); });
*/

View File

@ -1,9 +1,9 @@
<body> <body>
<div class="center"> <div class="center">
<h1 class="title" data-user="{{user}}" id="title">{{link}}</h1> <h1 class="title"><i>{{link}}</i></h1>
<a data-color="#123456" class="portfolio" href="/portfolio">portfolio</a> <a data-port="#123456" class="portfolio" href="/portfolio">portfolio</a>
<a data-color="#654321" class="lore" href="/lore">lore</a> <a data-lore="#654321" class="lore" href="/lore">lore</a>
<a data-color="#294129" class="art" href="/art">art</a> <a data-art="#294129" class="art" href="/art">art</a>
<div id="box"></div>
</div> </div>
<div id="box"></div>
</body> </body>