Skip to content
This repository was archived by the owner on Aug 11, 2024. It is now read-only.

Commit e62515f

Browse files
committed
feat: change repo links
1 parent 793de86 commit e62515f

File tree

10 files changed

+742
-305
lines changed

10 files changed

+742
-305
lines changed

.gitattributes

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# automatically normalize line endings
2+
* text=auto
3+
4+
.git* text
5+
*.json text
6+
*.js text
7+
*.md text linguist-detectable
8+
*.{yml,yaml} text
9+
10+
*.png binary
11+
*.{jpeg,jpg} binary

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"editor.linkedEditing": true,
66
"html.autoClosingTags": true,
77
"[svelte]": {
8-
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
8+
"editor.defaultFormatter": "svelte.svelte-vscode"
99
},
1010
"svelte.enable-ts-plugin": true,
1111
"svelte.plugin.svelte.enable": true

LICENSE

+661-201
Large diffs are not rendered by default.

mdsvex.config.cjs

-28
This file was deleted.
File renamed without changes.
File renamed without changes.

src/lib/components/Stats.svelte

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<script>
2+
export let stats = {
3+
total_users: 'Loading...',
4+
total_uploads: 'Loading...',
5+
total_domains: 'Loading...'
6+
};
7+
</script>
8+
9+
<div class="flex md:flex-row flex-col justify-center gap-4 md:p-10 p-4">
10+
<div
11+
class="p-8 bg-slate-800 rounded-lg text-white text-center lg:px-40 md:px-16 px-10"
12+
data-aos="fade-up"
13+
>
14+
<p><b class="cursor-default">Users</b></p>
15+
<p class="p-1 cursor-default">{stats.total_users}</p>
16+
</div>
17+
<div
18+
class="p-8 bg-slate-800 rounded-lg text-white text-center lg:px-40 md:px-16 px-10"
19+
data-aos="fade-up"
20+
>
21+
<p><b class="cursor-default">Uploads</b></p>
22+
<p class="p-1 cursor-default">{stats.total_uploads}</p>
23+
</div>
24+
<div
25+
class="p-8 bg-slate-800 rounded-lg text-white text-center lg:px-40 md:px-16 px-10"
26+
data-aos="fade-up"
27+
>
28+
<p><b class="cursor-default">Domains</b></p>
29+
<p class="p-1 cursor-default">{stats.total_domains}</p>
30+
</div>
31+
</div>

