build pages

This commit is contained in:
2023-08-06 01:36:52 +03:00
parent 397090f177
commit d74420608f
13 changed files with 13 additions and 12 deletions

1
pages/404.html Normal file
View File

@@ -0,0 +1 @@
404

23
pages/about.html Normal file
View File

@@ -0,0 +1,23 @@
<nav class="border-bottom mb-3" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">About</li>
</ol>
</nav>
<p>
<span class="font-monospace">a2s.su</span>
— домен, который я купил очень давно, но так и не придумал, для чего его
использовать.<br />
В первую очередь, я не придумал как расшифровать
<span class="font-monospace">a2s.su</span>. Первое что пришлов голову, это
<span class="fw-bold fst-italic">all to site</span>.
</p>
<p>
Долгое время планировал на этом домене размещать всё подряд.<br />
Какие-то проекты уже размещёны на поддоменах, какие-то в директориях.
</p>
<p>
Ладно, с 1 августа 2023 года сайт объявляется открытым.<br />
Цель? Каталог полезных сервисов.
</p>

13
pages/games.html Normal file
View File

@@ -0,0 +1,13 @@
<nav class="border-bottom mb-3" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Games</li>
</ol>
</nav>
<ul class="list-group list-group-item-action">
<a href="#rer2" class="list-group-item list-group-item-action">
<span class="fw-bold">RE: Revelation 2</span> — Статус ежемесячных
событий «Вторжение огромных тварей»
</a>
</ul>

3
pages/home.html Normal file
View File

@@ -0,0 +1,3 @@
<p class="text-center bg-dark-subtle text-dark-subtle rounded p-1">
<a class="text-reset text-decoration-none" href="#about">О сайте</a>
</p>

View File

@@ -0,0 +1,32 @@
export function update_lastfm_nowplay() {
let user = 'Alex_Popov';
let apikey = '5556942dcf4c422dca68d57fbbfdee23';
let url = `http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=${user}&api_key=${apikey}&format=json&limit=1`;
let status_text = document.getElementById('lastfm_card_title');
let song_text = document.getElementById('lastfm_card_content');
let desc_text = document.getElementById('lastfm_card_footer');
fetch(url)
.then((response) => response.json())
.then((data) => {
// update desc
let desc_string = `Всего прослушано ${data.recenttracks['@attr'].total} треков`;
desc_text.innerText = desc_string;
// update content
let track_string = `${data.recenttracks.track[0].artist['#text']}${data.recenttracks.track[0].name}`;
song_text.innerText = track_string;
// TODO: get play now
status_text.innerText = 'Последняя проигранная композиция';
})
.catch((err) => console.warn('Something went wrong.', err));
}
/*
Application name a2s
API key 5556942dcf4c422dca68d57fbbfdee23
Shared secret e1e1baa61478c5745c35b985ed2a49a9
Registered to Alex_Popov
*/

4
pages/js/rev2.js Normal file
View File

@@ -0,0 +1,4 @@
export function update_rev2(data) {
let time_remaining = document.getElementById('rev2_time_remaining');
console.log(data);
}

38
pages/personal.html Normal file
View File

@@ -0,0 +1,38 @@
<nav class="border-bottom mb-3" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Personal</li>
</ol>
</nav>
<div class="card text-center">
<div id="lastfm_card_title" class="card-header">Загружается...</div>
<div class="card-body">
<h5 id="lastfm_card_content" class="card-title placeholder-glow">
<span class="placeholder col-3 rounded"></span>
</h5>
</div>
<div
id="lastfm_card_footer"
class="card-footer text-body-secondary placeholder-glow"
>
<span class="placeholder col-2 rounded"></span>
</div>
</div>
<script type="module">
import { update_lastfm_nowplay } from './js/lastfm-nowplay.js';
function autorun() {
if (!window.DEBUG) {
update_lastfm_nowplay();
setInterval(autorun, 120_000); // 2 minutes
} else {
console.log(
'INFO! Включена отладка, заскробленная композиция не загружается!\n' +
'Файл personal.html',
);
}
}
autorun();
</script>

147
pages/rer2.html Normal file
View File

@@ -0,0 +1,147 @@
<nav class="border-bottom mb-3" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item"><a href="#games">Games</a></li>
<li class="breadcrumb-item active" aria-current="page">
RE: Revelation 2 — Статус ежемесячных событий
<span class="text-nowrap">«Вторжение огромных тварей»</span>
</li>
</ol>
</nav>
<h3 class="text-center text-shadow">
RE: Revelation 2 — Статус ежемесячных событий
<span class="text-nowrap">«Вторжение огромных тварей»</span>
</h3>
<div class="d-none">
<img
class="img-fluid shadow rounded m-3"
src="//content/images/2023/resident_evil_revelations_2_wallpaper_by_brendabirkin.jpg"
/>
<p class="text-center text-muted">
Изображение:
<a
class="text-reset"
href="https://www.deviantart.com/brendabirkin/art/Resident-Evil-Revelations-2-Wallpaper-521674087"
target="_blank"
>
Resident Evil Revelations 2 — Wallpaper by BrendaBirkin
</a>
</p>
</div>
<div class="card mb-3">
<div class="card-header">
<div class="d-flex justify-content-between placeholder-glow">
<span class="fw-bold">Invasion of the Huge Creatures No. 101</span>
<span
id="rev2_time_remaining"
class="placeholder col-1 rounded"
></span>
</div>
</div>
<div class="card-body">
<h5 class="card-title text-center">
Осталось здоровья
<svg
class="text-danger svg-icon"
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path
d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"
/>
</svg>
</h5>
<div id="rev2_emenies">
<p class="my-1 fw-bold d-flex justify-content-between">
<span>Aello</span>
<span class="text-danger">[? / ?]</span>
</p>
<div
class="progress"
role="progressbar"
aria-valuenow="21"
aria-valuemin="0"
aria-valuemax="100"
>
<div class="progress-bar bg-danger" style="width: 21%">21%</div>
</div>
<p class="my-1 fw-bold d-flex justify-content-between">
<span>Ocypete</span>
<span class="text-danger">[? / ?]</span>
</p>
<div
class="progress"
role="progressbar"
aria-valuenow="91"
aria-valuemin="0"
aria-valuemax="100"
>
<div class="progress-bar bg-danger" style="width: 91%">91%</div>
</div>
</div>
</div>
<div class="card-footer text-body-secondary">
<a
class="text-reset"
href="https://game.capcom.com/residentevil/en/onlineevent-4_1108.html#windows"
target="_blank"
>Ссылка на страницу эвента</a
>
</div>
</div>
<p>
<svg
class="svg-icon align-text-top"
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<circle cx="12" cy="12" r="10" />
<line x1="12" y1="16" x2="12" y2="12" />
<line x1="12" y1="8" x2="12.01" y2="8" />
</svg>
Информация взята с ресурса RE.NET, страница
<a
class="text-reset fw-bold"
href="https://game.capcom.com/residentevil/en/onlineevent-rev2-windows.html"
>Online Events</a
>
</p>
<script type="module">
import { update_rev2 } from './js/rev2.js';
function autorun() {
if (true) {
get_from_api((data) => {
update_rev2(data);
}, 'rev2_monsters');
setInterval(autorun, 120_000); // 2 minutes
} else {
console.log(
'INFO! Включена отладка, данные не загружается!\n' +
'Файл rer2.html',
);
}
}
autorun();
</script>

8
pages/trash.html Normal file
View File

@@ -0,0 +1,8 @@
<nav class="border-bottom mb-3" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Trash</li>
</ol>
</nav>
<p class="fs-3 text-shadow">Тут ничего нет... пока!</p>