use prettier
This commit is contained in:
parent
041c61a205
commit
febf916524
1
.prettierignore
Normal file
1
.prettierignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
*.md
|
10
.prettierrc.json
Normal file
10
.prettierrc.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"printWidth": 100,
|
||||||
|
"bracketSpacing": true,
|
||||||
|
"bracketSameLine": true,
|
||||||
|
"semi": true,
|
||||||
|
"singleQuote": true,
|
||||||
|
"arrowParens": "always",
|
||||||
|
"htmlWhitespaceSensitivity": "strict",
|
||||||
|
"endOfLine": "lf"
|
||||||
|
}
|
@ -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;
|
||||||
|
@ -1,58 +1,57 @@
|
|||||||
<!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>
|
||||||
<p class="title">Специально для мамы с любовью ♥</p>
|
<p class="title">Специально для мамы с любовью ♥</p>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<section class="section-episodes">
|
<section class="section-episodes">
|
||||||
<div class="episodes">
|
<div class="episodes">
|
||||||
<ul id="episodeList"></ul>
|
<ul id="episodeList"></ul>
|
||||||
</div>
|
</div>
|
||||||
</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;
|
||||||
episodeListElement.appendChild(episodeItem);
|
episodeListElement.appendChild(episodeItem);
|
||||||
});
|
});
|
||||||
|
|
||||||
changeEpisode(episodesList[0]);
|
changeEpisode(episodesList[0]);
|
||||||
}
|
};
|
||||||
|
|
||||||
function changeEpisode(episodeId) {
|
function changeEpisode(episodeId) {
|
||||||
let videoElement = document.getElementById('video');
|
let videoElement = document.getElementById('video');
|
||||||
|
|
||||||
videoElement.textContent = '';
|
videoElement.textContent = '';
|
||||||
let videoSource = document.createElement('source');
|
let videoSource = document.createElement('source');
|
||||||
videoSource.setAttribute('src', `https://a2s.su/y/o/${episodeId}.mp4`);
|
videoSource.setAttribute('src', `https://a2s.su/y/o/${episodeId}.mp4`);
|
||||||
videoSource.setAttribute('type', 'video/mp4');
|
videoSource.setAttribute('type', 'video/mp4');
|
||||||
videoElement.appendChild(videoSource);
|
videoElement.appendChild(videoSource);
|
||||||
videoElement.load();
|
videoElement.load();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user