use prettier

This commit is contained in:
Alexander Popov 2023-08-14 22:42:55 +03:00
parent 041c61a205
commit febf916524
Signed by: iiiypuk
GPG Key ID: E47FE0AB36CD5ED6
5 changed files with 60 additions and 49 deletions

1
.prettierignore Normal file
View File

@ -0,0 +1 @@
*.md

10
.prettierrc.json Normal file
View File

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

View File

@ -1,6 +1,7 @@
@font-face {
font-family: 'SamsungOne';
src: url('SamsungOne-400.woff2') format('woff2'),
src:
url('SamsungOne-400.woff2') format('woff2'),
url('SamsungOne-400.woff') format('woff'),
url('SamsungOne-400.ttf') format('truetype');
font-weight: normal;

View File

@ -1,13 +1,13 @@
<!doctype html>
<html lang="ru">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Клятва - 2 сезон</title>
<link rel="shortcut icon" href="favicon.ico">
<link href="styles.css" rel="stylesheet">
</head>
<body>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Клятва - 3 сезон</title>
<link rel="shortcut icon" href="favicon.ico" />
<link href="styles.css" rel="stylesheet" />
</head>
<body>
<header>
<p class="title">Специально для мамы с любовью &#9829;</p>
</header>
@ -20,20 +20,19 @@
</section>
<section class="section-video">
<video id="video" controls>
</video>
<video id="video" controls> </video>
</section>
</div>
<script>
<script>
'use strict';
let episodesList = [223, 224, 225, 226, 227]; // example
let episodesList = [270, 271, 272, 273, 274, 275, 276]; // episodes
window.onload = function() {
window.onload = function () {
let episodeListElement = document.getElementById('episodeList');
episodesList.forEach(item => {
episodesList.forEach((item) => {
let episodeItem = document.createElement('li');
episodeItem.setAttribute('onclick', `changeEpisode("${item}");`);
episodeItem.innerText = item;
@ -41,7 +40,7 @@
});
changeEpisode(episodesList[0]);
}
};
function changeEpisode(episodeId) {
let videoElement = document.getElementById('video');
@ -53,6 +52,6 @@
videoElement.appendChild(videoSource);
videoElement.load();
}
</script>
</body>
</script>
</body>
</html>

View File

@ -62,7 +62,7 @@ div.episodes li {
display: inline-block;
cursor: pointer;
padding: 8px 16px;
transition: background-color .2s;
transition: background-color 0.2s;
}
div.episodes li:first-child {
border-top-left-radius: 8px;
@ -74,5 +74,5 @@ div.episodes li:last-child {
}
div.episodes li:hover {
background-color: var(--c-bay-wharf);
transition: background-color .2s;
transition: background-color 0.2s;
}