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

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

View File

@@ -15,4 +15,8 @@ var xhttp = new XMLHttpRequest();
function send() { function send() {
xhttp.open("GET", "http://status.anatolykopyl.ru:5001/update", true); xhttp.open("GET", "http://status.anatolykopyl.ru:5001/update", true);
xhttp.send(); 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 Cors from "cors";
import path from "path"; import path from "path";
import fs from "fs"; import fs from "fs";
import https from "https";
const __dirname = path.resolve(); const __dirname = path.resolve();
import dotenv from 'dotenv'; 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`; let url = `https://api.vk.com/method/status.setImage?access_token=${token}&status_id=${id}&v=5.103`;
httpsReq(url).then((response) => { httpsReq(url).then((response) => {
console.log(response); console.log(response);
res.redirect("https://status.anatolykopyl.ru");
res.send(); res.send();
}); });
}); });
@@ -32,8 +32,8 @@ app.use(Express.static(path.join(__dirname, 'public')));
if (process.env.NODE_ENV === 'production') { if (process.env.NODE_ENV === 'production') {
https.createServer({ https.createServer({
key: fs.readFileSync('/etc/letsencrypt/live/studybuddy.top/privkey.pem'), key: fs.readFileSync('/etc/letsencrypt/live/status.anatolykopyl.ru/privkey.pem'),
cert: fs.readFileSync('/etc/letsencrypt/live/studybuddy.top/cert.pem') cert: fs.readFileSync('/etc/letsencrypt/live/status.anatolykopyl.ru/fullchain.pem')
}, app) }, app)
.listen(port, () => console.log('Prod server started on ' + port)); .listen(port, () => console.log('Prod server started on ' + port));
} else { } else {

View File

@@ -1,6 +1,7 @@
* { * {
font-family: 'Open Sans', sans-serif; font-family: 'Open Sans', sans-serif;
} }
html, body { html, body {
height: 100%; height: 100%;
margin: 0px; margin: 0px;