Skip to content

Commit

Permalink
Merge pull request #41 from AN0NCER/develop
Browse files Browse the repository at this point in the history
October update
  • Loading branch information
AN0NCER authored Oct 1, 2023
2 parents 139d568 + 957500c commit c98b103
Show file tree
Hide file tree
Showing 36 changed files with 15,821 additions and 625 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This site is a mobile application for watching anime. Uses data from **Shikimori

## Functional

<img src="https://raw.githubusercontent.com/AN0NCER/resources/main/screenshot_1.PNG" align="right" width="310">
<img src="https://raw.githubusercontent.com/AN0NCER/resources/main/screenshot_6.PNG" align="right" width="310">

- [X] Search anime by name.
- [X] View information about anime, including description, genre, number of episodes and rating.
Expand Down
Binary file added images/error-trailers.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/popup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 22 additions & 21 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, viewport-fit=cover">
<meta name="page" content="index">
<title>Tunime - PWA приложения</title>
<meta name="description" content="Смотреть аниме онлайн на сайте Tunime. Открой для себя новые миры с Tunime - лучшим сайтом для просмотра аниме!">
<meta name="description"
content="Смотреть аниме онлайн на сайте Tunime. Открой для себя новые миры с Tunime - лучшим сайтом для просмотра аниме!">
<link rel="icon" type="image/png" href="/images/icon-web.png" />
<link rel="apple-touch-icon" sizes="120x120" href="./images/icons/logo-x192-o.png" />
<link rel="apple-touch-icon" sizes="152x152" href="./images/icons/logo-x192-o.png" />
<link rel="apple-touch-icon" sizes="120x120" href="./images/icons/logo-x192-b.png" />
<link rel="apple-touch-icon" sizes="152x152" href="./images/icons/logo-x192-b.png" />
<link rel="stylesheet" href="/style/css/main.css">

<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="stylesheet" href="/style/css/min/swiper-bundle.min.css">
<link rel="stylesheet" href="/style/css/index.css">
<link rel="manifest" href="/images/icons/manifest-o.json">
<link rel="manifest" href="/images/icons/manifest-b.json">
<script src="/javascript/library/jqery.min.js"></script>
<script src="/javascript/engine/event_handler.js"></script>
</head>
Expand All @@ -25,7 +26,7 @@

<header class="unselectable">
<div class="account">
<a href="/user.html">
<a href="/login.html">
<div class="image-profile">
<img src="/images/ava.jpeg" alt="Image Account">
</div>
Expand All @@ -36,8 +37,7 @@
<b>Авторизируйтесь</b>
</div>
<div class="position">
<svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 384 512"><!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512">
<path
d="M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 256c-35.3 0-64-28.7-64-64s28.7-64 64-64s64 28.7 64 64s-28.7 64-64 64z" />
</svg>
Expand All @@ -47,13 +47,11 @@
</div>
<div class="desktop search w800">
<input type="text" name="" id="search-input" placeholder="Поиск">
<div class="btn unselectable"><svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 448 512"><!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. -->
<div class="btn unselectable"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
<path
d="M349.4 44.6c5.9-13.7 1.5-29.7-10.6-38.5s-28.6-8-39.9 1.8l-256 224c-10 8.8-13.6 22.9-8.9 35.3S50.7 288 64 288H175.5L98.6 467.4c-5.9 13.7-1.5 29.7 10.6 38.5s28.6 8 39.9-1.8l256-224c10-8.8 13.6-22.9 8.9-35.3s-16.6-20.7-30-20.7H272.5L349.4 44.6z" />
</svg></div>
<div class="icon"><svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512"><!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. -->
<div class="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path
d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352c79.5 0 144-64.5 144-144s-64.5-144-144-144S64 128.5 64 208s64.5 144 144 144z" />
</svg></div>
Expand All @@ -70,13 +68,11 @@

<div class="mobile search mbs">
<input type="text" name="" id="search-input" placeholder="Поиск">
<div class="btn unselectable"><svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 448 512"><!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. -->
<div class="btn unselectable"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
<path
d="M349.4 44.6c5.9-13.7 1.5-29.7-10.6-38.5s-28.6-8-39.9 1.8l-256 224c-10 8.8-13.6 22.9-8.9 35.3S50.7 288 64 288H175.5L98.6 467.4c-5.9 13.7-1.5 29.7 10.6 38.5s28.6 8 39.9-1.8l256-224c10-8.8 13.6-22.9 8.9-35.3s-16.6-20.7-30-20.7H272.5L349.4 44.6z" />
</svg></div>
<span class="icon"><svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512"><!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. -->
<span class="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path
d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352c79.5 0 144-64.5 144-144s-64.5-144-144-144S64 128.5 64 208s64.5 144 144 144z" />
</svg></span>
Expand All @@ -87,6 +83,10 @@
<!-- Additional required wrapper -->
<div class="swiper-wrapper">
<!-- Slides -->
<div class="swiper-slide slide-load">
<div class="preview-load"></div>
<div class="controls-load"></div>
</div>
</div>
<!-- If we need pagination -->
<div class="swiper-pagination"></div>
Expand Down Expand Up @@ -160,10 +160,10 @@
<div class="date">2022.12.28</div>
</div>

