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-face {
font-family: 'SamsungOne'; 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.woff') format('woff'),
url('SamsungOne-400.ttf') format('truetype'); url('SamsungOne-400.ttf') format('truetype');
font-weight: normal; font-weight: normal;

View File

@ -1,11 +1,11 @@
<!doctype html> <!doctype html>
<html lang="ru"> <html lang="ru">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Клятва - 2 сезон</title> <title>Клятва - 3 сезон</title>
<link rel="shortcut icon" href="favicon.ico"> <link rel="shortcut icon" href="favicon.ico" />
<link href="styles.css" rel="stylesheet"> <link href="styles.css" rel="stylesheet" />
</head> </head>
<body> <body>
<header> <header>
@ -20,20 +20,19 @@
</section> </section>
<section class="section-video"> <section class="section-video">
<video id="video" controls> <video id="video" controls> </video>
</video>
</section> </section>
</div> </div>
<script> <script>
'use strict'; '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'); let episodeListElement = document.getElementById('episodeList');
episodesList.forEach(item => { episodesList.forEach((item) => {
let episodeItem = document.createElement('li'); let episodeItem = document.createElement('li');
episodeItem.setAttribute('onclick', `changeEpisode("${item}");`); episodeItem.setAttribute('onclick', `changeEpisode("${item}");`);
episodeItem.innerText = item; episodeItem.innerText = item;
@ -41,7 +40,7 @@
}); });
changeEpisode(episodesList[0]); changeEpisode(episodesList[0]);
} };
function changeEpisode(episodeId) { function changeEpisode(episodeId) {
let videoElement = document.getElementById('video'); let videoElement = document.getElementById('video');

View File

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