pedf
/
spolky
Archived
1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

261 lines
5.5 KiB
Svelte

4 years ago
<style>
4 years ago
#plusko {
color: #d73648;
border: solid 0.1em;
border-color: #d73648;
border-radius: 50%;
width: 1em;
height: 1em;
align-items: center;
justify-content: center;
display: flex;
cursor: pointer;
line-height: 1em;
}
#plusko:hover {
color: #fff;
background-color: #d73648;
}
#container {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
width: 100vw;
}
#dots {
position: absolute;
height: 100vh;
width: 100vw;
}
.label {
position: absolute;
font-size: 0.5em;
transition: .2s ease;
}
4 years ago
.label2:hover {
4 years ago
border: solid 0.1em #d73648;
4 years ago
}
.labels:hover > *:not(:hover) {
font-size: 0.45em;
}
4 years ago
.label a {
color: #000;
}
4 years ago
.label2 a:hover {
4 years ago
color: #d73648;
opacity: 1 !important;
}
.label span:hover ~ .cross {
display: none;
}
#cinnosti {
left: auto;
right: auto;
top: 70vh;
}
#predseda {
left: 23vw;
top: 15vh;
}
#prebiram {
4 years ago
left: 65vw;
4 years ago
top: 19vh;
}
#zapojit {
4 years ago
left: 25vw;
top: 50vh;
4 years ago
}
#zalozit {
top: 60vh;
left: 71vw;
}
4 years ago
#oborovky {
left: 32vw;
top: 75vh;
}
4 years ago
.active {
background-color: #888 !important;
color: #fff !important;
border-color: #888 !important;
}
.cross {
width: 0.7em;
height: 0.7em;
position: relative;
}
.cross:before, .cross:after {
content: "";
position: absolute;
z-index: -1;
background: #d73648;
}
.cross:before {
left: 50%;
width: 10%;
margin-left: -5%;
height: 100%;
}
.cross:after {
top: 50%;
height: 10%;
margin-top: -5%;
width: 100%;
}
.bottom-right {
position: absolute;
right: 0;
bottom: 0;
margin-left: 90%;
margin-top: 5%;
}
.top-right {
position: absolute;
right: 0;
top: 0;
margin-left: 90%;
margin-bottom: 5%;
}
.bottom-left {
position: absolute;
left: 0;
bottom: 0;
margin-right: 110%;
margin-top: 5%;
}
.top-left {
position: absolute;
left: 0;
top: 0;
margin-right: 110%;
margin-bottom: 5%;
}
.pedftext {
position: absolute;
font-size: 0.5em;
left: 5vw;
bottom: 5vh;
line-height: 1;
margin-bottom: 0;
4 years ago
}
</style>
<script>
import Logo from '../components/logo.svelte';
4 years ago
import anime from 'animejs/lib/anime.es.js';
import { onMount } from 'svelte';
let clicked = false;
//function drawLineXY(fromXY, toXY) {
// if(!lineElem) {
// lineElem = document.createElement('canvas');
// lineElem.style.position = "absolute";
// lineElem.style.zIndex = -100;
// document.body.appendChild(lineElem);
// }
// var leftpoint, rightpoint;
// if(fromXY.x < toXY.x) {
// leftpoint = fromXY;
// rightpoint = toXY;
// } else {
// leftpoint = toXY;
// rightpoint = fromXY;
// }
// var lineWidthPix = 4;
// var gutterPix = 10;
// var origin = {x:leftpoint.x-gutterPix,
// y:Math.min(fromXY.y, toXY.y)-gutterPix};
// lineElem.width = Math.max(rightpoint.x - leftpoint.x, lineWidthPix) +
// 2.0*gutterPix;
// lineElem.height = Math.abs(fromXY.y - toXY.y) + 2.0*gutterPix;
// lineElem.style.left = origin.x;
// lineElem.style.top = origin.y;
// var ctx = lineElem.getContext('2d');
// // Use the identity matrix while clearing the canvas
// ctx.save();
// ctx.setTransform(1, 0, 0, 1, 0, 0);
// ctx.clearRect(0, 0, lineElem.width, lineElem.height);
// ctx.restore();
// ctx.lineWidth = 4;
// ctx.strokeStyle = '#09f';
// ctx.beginPath();
// ctx.moveTo(fromXY.x - origin.x, fromXY.y - origin.y);
// ctx.lineTo(toXY.x - origin.x, toXY.y - origin.y);
// ctx.stroke();
//}
function spin() {
anime({
targets: "#plusko span",
rotate: {
value: "+=180",
duration: 300,
direction: "alternate",
},
})
}
function unspin() {
anime({
targets: "#plusko span",
rotate: {
value: 0
}
});
}
function clicked_fun() {
clicked = !clicked;
}
onMount(() => {
});
4 years ago
</script>
4 years ago
<svelte:head>
<title>PedF UK Spolky | </title>
</svelte:head>
4 years ago
<Logo/>
4 years ago
4 years ago
<main id="container">
4 years ago
<div id="plusko" on:mouseover="{spin}" on:mouseout="{unspin}" class:active="{clicked}" on:click="{clicked_fun}"><span style="height: 1em; width: 1em; text-align: center">+</span></div>
4 years ago
{#if clicked}
4 years ago
<div class="labels">
<div class="label label2" id="predseda">
4 years ago
<span><a href="/predseda">Předseda spolku</a></span>
<div class="cross bottom-right"></div>
5 years ago
</div>
4 years ago
<div class="label label2" id="prebiram">
4 years ago
<span style="padding-left: 0.5em; padding-right: 0.5em"><a href="/prebiram">Přebírám spolek</a></span>
<div class="cross bottom-left"></div>
5 years ago
</div>
4 years ago
<div class="label label2" id="zapojit">
4 years ago
<span><a href="/zapojit-se">Chci se zapojit</a></span>
<div class="cross top-right"></div>
5 years ago
</div>
4 years ago
<div class="label label2" id="zalozit">
4 years ago
<span style="padding-left: 0.5em; padding-right: 0.5em"><a href="/zalozit-spolek">Chci založit spolek</a></span>
4 years ago
<div class="cross top-left"></div>
5 years ago
</div>
4 years ago
<div class="label label2" id="oborovky">
<span style="padding-left: 0.5em; padding-right: 0.5em"><a href="/oborovky">Chci vědět víc o oborovkách</a></span>
<div class="cross top-right"></div>
</div>
4 years ago
</div>
4 years ago
{:else }
<span class="label" id="cinnosti">Činnosti ve spolcích</span>
{/if}
<canvas id="dots">
</canvas>
<div class="pedftext">
<p>Pedagogická fakulta</p>
<b style="color: #d73648">Univerzita Karlova</b>
4 years ago
<img src="/svg/zobacek.svg" style="width:0.8em; height: 0.8em; position: absolute; left: 0; bottom: 0; margin-left: -0.5em; margin-bottom: -0.5em; fill: #d73648">
5 years ago
</div>
4 years ago
</main>