<span class="windowed hide">
<span class="windowed window-update hide">
<span class="hide-window"></span>
<!--Окно с обновлением-->
<span class="window-content content-update">
<span class="window-content content-update hide">
<span class="content-wraper">
<div class="title-content">
<span class="title">Обновление</span>
Expand All @@ -186,16 +186,17 @@
<!--Scripts-->
<!--Library-->
<script src="/javascript/library/swiper-bundle.min.js"></script>
<script src="/javascript/library/anime.min.js"></script>
<!--Custom library-->
<script src="/javascript/server.js"></script>
<script src="/javascript/engine/window_managment.js"></script>
<script src="/javascript/custom/updatedialog.js"></script>
<!-- <script src="/javascript/engine/window_managment.js"></script> -->
<!-- <script src="/javascript/custom/updatedialog.js"></script> -->
<script src="/javascript/parametrs.js"></script>
<script src="/javascript/jmenu.js"></script>
<script src="/javascript/shikimori.js"></script>
<script src="/javascript/kodik.js"></script>
<script src="/javascript/pages/index.js"></script>
<script src="/javascript/custom/swtreilers.js"></script>
<script src="/javascript/pages/index.js" type="module"></script>
<!-- <script src="/javascript/custom/swtreilers.js"></script> -->
<script src="https://www.youtube.com/iframe_api"></script>
</body>

Expand Down
4 changes: 4 additions & 0 deletions javascript/jmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,8 @@ function OrienatationScreen(){
window.addEventListener("orientationchange", function () {
$('body').attr('data-orientation', screen.orientation.angle);
});
}

function HasMenu(){
return true;
}
41 changes: 41 additions & 0 deletions javascript/modules/Popup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
let _ids = [];

export async function ShowInfo(message, id) {
if (_ids.findIndex(x => x == id) != -1) {
return;
}

_ids.push(id);

let ismenu = HasMenu() ? "visible" : "none";
$('body').append(genHtml({ text: message, id: id, menu: ismenu }));
let h = $(`.popup-id-${id} > .popup-content`).height();
let h_menu = !HasMenu() ? 0 : $('.application-menu').outerHeight();
if ($('body').hasClass('menuver') && ($('body').attr("data-orientation") == "90" || $('body').attr("data-orientation") == "270")) {
h_menu = 0;
}

anime({
targets: `.popup-id-${id}`,
bottom: [-60, h + h_menu + 10],
rotate: [30, 0],
complete: () => {
let i = setInterval(() => {
anime({
targets: `.popup-id-${id}`,
bottom: -h * 5,
complete: () => {
clearInterval(i);
_ids.splice(_ids.findIndex(x => x == id), 1);
$(`.popup-id-${id}`).remove();
}
})
}, 3000);
}
});
}

function genHtml({ menu = "visible", text, id } = {}) {
const html = `<div class="popup unselectable popup-menu-${menu} popup-id-${id}"><div class="popup-content">${text}<img src="/images/popup.png" /></div></div>`;
return html;
}
9 changes: 8 additions & 1 deletion javascript/modules/ShikiAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,14 @@ export const Users = {

unread_messages: function (id, event = () => { }) {
const url = this.base_url() + "/" + id + "/unread_messages";
return StandartIDGET(url, event);
const request = Fetch("GET", url, Headers.bearer());
return {
GET: async () => {
const response = await request.fetch();
event(response);
return response;
}
}
},

history: function (id, query = {}, event = () => { }) {
Expand Down
36 changes: 23 additions & 13 deletions javascript/modules/TunimeApi.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,39 @@
let _updateData = undefined;
let _enabled = false;


GetOnlineData();
setInterval(() => {
GetOnlineData();
}, 299000);

function GetOnlineData() {
fetch('https://tunime.onrender.com/online').then((respnose) => {
return respnose.json();
fetch('https://tunime.onrender.com/online').then((response) => {
return response.json();
}).then((val) => {
_updateData = val;
_enabled = true;
});
}

export function GetM3U8(url) {
return new Promise((resolve) => {
fetch("https://anime-m3u8.onrender.com/link-anime", { body: new URLSearchParams({ 'link': 'https:' + url }), method: 'post' })
.then(function (response) { return response.json(); })
.then(function (data) {
return resolve(data);
}).catch((res)=>{
console.error(res);
});
});
export const ApiTunime = {
anime: async function (id) {
fetch(`https://tunime.onrender.com/online/${id}/o`).then((response) => {
return response.json();
}).then((val) => {
console.log(val);
});
},

online: function () {

},

stream: function (url) {
return new Promise((resolve) => {
fetch(`https://anime-m3u8.onrender.com/link-anime`, { body: new URLSearchParams({ 'link': 'https:' + url }), method: 'post' })
.then(function (response) { return response.json(); })
.then(function (data) { return resolve(data); })
.catch((res) => { console.log(res) });
});
}
}
10 changes: 10 additions & 0 deletions javascript/modules/Windows.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ export class WindowManagement {
init: function () { },
show: function () { },
hide: function () { },
anim: {
showed: function () { },
hided: function () { },
},
verif: function () { return true; },
}, el = '.windowed') {
this.authorized = false;
Expand Down Expand Up @@ -40,6 +44,9 @@ export class WindowManagement {
await Sleep(300);
el.addClass('hide');
$(`${this.element} > .hide-window`).css('opacity', '');
if (this.target.anim?.hided) {
this.target.anim.hided();
}
}

async show() {
Expand All @@ -55,5 +62,8 @@ export class WindowManagement {
$(`${this.element} > .window-content`).removeClass('hide');
await Sleep(10);
$(`${this.element} > .window-content`).css('transform', 'translateY(0%)')
if (this.target.anim?.showed) {
this.target.anim.showed();
}
}
}
Loading

0 comments on commit c98b103

Please sign in to comment.