Updated default interverse file

Updated overall look-and-feel
Cache is now ignored.
This commit is contained in:
Gabriel 2022-05-18 04:30:31 -04:00
parent a9e7bcb26a
commit a74f611e1d
4 changed files with 126 additions and 54 deletions

View file

@ -4,31 +4,52 @@
"image": "",
"location": "https://my.website",
"resource_groups": {
"Link group 1": [{
"Website Content": [{
"label": "RSS Feed",
"icon": "https://upload.wikimedia.org/wikipedia/commons/d/d9/Rss-feed.svg",
"location": "https://my.website/rss.xml",
"description": ""
},
{
"label": "Videos",
"icon": "https://upload.wikimedia.org/wikipedia/commons/3/32/Video_icon_2.png",
"location": "https://my.website/videos",
"description": ""
}
],
"Interverse Info": [{
"label": "An introduction to Interverse",
"icon": "",
"location": "https://my.website.com/rss.xml",
"location": "https://libresolutions.network/articles/7-interverse.html",
"description": ""
}],
"Website content": [{
"label": "Articles",
"icon": "https://libresolutions.network/logo.png",
"location": "https:libresolutions.network/articles/",
},
{
"label": "Demo video",
"icon": "",
"location": "https://storage.libresolutions.network/Videos/interverse-demo-01.mp4",
"description": ""
}]
},
{
"label": "Code",
"icon": "",
"location": "https://codeberg.org/gabe/Interverse",
"description": "Get started today!"
}
]
},
"resources": [],
"connection_groups": {
"Group1": [
"https://libresolutions.network"
"Libre Solutions Network": [
"https://libresolutions.network",
"https://gabe.rocks"
],
"Group2": ["https://retroedge.tech"],
"Group3": ["https://small-web.org"]
"Known Interverse": [
"https://jamespearson.xyz",
"https://tomfasano.net"
]
},
"connections": [
"https://gabe.rocks",
"https://codeberg.org"
],
"connections": [],
"contact": {
"e-mail": "contact@https://my.website",
"matrix": "@me:https://my.website",

View file

@ -15,6 +15,8 @@
<img x-bind:src="Alpine.store('data')['image']">
<div id="interverse-contact">
<h1 x-text="Alpine.store('data')['name']"></h1>
<a x-bind:href="Alpine.store('data')['location']" x-text="Alpine.store('data')['location']"></a>
<template x-for="key in Object.keys(Alpine.store('data')['contact'])">
<p>
<strong x-text="key"></strong>
@ -118,13 +120,15 @@
</div>
<script>
var main_url = "/.well-known/interverse";
var t = new Date();
var timestamp = t.getTime();
var main_url = "/.well-known/interverse?t=" + timestamp;
if (getUrlParameter('s') && getUrlParameter("url")) {
var uri = "";
main_url = getUrlParameter('s') + "://" + getUrlParameter("url") + '/.well-known/interverse';
main_url = getUrlParameter('s') + "://" + getUrlParameter("url") + '/.well-known/interverse?t=' + timestamp;
} else {
if (getUrlParameter('url')) {
main_url = "https://" + getUrlParameter('url') + '/.well-known/interverse';
main_url = "https://" + getUrlParameter('url') + '/.well-known/interverse?t=' + timestamp;
}
}
document.addEventListener('alpine:init', function() {
@ -143,8 +147,10 @@
connections.push(data['connection_groups'][group][link]);
}
}
var t = new Date();
var timestamp = t.getTime();
for (var i = 0; i < connections.length; i++) {
fetchdata(connections[i] + '/.well-known/interverse', function(e) {
fetchdata(connections[i] + '/.well-known/interverse?t=' + timestamp, function(e) {
try {
dat = JSON.parse(e.target.response);
console.log(dat);

View file

@ -8,6 +8,7 @@ body {
margin: 0;
display: flex;
flex-direction: column;
align-items: center;
font-size: 100%;
}
@ -15,6 +16,13 @@ img {
max-width: 15rem;
}
div {
justify-content: center;
display: flex;
flex-direction: column;
align-items: center;
}
.interverse {
display: flex;
flex-direction: column;
@ -52,6 +60,9 @@ img {
.interverse-resource {
padding: 2rem;
max-width: 15rem;
display: flex;
flex-direction: column;
align-items: center;
}
.interverse-resource-icon {
@ -62,13 +73,20 @@ img {
#interverse-groups {
display: flex;
flex-wrap: wrap;
flex-direction: row;
flex-direction: column;
align-items: center;
}
.interverse-group {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: flex-end;
justify-content: center;
}
h1 {
text-align: center;
}
#interverse-connections {
@ -87,7 +105,6 @@ img {
.interverse-connection {
width: fit-content;
border: 0.15rem solid var(--theme-accent-color);
padding: 1rem;
margin: 0.25rem;
}

View file

@ -3,27 +3,55 @@
"name": "My website",
"image": "",
"location": "https://my.website",
"resources": [
{
"resource_groups": {
"Website Content": [{
"label": "RSS Feed",
"icon": "",
"location": "https://my.website.com/rss.xml",
"description": "Stay up to date!"
"icon": "https://upload.wikimedia.org/wikipedia/commons/d/d9/Rss-feed.svg",
"location": "https://my.website/rss.xml",
"description": ""
},
{
"label": "Videos",
"icon": "https://upload.wikimedia.org/wikipedia/commons/3/32/Video_icon_2.png",
"location": "https://my.website/videos",
"description": ""
}
],
"connection_groups":{
"Group1":[
"https://libresolutions.network"
],
"Group2":["https://retroedge.tech"],
"Group3":["https://small-web.org"]
"Interverse Info": [{
"label": "An introduction to Interverse",
"icon": "",
"location": "https://libresolutions.network/articles/7-interverse.html",
"description": ""
},
"connections": [
"https://gabe.rocks",
"https://codeberg.org"
{
"label": "Demo video",
"icon": "",
"location": "https://storage.libresolutions.network/Videos/interverse-demo-01.mp4",
"description": ""
},
{
"label": "Code",
"icon": "",
"location": "https://codeberg.org/gabe/Interverse",
"description": "Get started today!"
}
]
},
"resources": [],
"connection_groups": {
"Libre Solutions Network": [
"https://libresolutions.network",
"https://gabe.rocks"
],
"Known Interverse": [
"https://jamespearson.xyz",
"https://tomfasano.net"
]
},
"connections": [],
"contact": {
"e-mail": "contact@my.website",
"e-mail": "contact@https://my.website",
"matrix": "@me:https://my.website",
"fediverse": "@me@mastodon.social"
}