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": "", "image": "",
"location": "https://my.website", "location": "https://my.website",
"resource_groups": { "resource_groups": {
"Link group 1": [{ "Website Content": [{
"label": "RSS Feed", "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": "", "icon": "",
"location": "https://my.website.com/rss.xml", "location": "https://libresolutions.network/articles/7-interverse.html",
"description": "" "description": ""
}], },
"Website content": [{ {
"label": "Articles", "label": "Demo video",
"icon": "https://libresolutions.network/logo.png", "icon": "",
"location": "https:libresolutions.network/articles/", "location": "https://storage.libresolutions.network/Videos/interverse-demo-01.mp4",
"description": "" "description": ""
}] },
{
"label": "Code",
"icon": "",
"location": "https://codeberg.org/gabe/Interverse",
"description": "Get started today!"
}
]
}, },
"resources": [], "resources": [],
"connection_groups": { "connection_groups": {
"Group1": [ "Libre Solutions Network": [
"https://libresolutions.network" "https://libresolutions.network",
"https://gabe.rocks"
], ],
"Group2": ["https://retroedge.tech"], "Known Interverse": [
"Group3": ["https://small-web.org"] "https://jamespearson.xyz",
"https://tomfasano.net"
]
}, },
"connections": [ "connections": [],
"https://gabe.rocks",
"https://codeberg.org"
],
"contact": { "contact": {
"e-mail": "contact@https://my.website", "e-mail": "contact@https://my.website",
"matrix": "@me:https://my.website", "matrix": "@me:https://my.website",

View file

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

View file

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

View file

@ -1,30 +1,58 @@
{ {
"version": 0.1, "version": 0.1,
"name": "My website", "name": "My website",
"image":"", "image": "",
"location": "https://my.website", "location": "https://my.website",
"resources": [ "resource_groups": {
{ "Website Content": [{
"label": "RSS Feed", "label": "RSS Feed",
"icon": "", "icon": "https://upload.wikimedia.org/wikipedia/commons/d/d9/Rss-feed.svg",
"location": "https://my.website.com/rss.xml", "location": "https://my.website/rss.xml",
"description": "Stay up to date!" "description": ""
},
{
"label": "Videos",
"icon": "https://upload.wikimedia.org/wikipedia/commons/3/32/Video_icon_2.png",
"location": "https://my.website/videos",
"description": ""
} }
], ],
"connection_groups":{ "Interverse Info": [{
"Group1":[ "label": "An introduction to Interverse",
"https://libresolutions.network" "icon": "",
], "location": "https://libresolutions.network/articles/7-interverse.html",
"Group2":["https://retroedge.tech"], "description": ""
"Group3":["https://small-web.org"]
}, },
"connections": [ {
"https://gabe.rocks", "label": "Demo video",
"https://codeberg.org" "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": { "contact": {
"e-mail": "contact@my.website", "e-mail": "contact@https://my.website",
"matrix": "@me:https://my.website", "matrix": "@me:https://my.website",
"fediverse": "@me@mastodon.social" "fediverse": "@me@mastodon.social"
} }
} }