Skip to content

Commit

Permalink
Merge pull request #118 from AN0NCER/develop
Browse files Browse the repository at this point in the history
September update
  • Loading branch information
AN0NCER authored Sep 16, 2024
2 parents e86370d + a0750a3 commit 8bcbaad
Show file tree
Hide file tree
Showing 82 changed files with 7,143 additions and 1,884 deletions.
Binary file removed images/anime-dragon.png
Binary file not shown.
Binary file added images/anime-not.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/collections.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 23 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,27 @@
</div>
</div>
<div class="notification">
<svg viewBox="0 0 35 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<svg class="mail" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M19.9998 2.5V3.89688C25.6638 4.79609 29.9998 9.70312 29.9998 15.625V18.2344C29.9998 21.7812 31.2107 25.2266 33.4216 28L34.5857 29.4531C35.0388 30.0156 35.1248 30.7891 34.8123 31.4375C34.4998 32.0859 33.8435 32.5 33.1248 32.5H1.87477C1.15368 32.5 0.497036 32.0859 0.184848 31.4375C-0.127417 30.7891 -0.0396048 30.0156 0.410708 29.4531L1.57555 28C3.79196 25.2266 4.99977 21.7812 4.99977 18.2344V15.625C4.99977 9.70312 9.33571 4.79609 14.9998 3.89688V2.5C14.9998 1.11953 16.117 0 17.4998 0C18.8826 0 19.9998 1.11953 19.9998 2.5ZM16.8748 7.5C12.3904 7.5 8.74977 11.1406 8.74977 15.625V18.2344C8.74977 21.9766 7.66539 25.625 5.64899 28.75H29.3513C27.3357 25.625 26.2498 21.9766 26.2498 18.2344V15.625C26.2498 11.1406 22.6091 7.5 18.1248 7.5H16.8748ZM22.4998 35C22.4998 36.2578 21.9763 37.6016 21.0388 38.5391C20.1013 39.4766 18.7576 40 17.4998 40C16.1716 40 14.8982 39.4766 13.9607 38.5391C13.0232 37.6016 12.4998 36.2578 12.4998 35H22.4998Z">
</path>
d="M13.3125 7.6438H11.1375C10.525 7.6438 9.98125 7.9813 9.70625 8.5313L9.18125 9.5688C9.05625 9.8188 8.80625 9.97505 8.53125 9.97505H6.48125C6.2875 9.97505 6.0125 9.9313 5.83125 9.5688L5.30625 8.53755C5.03125 7.9938 4.48125 7.65005 3.875 7.65005H1.6875C1.44375 7.65005 1.25 7.8438 1.25 8.08755V10.125C1.25 12.3938 2.6125 13.75 4.8875 13.75H10.125C12.2688 13.75 13.5875 12.575 13.75 10.4875V8.0813C13.75 7.8438 13.5562 7.6438 13.3125 7.6438Z"
fill="white" />
<path
d="M13.75 4.88125V6.78125C13.6125 6.73125 13.4625 6.70625 13.3125 6.70625H11.1375C10.1687 6.70625 9.3 7.24375 8.86875 8.10625L8.4 9.03125H6.6125L6.14375 8.1125C5.7125 7.24375 4.84375 6.70625 3.875 6.70625H1.6875C1.5375 6.70625 1.3875 6.73125 1.25 6.78125V4.88125C1.25 2.60625 2.60625 1.25 4.88125 1.25H10.1188C12.3938 1.25 13.75 2.60625 13.75 4.88125Z"
fill="white" />
</svg>

<svg class="dot" viewBox="0 0 16 15" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M12.375 5C13.4105 5 14.25 4.16053 14.25 3.125C14.25 2.08947 13.4105 1.25 12.375 1.25C11.3395 1.25 10.5 2.08947 10.5 3.125C10.5 4.16053 11.3395 5 12.375 5Z"
fill="white" />
<path
d="M13.2125 7.94998H11.1438C10.5625 7.94998 10.0437 8.27498 9.78125 8.78748L9.28125 9.77498C9.1625 10.0125 8.925 10.1562 8.6625 10.1562H6.71875C6.5375 10.1562 6.26875 10.1187 6.1 9.76873L5.60625 8.78748C5.34375 8.26873 4.825 7.94373 4.24375 7.94373H2.1625C1.9375 7.94998 1.75 8.13748 1.75 8.36248V10.2937C1.75 12.4625 3.04375 13.75 5.20625 13.75H10.1812C12.2188 13.75 13.475 12.6312 13.625 10.65V8.36248C13.625 8.13748 13.4375 7.94998 13.2125 7.94998Z"
fill="white" />
<path
d="M13.625 6.5V7.08125C13.4937 7.0375 13.3562 7.0125 13.2125 7.0125H11.1438C10.2063 7.0125 9.3625 7.53125 8.95 8.36875L8.5125 9.225H6.86875L6.44375 8.375C6.01875 7.53125 5.18125 7.0125 4.24375 7.0125H2.1625C2.01875 7.0125 1.88125 7.0375 1.75 7.08125V5.325C1.75 3.41875 3.29375 1.875 5.2 1.875H9C9.4 1.875 9.6875 2.2375 9.6125 2.625C9.5125 3.125 9.55625 3.66875 9.8 4.24375C10.0813 4.89375 10.6062 5.41875 11.2562 5.7C11.8312 5.94375 12.375 5.9875 12.875 5.8875C13.2625 5.8125 13.625 6.1 13.625 6.5Z"
fill="white" />
</svg>
<div class="dot hide"></div>

</div>
</div>
</header>
Expand All @@ -71,7 +86,10 @@

