Skip to content

Commit db00343

Browse files
authored
Merge pull request #17 from chytanka/develop
feat: zenko
2 parents db83890 + 0fe88df commit db00343

21 files changed

+230
-21
lines changed

src/app/app-routing.module.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export const IMGUR_PATH = `imgur`;
2323
export const REDDIT_PATH = `reddit`;
2424
export const READ_PATH = `read`;
2525
export const LIST_PATH = `list`;
26+
export const ZENKO_PATH = `zenko`;
2627

2728
const routes: Routes = [
2829
{
@@ -53,6 +54,10 @@ const routes: Routes = [
5354
path: REDDIT_PATH,
5455
loadChildren: () => import('./reddit/reddit.module').then(m => m.RedditModule)
5556
},
57+
{
58+
path: ZENKO_PATH,
59+
loadChildren: () => import('./zenko/zenko.module').then(m => m.ZenkoModule)
60+
},
5661
{
5762
matcher: urlMatcher,
5863
loadChildren: () => import('./link-parser/link-parser.module').then(m => m.LinkParserModule)

src/app/common/common-read/utils/composition.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@ export interface CompositionImage {
88
nsfw?: string;
99
}
1010

11+
export interface CompositionPublisher {
12+
id: string;
13+
site: string;
14+
avatar: CompositionImage;
15+
description: string
16+
name: string;
17+
links: Array<{
18+
link: string,
19+
title: string
20+
}>
21+
}
22+
1123
export interface CompositionEpisode {
1224
title: string;
1325
episode?: number;
@@ -17,7 +29,7 @@ export interface CompositionEpisode {
1729
chapter?: number;
1830
part?: number;
1931
extra?: boolean;
20-
32+
publisher?: CompositionPublisher,
2133
images: CompositionImage[];
2234
}
2335

src/app/link-parser/link-parser/link-parser.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import { Component, Signal, ViewChild, WritableSignal, computed, effect, inject, signal } from '@angular/core';
22
import { LinkParserService } from '../data-access/link-parser.service';
3-
import { ImgurLinkParser, JsonLinkParser, MangadexLinkParser, RedditLinkParser, TelegraphLinkParser } from '../utils';
3+
import {ZenkoLinkParser, ImgurLinkParser, JsonLinkParser, MangadexLinkParser, RedditLinkParser, TelegraphLinkParser } from '../utils';
44
import { ActivatedRoute, Router } from '@angular/router';
55
import { LangService } from '../../shared/data-access/lang.service';
66
import { Base64 } from '../../shared/utils';
77
import { Title } from '@angular/platform-browser';
88
import { LinkParserSettingsService } from '../data-access/link-parser-settings.service';
9-
import { HistoryService } from '../../history/data-access/history.service';
10-
import { DialogComponent } from '../../shared/ui/dialog/dialog.component';
119

1210
@Component({
1311
selector: 'app-link-parser',
@@ -47,6 +45,7 @@ export class LinkParserComponent {
4745
this.parser.parsers.push(new MangadexLinkParser)
4846
this.parser.parsers.push(new TelegraphLinkParser)
4947
this.parser.parsers.push(new RedditLinkParser)
48+
this.parser.parsers.push(new ZenkoLinkParser)
5049
this.parser.parsers.push(new JsonLinkParser)
5150
}
5251

@@ -110,6 +109,7 @@ export class LinkParserComponent {
110109
}
111110

112111
favicons: any = {
112+
zenko: '//zenko.online/favicon.ico',
113113
reddit: '//reddit.com/favicon.ico',
114114
imgur: '//imgur.com/favicon.ico',
115115
mangadex: '//mangadex.org/favicon.ico',

src/app/link-parser/ui/faq/faq.component.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@
4646
<li><code>mangadex.org/&#123;id&#125;</code></li>
4747
</ul>
4848
</dd>
49+
50+
<dt><img src="//zenko.online/favicon.ico" alt="MangaDex"><a href="//zenko.online" target="_blank"
51+
rel="noopener noreferrer">Zenko</a></dt>
52+
<dd>
53+
<ul>
54+
<li><code>zenko.online/titles/&#123;titleId&#125;/&#123;id&#125;</code></li>
55+
</ul>
56+
</dd>
57+
4958
</dl>
5059
<p style="font-style: italic;">{{lang.ph().whereIdIs}}</p>
5160

src/app/link-parser/utils/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ export * from './imgur-link-parser';
33
export * from './mangadex-link-parser';
44
export * from './json-link-parser';
55
export * from './telegraph-link-parser';
6-
export * from './reddit-link-parser';
6+
export * from './reddit-link-parser';
7+
export * from './zenko-link-parser';
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { LinkParser } from "./link-parser";
2+
3+
export class ZenkoLinkParser extends LinkParser {
4+
override regex = /zenko\.online\/titles\/\d+\/(\d+)/;
5+
override site = 'zenko';
6+
};

src/app/list/list-shell/list-shell.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Component, EffectCleanupRegisterFn, WritableSignal, computed, effect, inject, signal } from '@angular/core';
22
import { LinkParserService } from '../../link-parser/data-access/link-parser.service';
3-
import { ImgurLinkParser, JsonLinkParser, LinkParser, MangadexLinkParser, RedditLinkParser, TelegraphLinkParser } from '../../link-parser/utils';
3+
import { ImgurLinkParser, JsonLinkParser, LinkParser, MangadexLinkParser, RedditLinkParser, TelegraphLinkParser, ZenkoLinkParser } from '../../link-parser/utils';
44
import { DomManipulationService } from '../../shared/data-access';
55
import { LangService } from '../../shared/data-access/lang.service';
66

@@ -85,6 +85,7 @@ export class ListShellComponent {
8585
this.parser.parsers.push(new MangadexLinkParser)
8686
this.parser.parsers.push(new TelegraphLinkParser)
8787
this.parser.parsers.push(new RedditLinkParser)
88+
this.parser.parsers.push(new ZenkoLinkParser)
8889
this.parser.parsers.push(new JsonLinkParser)
8990
}
9091

src/app/shared/ui/pages-indicator/pages-indicator.component.scss

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
@property --item-scale {
2+
syntax: "<number>";
3+
inherits: true;
4+
initial-value: 1;
5+
}
6+
17
:host {
28
display: flex;
39
align-items: center;
@@ -17,12 +23,14 @@ div {
1723
font-weight: bold;
1824
line-height: 1;
1925
transition: all var(--t) ease-in-out;
26+
--translate-y: 0;
27+
transform: translateY(var(--translate-y)) scale(var(--item-scale));
2028

2129
&:hover,
2230
&.active {
2331
color: #ffd60a;
2432
background-color: #103651;
25-
transform: translateY(-.25ch);
33+
--translate-y: -.25ch;
2634

2735
@media (prefers-color-scheme: light) {
2836
background-color: #f8d755;
@@ -68,4 +76,18 @@ div {
6876
border-top-right-radius: unset;
6977
border-bottom-right-radius: unset;
7078
}
71-
}
79+
}
80+
81+
// @supports (animation-timeline: view()) {
82+
// div {
83+
// animation: scale both steps(6), scale both steps(6) reverse;
84+
// animation-timeline: view(inline);
85+
// animation-range: entry, exit;
86+
// }
87+
88+
// @keyframes scale {
89+
// 0% {
90+
// --item-scale: 0;
91+
// }
92+
// }
93+
// }

src/app/shared/ui/viewer/components/hint-page/hint-page.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626

2727

2828
<svg dir="ltr" frame="2" viewBox="0 0 320 320">
29-
<rect x="-20" y="85" width="360" height="120" rx="4" stroke-width="2" fill="white" stroke="black"></rect>
29+
<rect x="-20" y="85" width="360" height="150" rx="4" stroke-width="2" fill="white" stroke="black"></rect>
3030
<text fill="currentColor" font-size="14">
3131
<tspan x="50%" y="34%">для навігації: ⬅➡ або ad</tspan>
3232
<tspan x="50%" y="42%">Fullscreen: f</tspan>
3333
<tspan x="50%" y="50%">Поділитися посиланням: Ctrl+E</tspan>
3434
<tspan x="50%" y="58%">Відкрити список епізодів: Ctrl+P</tspan>
35-
<!-- <tspan x="50%" y="66%">Скачати для перегляду офлайн: Ctrl+S</tspan> -->
35+
<tspan x="50%" y="66%">Скачати для перегляду офлайн: Ctrl+S</tspan>
3636
</text>
3737
</svg>
3838

src/app/shared/ui/viewer/components/hint-page/hint-page.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ svg {
3434
font-weight: bold;
3535
font-style: italic;
3636
opacity: .8;
37-
font-family: cursive;
37+
font-family: 'EB Garamond';
3838
}
3939
}

0 commit comments

Comments
 (0)