updated prettier config

This commit is contained in:
Alexander Popov 2023-08-06 01:49:23 +03:00
parent d74420608f
commit 1cf2a8811f
Signed by: iiiypuk
GPG Key ID: E47FE0AB36CD5ED6
11 changed files with 42 additions and 80 deletions

View File

@ -4,3 +4,4 @@ app/assets/js/bootstrap*
package.json package.json
package-lock.json package-lock.json
server/ server/
README.md

View File

@ -1 +1,10 @@
{ "singleQuote": true } {
"printWidth": 100,
"bracketSpacing": true,
"bracketSameLine": true,
"semi": true,
"singleQuote": true,
"arrowParens": "always",
"htmlWhitespaceSensitivity": "strict",
"endOfLine": "lf"
}

View File

@ -12,19 +12,14 @@ window.SERVER_HOST = SERVER_HOST;
window.onload = function () { window.onload = function () {
let app = document.documentElement; let app = document.documentElement;
if ( if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
window.matchMedia &&
window.matchMedia('(prefers-color-scheme: dark)').matches
) {
switch_theme('dark'); switch_theme('dark');
} else { } else {
switch_theme('light'); switch_theme('light');
} }
// theme switcher // theme switcher
document document.getElementById('app_theme_switcher').addEventListener('click', switch_theme, false);
.getElementById('app_theme_switcher')
.addEventListener('click', switch_theme, false);
// routes handler // routes handler
window.addEventListener('hashchange', location_handler); window.addEventListener('hashchange', location_handler);
@ -60,9 +55,7 @@ const location_handler = async () => {
const html = await fetch(route.template).then((response) => response.text()); const html = await fetch(route.template).then((response) => response.text());
document.getElementById('content').innerHTML = html; document.getElementById('content').innerHTML = html;
document.title = route.title; document.title = route.title;
document document.querySelector('meta[name="description"]').setAttribute('content', route.description);
.querySelector('meta[name="description"]')
.setAttribute('content', route.description);
if (route.script) { if (route.script) {
let script = document.getElementById('content').querySelector('script'); let script = document.getElementById('content').querySelector('script');

View File

@ -32,8 +32,7 @@ export const routes = {
}, },
rer2: { rer2: {
template: '/pages/rer2.html', template: '/pages/rer2.html',
title: title: 'RE: Revelation 2 — Статус ежемесячных событий «Вторжение огромных тварей»',
'RE: Revelation 2 — Статус ежемесячных событий «Вторжение огромных тварей»',
description: '...', description: '...',
script: true, script: true,
}, },

View File

@ -6,11 +6,7 @@
<title>a2s</title> <title>a2s</title>
<meta name="description" content="" /> <meta name="description" content="" />
<link rel="manifest" href="manifest.json" /> <link rel="manifest" href="manifest.json" />
<link <link rel="stylesheet" type="text/css" href="./assets/css/bootstrap-v5.3.1.min.css" />
rel="stylesheet"
type="text/css"
href="./assets/css/bootstrap-v5.3.1.min.css"
/>
<link rel="stylesheet" type="text/css" href="./assets/css/styles.css" /> <link rel="stylesheet" type="text/css" href="./assets/css/styles.css" />
<script type="module"> <script type="module">
import './assets/js/app.js'; import './assets/js/app.js';

View File

@ -2,13 +2,9 @@
<div class="text-shadow"> <div class="text-shadow">
<h3 id="app_title" class="float-md-start mb-0"> <h3 id="app_title" class="float-md-start mb-0">
<span class="font-monospace">inet://</span><br /> <span class="font-monospace">inet://</span><br />
<p class="text-secondary fs-6 text-shadow m-0"> <p class="text-secondary fs-6 text-shadow m-0">// licking and assemble //</p>
// licking and assemble //
</p>
</h3> </h3>
<nav <nav class="nav nav-masthead justify-content-center mt-3 mt-md-0 float-md-end">
class="nav nav-masthead justify-content-center mt-3 mt-md-0 float-md-end"
>
<a class="nav-link fw-bold py-1 px-0 icon-link" href="/"> <a class="nav-link fw-bold py-1 px-0 icon-link" href="/">
<svg <svg
class="svg-icon" class="svg-icon"
@ -21,11 +17,8 @@
stroke-width="2" stroke-width="2"
stroke-linecap="round" stroke-linecap="round"
stroke-linejoin="round" stroke-linejoin="round"
class="feather feather-home" class="feather feather-home">
> <path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path>
<path
d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"
></path>
<polyline points="9 22 9 12 15 12 15 22"></polyline> <polyline points="9 22 9 12 15 12 15 22"></polyline>
</svg> </svg>
Home Home
@ -42,8 +35,7 @@
stroke-width="2" stroke-width="2"
stroke-linecap="round" stroke-linecap="round"
stroke-linejoin="round" stroke-linejoin="round"
class="feather feather-info" class="feather feather-info">
>
<circle cx="12" cy="12" r="10"></circle> <circle cx="12" cy="12" r="10"></circle>
<line x1="12" y1="16" x2="12" y2="12"></line> <line x1="12" y1="16" x2="12" y2="12"></line>
<line x1="12" y1="8" x2="12.01" y2="8"></line> <line x1="12" y1="8" x2="12.01" y2="8"></line>

View File

@ -11,8 +11,7 @@
stroke-width="2" stroke-width="2"
stroke-linecap="round" stroke-linecap="round"
stroke-linejoin="round" stroke-linejoin="round"
class="feather feather-activity" class="feather feather-activity">
>
<polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline> <polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline>
</svg> </svg>
Games Games
@ -23,8 +22,7 @@
<a <a
class="dropdown-item d-flex gap-2 align-items-center" class="dropdown-item d-flex gap-2 align-items-center"
href="https://ё.a2s.su/" href="https://ё.a2s.su/"
target="_blank" target="_blank">
>
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
width="16" width="16"
@ -35,22 +33,16 @@
stroke-width="2" stroke-width="2"
stroke-linecap="round" stroke-linecap="round"
stroke-linejoin="round" stroke-linejoin="round"
class="feather feather-book" class="feather feather-book">
>
<path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path> <path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path>
<path <path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path>
d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"
></path>
</svg> </svg>
Буква <span class="font-monospace">ё</span> Буква <span class="font-monospace">ё</span>
</a> </a>
</li> </li>
<li><hr class="dropdown-divider" /></li> <li><hr class="dropdown-divider" /></li>
<li> <li>
<a <a class="dropdown-item d-flex gap-2 align-items-center" href="#personal">
class="dropdown-item d-flex gap-2 align-items-center"
href="#personal"
>
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
width="16" width="16"
@ -61,8 +53,7 @@
stroke-width="2" stroke-width="2"
stroke-linecap="round" stroke-linecap="round"
stroke-linejoin="round" stroke-linejoin="round"
class="feather feather-user" class="feather feather-user">
>
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path> <path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
<circle cx="12" cy="7" r="4"></circle> <circle cx="12" cy="7" r="4"></circle>
</svg> </svg>
@ -81,12 +72,10 @@
stroke-width="2" stroke-width="2"
stroke-linecap="round" stroke-linecap="round"
stroke-linejoin="round" stroke-linejoin="round"
class="feather feather-trash-2" class="feather feather-trash-2">
>
<polyline points="3 6 5 6 21 6"></polyline> <polyline points="3 6 5 6 21 6"></polyline>
<path <path
d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>
></path>
<line x1="10" y1="11" x2="10" y2="17"></line> <line x1="10" y1="11" x2="10" y2="17"></line>
<line x1="14" y1="11" x2="14" y2="17"></line> <line x1="14" y1="11" x2="14" y2="17"></line>
</svg> </svg>

View File

@ -7,8 +7,7 @@
<p> <p>
<span class="font-monospace">a2s.su</span> <span class="font-monospace">a2s.su</span>
— домен, который я купил очень давно, но так и не придумал, для чего его — домен, который я купил очень давно, но так и не придумал, для чего его использовать.<br />
использовать.<br />
В первую очередь, я не придумал как расшифровать В первую очередь, я не придумал как расшифровать
<span class="font-monospace">a2s.su</span>. Первое что пришлов голову, это <span class="font-monospace">a2s.su</span>. Первое что пришлов голову, это
<span class="fw-bold fst-italic">all to site</span>. <span class="fw-bold fst-italic">all to site</span>.

View File

@ -7,7 +7,7 @@
<ul class="list-group list-group-item-action"> <ul class="list-group list-group-item-action">
<a href="#rer2" class="list-group-item list-group-item-action"> <a href="#rer2" class="list-group-item list-group-item-action">
<span class="fw-bold">RE: Revelation 2</span> — Статус ежемесячных <span class="fw-bold">RE: Revelation 2</span> — Статус ежемесячных событий «Вторжение
событий «Вторжение огромных тварей» огромных тварей»
</a> </a>
</ul> </ul>

View File

@ -12,10 +12,7 @@
<span class="placeholder col-3 rounded"></span> <span class="placeholder col-3 rounded"></span>
</h5> </h5>
</div> </div>
<div <div id="lastfm_card_footer" class="card-footer text-body-secondary placeholder-glow">
id="lastfm_card_footer"
class="card-footer text-body-secondary placeholder-glow"
>
<span class="placeholder col-2 rounded"></span> <span class="placeholder col-2 rounded"></span>
</div> </div>
</div> </div>

View File

@ -17,15 +17,13 @@
<div class="d-none"> <div class="d-none">
<img <img
class="img-fluid shadow rounded m-3" class="img-fluid shadow rounded m-3"
src="//content/images/2023/resident_evil_revelations_2_wallpaper_by_brendabirkin.jpg" src="//content/images/2023/resident_evil_revelations_2_wallpaper_by_brendabirkin.jpg" />
/>
<p class="text-center text-muted"> <p class="text-center text-muted">
Изображение: Изображение:
<a <a
class="text-reset" class="text-reset"
href="https://www.deviantart.com/brendabirkin/art/Resident-Evil-Revelations-2-Wallpaper-521674087" href="https://www.deviantart.com/brendabirkin/art/Resident-Evil-Revelations-2-Wallpaper-521674087"
target="_blank" target="_blank">
>
Resident Evil Revelations 2 — Wallpaper by BrendaBirkin Resident Evil Revelations 2 — Wallpaper by BrendaBirkin
</a> </a>
</p> </p>
@ -35,10 +33,7 @@
<div class="card-header"> <div class="card-header">
<div class="d-flex justify-content-between placeholder-glow"> <div class="d-flex justify-content-between placeholder-glow">
<span class="fw-bold">Invasion of the Huge Creatures No. 101</span> <span class="fw-bold">Invasion of the Huge Creatures No. 101</span>
<span <span id="rev2_time_remaining" class="placeholder col-1 rounded"></span>
id="rev2_time_remaining"
class="placeholder col-1 rounded"
></span>
</div> </div>
</div> </div>
<div class="card-body"> <div class="card-body">
@ -54,11 +49,9 @@
stroke="currentColor" stroke="currentColor"
stroke-width="2" stroke-width="2"
stroke-linecap="round" stroke-linecap="round"
stroke-linejoin="round" stroke-linejoin="round">
>
<path <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" 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> </svg>
</h5> </h5>
@ -72,8 +65,7 @@
role="progressbar" role="progressbar"
aria-valuenow="21" aria-valuenow="21"
aria-valuemin="0" aria-valuemin="0"
aria-valuemax="100" aria-valuemax="100">
>
<div class="progress-bar bg-danger" style="width: 21%">21%</div> <div class="progress-bar bg-danger" style="width: 21%">21%</div>
</div> </div>
<p class="my-1 fw-bold d-flex justify-content-between"> <p class="my-1 fw-bold d-flex justify-content-between">
@ -85,8 +77,7 @@
role="progressbar" role="progressbar"
aria-valuenow="91" aria-valuenow="91"
aria-valuemin="0" aria-valuemin="0"
aria-valuemax="100" aria-valuemax="100">
>
<div class="progress-bar bg-danger" style="width: 91%">91%</div> <div class="progress-bar bg-danger" style="width: 91%">91%</div>
</div> </div>
</div> </div>
@ -112,8 +103,7 @@
stroke="currentColor" stroke="currentColor"
stroke-width="2" stroke-width="2"
stroke-linecap="round" stroke-linecap="round"
stroke-linejoin="round" stroke-linejoin="round">
>
<circle cx="12" cy="12" r="10" /> <circle cx="12" cy="12" r="10" />
<line x1="12" y1="16" x2="12" y2="12" /> <line x1="12" y1="16" x2="12" y2="12" />
<line x1="12" y1="8" x2="12.01" y2="8" /> <line x1="12" y1="8" x2="12.01" y2="8" />
@ -137,10 +127,7 @@
}, 'rev2_monsters'); }, 'rev2_monsters');
setInterval(autorun, 120_000); // 2 minutes setInterval(autorun, 120_000); // 2 minutes
} else { } else {
console.log( console.log('INFO! Включена отладка, данные не загружается!\n' + 'Файл rer2.html');
'INFO! Включена отладка, данные не загружается!\n' +
'Файл rer2.html',
);
} }
} }
autorun(); autorun();