Добавил конфетти

This commit is contained in:
2021-01-21 19:04:52 +03:00
parent 4bd6215b8f
commit 6a16a8a3dd
5 changed files with 1695 additions and 62 deletions

View File

@@ -28,6 +28,7 @@
Открой <a href="https://vk.com/akopyl" target="_blank">vk.com/akopyl</a>, нажми на кнопку на этом сайте и обнови мою страницу!
</div>
<script src="https://cdn.jsdelivr.net/npm/canvas-confetti@1.3.3/dist/confetti.browser.min.js"></script>
<script src="main.js"></script>
</body>
</html>

View File

@@ -15,4 +15,8 @@ var xhttp = new XMLHttpRequest();
function send() {
xhttp.open("GET", "http://status.anatolykopyl.ru:5001/update", true);
xhttp.send();
confetti({
particleCount: 150,
spread: 100
});
}

1631
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -2,6 +2,7 @@ import Express from "express";
import Cors from "cors";
import path from "path";
import fs from "fs";
import https from "https";
const __dirname = path.resolve();
import dotenv from 'dotenv';
@@ -23,7 +24,6 @@ app.get('/update', (req, res) => {
let url = `https://api.vk.com/method/status.setImage?access_token=${token}&status_id=${id}&v=5.103`;
httpsReq(url).then((response) => {
console.log(response);
res.redirect("https://status.anatolykopyl.ru");
res.send();
});
});
@@ -32,8 +32,8 @@ app.use(Express.static(path.join(__dirname, 'public')));
if (process.env.NODE_ENV === 'production') {
https.createServer({
key: fs.readFileSync('/etc/letsencrypt/live/studybuddy.top/privkey.pem'),
cert: fs.readFileSync('/etc/letsencrypt/live/studybuddy.top/cert.pem')
key: fs.readFileSync('/etc/letsencrypt/live/status.anatolykopyl.ru/privkey.pem'),
cert: fs.readFileSync('/etc/letsencrypt/live/status.anatolykopyl.ru/fullchain.pem')
}, app)
.listen(port, () => console.log('Prod server started on ' + port));
} else {

111
style.css
View File

@@ -1,92 +1,93 @@
* {
font-family: 'Open Sans', sans-serif;
font-family: 'Open Sans', sans-serif;
}
html, body {
height: 100%;
margin: 0px;
height: 100%;
margin: 0px;
}
.main {
height: 100%;
text-align: center;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
background-color: #597da3;
height: 100%;
text-align: center;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
background-color: #597da3;
}
a {
text-decoration: none;
text-decoration: none;
}
a.big {
margin: 20vh;
font-size: xx-large;
transition: transform .2s;
color: white;
font-weight: 600;
margin: 20vh;
font-size: xx-large;
transition: transform .2s;
color: white;
font-weight: 600;
}
a.big:hover {
transform: scale(1.04);
transform: scale(1.04);
}
div.links-container {
margin-top: 10vh;
margin-bottom: 10vh;
color: #dddddd;
text-align: left;
margin-top: 10vh;
margin-bottom: 10vh;
color: #dddddd;
text-align: left;
}
div.links-container p {
font-weight: lighter;
margin-bottom: 5px;
font-weight: lighter;
margin-bottom: 5px;
}
div.links {
background-color: white;
padding: 10px;
border-radius: 8px;
filter: drop-shadow(2px 2px 4px rgb(0, 0, 0, 0.4));
background-color: white;
padding: 10px;
border-radius: 8px;
filter: drop-shadow(2px 2px 4px rgb(0, 0, 0, 0.4));
}
div.links a {
margin-left: 10px;
margin-right: 10px;
color: black;
border-width: 0px 0px 1px 0px;
border-style: solid;
border-color: transparent;
margin-left: 10px;
margin-right: 10px;
color: black;
border-width: 0px 0px 1px 0px;
border-style: solid;
border-color: transparent;
}
div.links a:hover {
border-width: 0px 0px 2px 0px;
border-color: #597da390;
padding-bottom: 8px;
border-width: 0px 0px 2px 0px;
border-color: #597da390;
padding-bottom: 8px;
}
#hint-link {
position: absolute;
bottom: 2vh;
right: 2vh;
font-weight: lighter;
color: #dddddd;
font-size: small;
text-decoration: underline;
z-index: 10;
cursor: pointer;
position: absolute;
bottom: 2vh;
right: 2vh;
font-weight: lighter;
color: #dddddd;
font-size: small;
text-decoration: underline;
z-index: 10;
cursor: pointer;
}
#hint-div {
display: none;
position: absolute;
bottom: 0px;
background-color: white;
font-weight: lighter;
width: 60%;
padding-left: 20%;
padding-right: 20%;
padding-top: 1vh;
padding-bottom: 1vh;
display: none;
position: absolute;
bottom: 0px;
background-color: white;
font-weight: lighter;
width: 60%;
padding-left: 20%;
padding-right: 20%;
padding-top: 1vh;
padding-bottom: 1vh;
}