added index content

This commit is contained in:
Mateusz Pstrucha committed 2020-11-20 22:18:11 +01:00
1 parent 86e063f4c7
commit a3e713ce27
3 files changed
+204 -35

No files matched your search

+66 -3
View File
@@ -22,7 +22,7 @@
<div id="butts">
<a href="#about" data-target="about" title="About Me" class="button active">About Me</a>
<a href="#projects" data-target="projects" title="Projects" class="button">Projects</a>
<a href="#index" data-target="more" title="Index" class="button">Index</a>
<a href="#index" data-target="index" title="Index" class="button">Index</a>
<div style="clear: both"></div>
</div>
@@ -823,8 +823,71 @@
work in progress
</div>
<div class="pane" id="more">
work in progress
<div class="pane" id="index">
<div class="head">
<div class="description active">
<div class="title">Choose an app</div>
<div class="content">From the list below</div>
</div>
<div class="description plex">
<div class="title">plex.mtps.pl</div>
<a href="https://plex.mtps.pl/" target="_blank" class="link icon-link-ext"></a>
<div class="content">Plex Media Server. Serwer filmów, seriali, zdjęć i muzyki</div>
</div>
<div class="description r">
<div class="title">r.mtps.pl</div>
<a href="https://r.mtps.pl/" target="_blank" class="link icon-link-ext"></a>
<div class="content">Serwer do skracania linków</div>
</div>
<div class="description radio">
<div class="title">radio-rolnik.mtps.pl</div>
<a href="https://radio-rolnik.mtps.pl/" target="_blank" class="link icon-link-ext"></a>
<div class="content">Strona radia szkolnego Rolnika. Aktualna top lista utworów wybrana przez uczniów.</div>
</div>
<div class="description send">
<div class="title">send.mtps.pl</div>
<a href="https://send.mtps.pl/" target="_blank" class="link icon-link-ext"></a>
<div class="content">Self hostowany serwer Firefox Send. Szyfrowany upload plików, z hasłem i datą wygaśnięcia</div>
</div>
<div class="description mc">
<div class="title"></div>
<a href="" target="_blank" class="link icon-link-ext"></a>
<div class="content"></div>
</div>
<div class="description mc1">
<div class="title"></div>
<a href="" target="_blank" class="link icon-link-ext"></a>
<div class="content"></div>
</div>
<div class="description mc2">
<div class="title">mc2.mtps.pl</div>
<a href="https://mc.mtps.pl/mc2/dynmap" target="_blank" class="link icon-link-ext"></a>
<div class="content">Serwer Minecraft. Koronawirus, edycja nr 6.</div>
</div>
<div class="description">
<div class="title"></div>
<a href="" target="_blank" class="link icon-link-ext"></a>
<div class="content"></div>
</div>
</div>
<div class="grid">
<div data-target="plex">plex</div>
<div data-target="r">r</div>
<div data-target="radio">radio-rolnik</div>
<div data-target="send">send</div>
<!-- <div data-target="mc">mc</div> -->
<!-- <div data-target="mc1">mc1</div> -->
<div data-target="mc2">mc2</div>
</div>
</div>
</div>
</div>
+20
View File
@@ -26,6 +26,18 @@ window.onload = function () {
}
}
// index buttons handler
document.querySelector('#index>.grid').onclick = function (e) {
if(this != e.target){
let target = e.target.getAttribute('data-target'),
targetEl = document.querySelector(`.head>.description.${target}`)
if(!targetEl) return
document.querySelector('.head>.description.active').classList.remove('active')
targetEl.classList.add('active')
}
}
// scroll handler
document.querySelector('.wrapper').addEventListener('scroll', function (e) {
let x = this.scrollTop / window.innerHeight,
@@ -43,6 +55,14 @@ window.onload = function () {
// console.log(e, location.hash)
// }
// hash check
if(location.hash){
let target = location.hash.slice(1)
if (!document.querySelector(`#${target}`)) return
Panes.switch(target)
document.querySelector(`#${target}`).scrollIntoView()
}
// initial typewriter animation
document.querySelectorAll('.typein').forEach(typein => {
var target = typein.getAttribute('data-content')
+118 -32
View File
@@ -75,6 +75,7 @@ body {
/* panes */
.pane {
position: relative;
width: 85%;
height: calc(100vh + 1px);
padding: 9rem 1.5rem 2rem 1.5rem;
@@ -125,19 +126,6 @@ body {
background: #ffffff0f;
}
@media only screen and (max-width: 600px) {
#butts {
display: flex;
width: 100%;
}
#butts>.button {
width: 100%;
}
.pane {
padding-top: 10rem;
}
}
#miniLogo {
height: 4rem;
box-sizing: border-box;
@@ -204,25 +192,6 @@ body {
margin-top: 1.3rem;
}
@media only screen and (max-width: 700px) {
.header {
margin-top: 19vh;
}
.header>.big {
font-size: 9vw;
}
.header>.smol {
font-size: 5vw;
margin-top: 0.5rem;
}
.header>.smolest {
font-size: .8rem;
max-width: 75vw;
margin-top: 1.3rem;
}
}
.socials {
position: absolute;
display: flex;
@@ -260,4 +229,121 @@ body {
.socials > a:hover:before{
height: 100%;
width: 100%;
}
/* Index */
#index > .head {
font-family: 'Roboto Mono';
margin-bottom: 2rem;
height: 40%;
overflow: hidden;
position: relative;
}
.description {
position: absolute;
opacity: 0;
visibility: hidden;
transition: visibility 0s, opacity .2s ease-out;
}
.description.active {
opacity: 1;
visibility: visible;
}
.description > .title {
font-size: 2rem;
margin-bottom: 1rem;
display: inline-block;
}
.description > a.link {
color: inherit;
text-decoration: none;
}
.grid {
display: flex;
flex-wrap: wrap;
position: absolute;
width: 100%;
bottom: 1.5rem;
}
.grid > div {
width: calc(50% - 1rem);
font-weight: bold;
text-transform: uppercase;
padding: 0.8rem;
border-style: solid;
margin-bottom: .5rem;
border-width: 0px 0px 1px 1px;
box-sizing: border-box;
transition: border .1s, color .1s;
cursor: pointer;
}
.grid > div:nth-child(odd){
margin-right: .5rem;
}
.grid > div:nth-child(even){
margin-left: .5rem;
}
.grid > div:hover {
color: var(--color-main);
border-width: 0px 0px 1px 5px;
}
@media only screen and (max-width: 700px) {
/* navigation */
#butts {
display: flex;
width: 100%;
}
#butts>.button {
width: 100%;
}
.pane {
padding-top: 10rem;
padding-right: 0;
padding-left: 0;
}
/* about */
.header {
margin-top: 19vh;
}
.header>.big {
font-size: 9vw;
}
.header>.smol {
font-size: 5vw;
margin-top: 0.5rem;
}
.header>.smolest {
font-size: .8rem;
max-width: 75vw;
margin-top: 1.3rem;
}
/* index */
.description > .title {
font-size: 1.5rem;
}
.description > .content {
font-size: .9rem;
}
}