finish up the atom news feed API
This commit is contained in:
@@ -1,43 +1,43 @@
|
||||
export async function load({ fetch }) {
|
||||
const api = import.meta.env.VITE_API_URL_DEV
|
||||
const res = await fetch(api+"/services/all")
|
||||
const data = await res.json()
|
||||
const api = import.meta.env.VITE_API_URL_DEV;
|
||||
const res = await fetch(api + "/services/all");
|
||||
const data = await res.json();
|
||||
|
||||
if (data["error"] != ""){
|
||||
if (data["error"] != "") {
|
||||
return {
|
||||
error: data["error"]
|
||||
}
|
||||
error: data["error"],
|
||||
};
|
||||
}
|
||||
|
||||
// Some really bad code to convert
|
||||
// [service1, service2, service3...]
|
||||
// Some really bad code to convert
|
||||
// [service1, service2, service3...]
|
||||
|
||||
// to
|
||||
// to
|
||||
|
||||
// [[service1, service2], [service4, service5], [service4...]...]
|
||||
// so i can render it in the UI easily
|
||||
|
||||
let all = data["result"]
|
||||
let counter = 0
|
||||
let currentlist = []
|
||||
let services = []
|
||||
let all = data["result"];
|
||||
let counter = 0;
|
||||
let currentlist = [];
|
||||
let services = [];
|
||||
|
||||
for (let i = 0; i < all.length; i++){
|
||||
currentlist.push(all[i])
|
||||
counter += 1
|
||||
for (let i = 0; i < all.length; i++) {
|
||||
currentlist.push(all[i]);
|
||||
counter += 1;
|
||||
|
||||
if(i == all.length-1 && counter != 2){
|
||||
services.push(currentlist)
|
||||
if (i == all.length - 1 && counter != 2) {
|
||||
services.push(currentlist);
|
||||
}
|
||||
|
||||
if (counter == 2) {
|
||||
services.push(currentlist)
|
||||
currentlist = []
|
||||
counter = 0
|
||||
services.push(currentlist);
|
||||
currentlist = [];
|
||||
counter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
services
|
||||
}
|
||||
services,
|
||||
};
|
||||
}
|
||||
|
@@ -3,11 +3,11 @@
|
||||
import Service from "../../lib/service.svelte";
|
||||
import Card from "../../lib/card.svelte";
|
||||
|
||||
export let data
|
||||
export let data;
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>[ngn.tf] | services</title>
|
||||
<title>[ngn.tf] | services</title>
|
||||
<meta content="[ngn] | services" property="og:title" />
|
||||
<meta content="Stuff that I host" property="og:description" />
|
||||
<meta content="https://ngn.tf" property="og:url" />
|
||||
@@ -16,85 +16,86 @@
|
||||
<Header><c>ls</c> services</Header>
|
||||
<main>
|
||||
<Card title="cat services/*/info.txt">
|
||||
<div class="flexcol">
|
||||
{#each data.services as services_list}
|
||||
<div class="flexrow">
|
||||
{#each services_list as service}
|
||||
<Service url="{service.url}" desc="{service.desc}">{service.name}</Service>
|
||||
{/each}
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
<div class="flexcol">
|
||||
{#each data.services as services_list}
|
||||
<div class="flexrow">
|
||||
{#each services_list as service}
|
||||
<Service url={service.url} desc={service.desc}>{service.name}</Service>
|
||||
{/each}
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
<Card title="cat services/details.txt">
|
||||
Here some details for all the services I offer:
|
||||
<ul>
|
||||
<li>
|
||||
<c><i class="nf nf-cod-account"></i> Registration:</c> All the services are offered for free, and all of them
|
||||
are accessiable to public. And registrations are open for the all services that support account registrations.
|
||||
<c><i class="nf nf-cod-account"></i> Registration:</c> All the services are offered for free,
|
||||
and all of them are accessiable to public. And registrations are open for the all services that
|
||||
support account registrations.
|
||||
</li>
|
||||
<li>
|
||||
<c><i class="nf nf-fa-eye_slash"></i> Privacy:</c> To protect user privacy, all the web proxy logs are cleared regularly.
|
||||
I also do not use any kind of CDN, and provide SSL encrypted connection for all the services. You can also connect all the
|
||||
services over TOR, as I do not block any traffic from TOR.
|
||||
<c><i class="nf nf-fa-eye_slash"></i> Privacy:</c> To protect user privacy, all the web proxy
|
||||
logs are cleared regularly. I also do not use any kind of CDN, and provide SSL encrypted connection
|
||||
for all the services. You can also connect all the services over TOR, as I do not block any traffic
|
||||
from TOR.
|
||||
</li>
|
||||
<li>
|
||||
<c><i class="nf nf-oct-graph"></i> Uptime:</c> Some services get restarted regularly, also sometimes I have
|
||||
issues with the hosting, so I cannot provide or guarantee %100 uptime for any of the services. I also cannot guarantee
|
||||
the that there won't be any data loss. I do take any regular backups, but your data may be lost in case of something
|
||||
like a SSD failure.
|
||||
<c><i class="nf nf-oct-graph"></i> Uptime:</c> Some services get restarted regularly, also sometimes
|
||||
I have issues with the hosting, so I cannot provide or guarantee %100 uptime for any of the services.
|
||||
I also cannot guarantee the that there won't be any data loss. I do take any regular backups,
|
||||
but your data may be lost in case of something like a SSD failure.
|
||||
</li>
|
||||
<li>
|
||||
<c><i class="nf nf-md-speedometer"></i> Speed:</c> All the services are located in Turkey, and avaliable
|
||||
over an 400 Mbit/s interface. If you are close to Turkey you should have a fairly good experience.
|
||||
If you are not, then you should probably use another provider for the service.
|
||||
<c><i class="nf nf-md-speedometer"></i> Speed:</c> All the services are located in Turkey, and
|
||||
avaliable over an 400 Mbit/s interface. If you are close to Turkey you should have a fairly good
|
||||
experience. If you are not, then you should probably use another provider for the service.
|
||||
</li>
|
||||
</ul>
|
||||
</Card>
|
||||
|
||||
</main>
|
||||
|
||||
<style>
|
||||
main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
padding: 50px;
|
||||
gap: 28px;
|
||||
}
|
||||
|
||||
.flexcol {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
gap: 13px;
|
||||
}
|
||||
|
||||
.flexrow {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
gap: 13px;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: inside;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
li {
|
||||
padding-top: 30px;
|
||||
line-height: 35px;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1316px) {
|
||||
.flexrow {
|
||||
main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
padding: 50px;
|
||||
gap: 28px;
|
||||
}
|
||||
|
||||
.flexcol {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
gap: 13px;
|
||||
}
|
||||
|
||||
.flexrow {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
gap: 13px;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: inside;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
li {
|
||||
padding-top: 30px;
|
||||
line-height: 35px;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1316px) {
|
||||
.flexrow {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user