src/routes/[...image]/index.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
color: deeppink;
109109
}
110110
:global(body) {
111-
background-color: midnightblue;
111+
background-color: slategrey;
112112
background-image: none !important;
113113
}
114114
.bar {

src/routes/__layout-main.svelte

+15-42
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
],
1919
[
2020
{
21-
href: 'https://github.com/Tricked-dev/ascella',
21+
href: 'https://github.com/ascellahost',
2222
a: 'Github'
2323
},
2424
{
@@ -30,18 +30,18 @@
3030
a: 'Report'
3131
}
3232
],
33-
34-
];
35-
const otherLinks = [
36-
{
37-
href: '/domains',
38-
a: 'Domains'
39-
},
40-
{
41-
href: '/contributors',
42-
a: 'Contributors'
43-
}
33+
[
34+
{
35+
href: '/domains',
36+
a: 'Domains'
37+
},
38+
{
39+
href: 'https://discord.gg/KkMKCchJb8',
40+
a: 'Discord'
41+
}
42+
]
4443
];
44+
4545
const topLinks = [
4646
{
4747
href: 'https://discord.gg/KkMKCchJb8',
@@ -57,17 +57,13 @@
5757
type: 'website',
5858
description:
5959
'Ascella Uploader is an extremely fast image uploader built with the newest technologies. ' +
60-
'Ascella is OpenSource you can find the source code at https://github.com/Tricked-dev/ascella',
60+
'Ascella is OpenSource you can find the source code at https://github.com/ascellahost',
6161
title: 'Ascella Uploader - The fastest image uploader',
6262
keywords: 'javascript typescript programming discord matrix',
6363
viewport: 'width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no',
6464
site_name: 'tricked#3777',
6565
locale: 'en_US'
6666
};
67-
let expended = false;
68-
function setExpended() {
69-
expended = !expended;
70-
}
7167
</script>
7268

7369
<svelte:head>
@@ -101,35 +97,21 @@
10197
<div class="flex items-center">
10298
<div class="flex flex-col md:flex-row gap-4 p-2">
10399
<a class="text-slate-200 text-lg px-2 py-0.5" href="/"><b>Ascella.host</b></a>
104-
105100
{#each topLinks as link}
106101
<a
107-
class= "hover:text-slate-100 text-slate-300 text-lg hover:bg-slate-800 rounded-lg px-2 py-0.5 duration-150"
102+
class="hover:text-slate-100 text-slate-300 text-lg hover:bg-slate-800 rounded-lg px-2 py-0.5 duration-150"
108103
href={link.href}>{link.a}</a
109104
>
110105
{/each}
111106
</div>
112-
<div class="md:inline hidden">
113-
{#if expended}
114-
<ul class="flex gap-2 flex-col md:flex-row px-2 pb-1">
115-
{#each otherLinks as link (link.a)}
116-
<li transition:scale={{ delay: 250, duration: 300, easing: quintOut }}>
117-
<a href={link.href} class="text-slate-300 underline hover:text-teal-500"
118-
>{link.a}</a
119-
>
120-
</li>
121-
{/each}
122-
</ul>
123-
{/if}
124-
</div>
125107
</div>
126108
</div>
127109
</nav>
128110
<slot />
129111

130112
<div class="pb-7" />
131113
<div
132-
class="transform no-underline text-gray-300 hover:text-white min-h-full border-t-2 border-gray-300 hover:border-white pt-6 footer bg-slate-700"
114+
class="transform no-underline text-gray-300 hover:text-white min-h-full border-t-2 border-gray-300 hover:border-white pt-6 footer"
133115
transition:fly={{ x: 1500, y: 0, duration: 800 }}
134116
>
135117
<div class="flex-auto flex list-none">
@@ -158,13 +140,4 @@
158140
:global(body) {
159141
@apply bg-gradient-to-br from-cyan-600 to-sky-600;
160142
}
161-
162-
/* .a-btn {
163-
@apply duration-500 block border-b-4 border-blue-300 hover:border-teal-500 mt-4 lg:inline-block lg:mt-0 hover:text-white px-4 py-2 rounded hover:bg-teal-800 mr-2;
164-
}
165-
.dropdown:focus-within .dropdown-menu {
166-
opacity: 1;
167-
transform: translate(0) scale(1);
168-
visibility: visible;
169-
} */
170143
</style>

src/routes/[email protected]

+22-32
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,21 @@
5050
}
5151
];
5252
import '../css/index.scss';
53+
import Stats from '$lib/components/Stats.svelte';
5354
5455
$: reviews = [];
55-
$: stats = {} as Record<string,string>;
56-
onMount(()=>{
57-
AOS.init()
58-
console.log('AOS Mounted')
59-
})
56+
6057
onMount(async () => {
61-
const [module, revs, stat] = await Promise.all([
62-
import('svelte-carousel'),
63-
getReviews(),
64-
getStats()
65-
]);
58+
AOS.init();
59+
const [module, revs] = await Promise.all([import('svelte-carousel'), getReviews()]);
6660
Carousel = module.default;
6761
reviews = revs;
68-
stats = stat;
6962
});
63+
let stats = getStats() as Promise<{
64+
total_domains: string;
65+
total_uploads: string;
66+
total_users: string;
67+
}>;
7068
</script>
7169

7270
<div class="mx-auto">
@@ -77,36 +75,28 @@
7775
A <b>fast</b> image uploader made for <b>all</b> platforms.
7876
</h2>
7977
<a href="https://docs.ascella.host/signup">
80-
<button data-aos="fade-up" class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-full duration-150"
78+
<button
79+
data-aos="fade-up"
80+
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-full duration-150"
8181
>Get started</button
8282
>
8383
</a>
8484
</div>
85-
{#if stats.total_users}
85+
{#await stats}
86+
<Stats />
87+
{:then stats}
88+
<Stats {stats} />
89+
{:catch err}
8690
<div class="flex md:flex-row flex-col justify-center gap-4 md:p-10 p-4">
8791
<div
8892
class="p-8 bg-slate-800 rounded-lg text-white text-center lg:px-40 md:px-16 px-10"
8993
data-aos="fade-up"
9094
>
91-
<p><b class="cursor-default">Users</b></p>
92-
<p class="p-1 cursor-default">{stats.total_users}</p>
93-
</div>
94-
<div
95-
class="p-8 bg-slate-800 rounded-lg text-white text-center lg:px-40 md:px-16 px-10"
96-
data-aos="fade-up"
97-
>
98-
<p><b class="cursor-default">Uploads</b></p>
99-
<p class="p-1 cursor-default">{stats.total_uploads}</p>
100-
</div>
101-
<div
102-
class="p-8 bg-slate-800 rounded-lg text-white text-center lg:px-40 md:px-16 px-10"
103-
data-aos="fade-up"
104-
>
105-
<p><b class="cursor-default">Domains</b></p>
106-
<p class="p-1 cursor-default">{stats.total_domains}</p>
95+
<p><b class="cursor-default">Failed to load stats</b></p>
96+
<p class="p-1 cursor-default">{err}</p>
10797
</div>
10898
</div>
109-
{/if}
99+
{/await}
110100
<div>
111101
{#each features as feature, index}
112102
<div
@@ -151,9 +141,9 @@
151141
src={`${review.avatar}`}
152142
alt={review.name}
153143
on:error={(event) => {
154-
//@ts-ignore -
144+
//@ts-ignore -
155145
event.target.src = 'https://cdn.discordapp.com/embed/avatars/5.png';
156-
//@ts-ignore -
146+
//@ts-ignore -
157147
event.onerror = null;
158148
}}
159149
/>

0 commit comments

Comments
 (0)