<div class="app-update">
<div class="update-content-version">
<span class="text-update"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M176 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64c-35.3 0-64 28.7-64 64H24c-13.3 0-24 10.7-24 24s10.7 24 24 24H64v56H24c-13.3 0-24 10.7-24 24s10.7 24 24 24H64v56H24c-13.3 0-24 10.7-24 24s10.7 24 24 24H64c0 35.3 28.7 64 64 64v40c0 13.3 10.7 24 24 24s24-10.7 24-24V448h56v40c0 13.3 10.7 24 24 24s24-10.7 24-24V448h56v40c0 13.3 10.7 24 24 24s24-10.7 24-24V448c35.3 0 64-28.7 64-64h40c13.3 0 24-10.7 24-24s-10.7-24-24-24H448V280h40c13.3 0 24-10.7 24-24s-10.7-24-24-24H448V176h40c13.3 0 24-10.7 24-24s-10.7-24-24-24H448c0-35.3-28.7-64-64-64V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H280V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H176V24zM160 128H352c17.7 0 32 14.3 32 32V352c0 17.7-14.3 32-32 32H160c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32zm192 32H160V352H352V160z"/></svg><span>Обновление</span></span>
<span class="text-update"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path
d="M176 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64c-35.3 0-64 28.7-64 64H24c-13.3 0-24 10.7-24 24s10.7 24 24 24H64v56H24c-13.3 0-24 10.7-24 24s10.7 24 24 24H64v56H24c-13.3 0-24 10.7-24 24s10.7 24 24 24H64c0 35.3 28.7 64 64 64v40c0 13.3 10.7 24 24 24s24-10.7 24-24V448h56v40c0 13.3 10.7 24 24 24s24-10.7 24-24V448h56v40c0 13.3 10.7 24 24 24s24-10.7 24-24V448c35.3 0 64-28.7 64-64h40c13.3 0 24-10.7 24-24s-10.7-24-24-24H448V280h40c13.3 0 24-10.7 24-24s-10.7-24-24-24H448V176h40c13.3 0 24-10.7 24-24s-10.7-24-24-24H448c0-35.3-28.7-64-64-64V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H280V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H176V24zM160 128H352c17.7 0 32 14.3 32 32V352c0 17.7-14.3 32-32 32H160c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32zm192 32H160V352H352V160z" />
</svg><span>Обновление</span></span>
<div class="to-version">
<span class="cur version">4fg5d</span>
<span class="version">></span>
Expand Down
2 changes: 1 addition & 1 deletion javascript/auto/download_a.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Sleep } from "../modules/funcitons.js";
import { Sleep } from "../modules/functions.js";
import { ShowInfo } from "../modules/Popup.js";
import { UserRates } from "../modules/ShikiAPI.js";
import { User } from "../modules/ShikiUSR.js";
Expand Down
12 changes: 12 additions & 0 deletions javascript/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,21 @@ function addMenu({ icons = { main: "", selected: "" }, id, link = "/", selected
if (IntercatMenu[id]) {
let target = `.btn-menu[data-id="${id}"]`;
let timer;
let called = false;

$(target).contextmenu((e) => {
e.preventDefault();
showInteractMenu(id, e);
});

$(target).bind('touchstart', function (e) {
called = false;
clearInterval(timer);
timer = setInterval(() => {
if (called)
return clearInterval(timer);
showInteractMenu(id, e);
called = true;
}, 700);
// e.preventDefault();
});
Expand All @@ -109,6 +114,7 @@ function addContinue({ icon } = {}) {
});

let target = `#btnContinue`;
let called = false;
let timer;

$(target).contextmenu((e) => {
Expand All @@ -117,9 +123,13 @@ function addContinue({ icon } = {}) {
});

$(target).bind('touchstart', function (e) {
called = false;
clearInterval(timer);
timer = setInterval(() => {
if (called)
return clearInterval(timer);
showInteractMenu("play", e);
called = true;
}, 700);
// e.preventDefault();
});
Expand Down Expand Up @@ -171,6 +181,8 @@ export const InitMenu = async () => {
};

function showInteractMenu(id, e) {
if (document.hidden)
return;
const dom = '.user-interactive > .interact-content';
$(dom).empty();
for (const key in IntercatMenu[id]) {
Expand Down
38 changes: 38 additions & 0 deletions javascript/modules/AnimeCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,43 @@ export const ACard = {
${score}
</div></div></div>`
}
},

/**
* Генерация карточки аниме
* @param {{ type: "a" | "div", anime: {id:string, poster: {mainUrl:string}, russian:string, airedOn: {year:number}, score:number}, data: {key:value}, exclude: [string] }} data - Данные аниме
* @returns DOM елемента
*/
GenV2: function ({ type = 'a', anime, data, exclude = [] } = {}) {
if (type == 'a') {
return `<a href="/watch.html?id=${anime.id}" class="card-anime" data-id="${anime.id}" ${Data()}>${Gen()}</a>`;
} else {
return `<div class="card-anime" data-id="${anime.id}" ${Data()}>${Gen()}</div>`;
}

function Gen() {
return `<div class="card-content">
<img src="${anime.poster.mainUrl}" class="blur">
<img src="${anime.poster.mainUrl}">
<div class="title"><span>${anime.russian}</span></div>
${data?.score ? `<div class="score">${data.score}</div>` : ''}
</div>
<div class="card-information">
<div class="year">${anime.airedOn.year}</div>
<div class="score">${icon_score}${anime.score}</div>
</div>`;
}

function Data() {
if (!data) return '';

let str = '';
for (const key in data) {
if (exclude.includes(key)) continue;
str += `data-${key}="${data[key]}"`;
}

return str;
}
}
};
Loading

0 comments on commit 8bcbaad

Please sign in to comment.