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-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;
|
||||
|
@ -1,58 +1,57 @@
|
||||
<!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>
|
||||
<header>
|
||||
<p class="title">Специально для мамы с любовью ♥</p>
|
||||
</header>
|
||||
<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">Специально для мамы с любовью ♥</p>
|
||||
</header>
|
||||
|
||||
<div class="container">
|
||||
<section class="section-episodes">
|
||||
<div class="episodes">
|
||||
<ul id="episodeList"></ul>
|
||||
</div>
|
||||
</section>
|
||||
<div class="container">
|
||||
<section class="section-episodes">
|
||||
<div class="episodes">
|
||||
<ul id="episodeList"></ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section-video">
|
||||
<video id="video" controls>
|
||||
</video>
|
||||
</section>
|
||||
</div>
|
||||
<section class="section-video">
|
||||
<video id="video" controls> </video>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
'use strict';
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
let episodesList = [223, 224, 225, 226, 227]; // example
|
||||
let episodesList = [270, 271, 272, 273, 274, 275, 276]; // episodes
|
||||
|
||||
window.onload = function() {
|
||||
let episodeListElement = document.getElementById('episodeList');
|
||||
window.onload = function () {
|
||||
let episodeListElement = document.getElementById('episodeList');
|
||||
|
||||
episodesList.forEach(item => {
|
||||
let episodeItem = document.createElement('li');
|
||||
episodeItem.setAttribute('onclick', `changeEpisode("${item}");`);
|
||||
episodeItem.innerText = item;
|
||||
episodeListElement.appendChild(episodeItem);
|
||||
});
|
||||
episodesList.forEach((item) => {
|
||||
let episodeItem = document.createElement('li');
|
||||
episodeItem.setAttribute('onclick', `changeEpisode("${item}");`);
|
||||
episodeItem.innerText = item;
|
||||
episodeListElement.appendChild(episodeItem);
|
||||
});
|
||||
|
||||
changeEpisode(episodesList[0]);
|
||||
}
|
||||
changeEpisode(episodesList[0]);
|
||||
};
|
||||
|
||||
function changeEpisode(episodeId) {
|
||||
let videoElement = document.getElementById('video');
|
||||
function changeEpisode(episodeId) {
|
||||
let videoElement = document.getElementById('video');
|
||||
|
||||
videoElement.textContent = '';
|
||||
let videoSource = document.createElement('source');
|
||||
videoSource.setAttribute('src', `https://a2s.su/y/o/${episodeId}.mp4`);
|
||||
videoSource.setAttribute('type', 'video/mp4');
|
||||
videoElement.appendChild(videoSource);
|
||||
videoElement.load();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
videoElement.textContent = '';
|
||||
let videoSource = document.createElement('source');
|
||||
videoSource.setAttribute('src', `https://a2s.su/y/o/${episodeId}.mp4`);
|
||||
videoSource.setAttribute('type', 'video/mp4');
|
||||
videoElement.appendChild(videoSource);
|
||||
videoElement.load();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user