diff options
Diffstat (limited to 'src/js/ui/sections')
-rw-r--r-- | src/js/ui/sections/aboutSection.js | 54 | ||||
-rw-r--r-- | src/js/ui/sections/akNodeInfoSection.js | 40 | ||||
-rw-r--r-- | src/js/ui/sections/chatSection.js | 34 | ||||
-rw-r--r-- | src/js/ui/sections/commentsSection.js | 38 | ||||
-rw-r--r-- | src/js/ui/sections/filesSection.js | 41 | ||||
-rw-r--r-- | src/js/ui/sections/mixtapesSection.js | 38 | ||||
-rw-r--r-- | src/js/ui/sections/myPageSection.js | 54 | ||||
-rw-r--r-- | src/js/ui/sections/newsSection.js | 40 | ||||
-rw-r--r-- | src/js/ui/sections/notFoundSection.js | 47 | ||||
-rw-r--r-- | src/js/ui/sections/radioSection.js | 203 | ||||
-rw-r--r-- | src/js/ui/sections/settingsSection.js | 55 | ||||
-rw-r--r-- | src/js/ui/sections/statsSection.js | 51 | ||||
-rw-r--r-- | src/js/ui/sections/stellarBalancesSection.js | 41 | ||||
-rw-r--r-- | src/js/ui/sections/stellarDataConfigSection.js | 40 | ||||
-rw-r--r-- | src/js/ui/sections/stellarSection.js | 32 | ||||
-rw-r--r-- | src/js/ui/sections/welcomeSection.js | 214 | ||||
-rw-r--r-- | src/js/ui/sections/zchainDataSection.js | 40 |
17 files changed, 1062 insertions, 0 deletions
diff --git a/src/js/ui/sections/aboutSection.js b/src/js/ui/sections/aboutSection.js new file mode 100644 index 0000000..6a01c44 --- /dev/null +++ b/src/js/ui/sections/aboutSection.js @@ -0,0 +1,54 @@ +// Arching Kaos About Section +// +// Kaotisk Hund - 2024 +// +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0 +// + +import { makeElement } from "../../arching-kaos-generator.js"; + +export function aboutSection() +{ + var whereAmI = { + element: "div", + className: "where-am-i", + innerHTML: [ + { element: "img", src:"./img/logo.png", onclick:"menusel({id:'#/welcome-section'})"}, + { element: "span", innerText:">"}, + { element: "h2", innerText:"About"} + ] + }; + + var content = { + element: "div", + className: "content", + innerHTML: [ + { element: "p", innerText:"Arching Kaos is a project about radio, music, communications and decentralization."}, + { element: "p", innerText:'On site, you can listen to the latest mixes of music (menu entry "Mixtapes"), read latest news ("News") of the network and chat (you guessed it, "Chat" menu entry).'}, + { element: "p", innerText:'You can see the zchains appearing in "zchain" and logs of the process on "Logs"'}, + { element: "p", innerText:"Note that to participate you will need to set up your Arching Kaos set, which is not so convinient yet but possible."}, + { element: "p", innerText:"Furthermore, if you are using Freighter extension you can additionally see:"}, + { element: "ol", innerHTML: [ + { element:"li", innerText:"Your balances on your wallet"}, + { element:"li", innerText:"Your configuration IPNS address (if any)"}, + { element:"li", innerText:"Your Arching Kaos configuration (if any)"}, + { element:"li", innerText:"Your zchain (...)"}, + { element:"li", innerText:"Your posted newsfeed (...)"} + ]}, + { element:"p", innerText:"Finally, on the stats page you can find people that are participating over the Stellar Network, using the ARCHINGKAOS token/asset/coin."} + ] + }; + + var aboutSection = { + element: "div", + hidden: true, + id:"about-section", + innerHTML: [ + whereAmI, + content + ] + }; + + makeElement(aboutSection, document.querySelector('.main')); +} +// @license-end diff --git a/src/js/ui/sections/akNodeInfoSection.js b/src/js/ui/sections/akNodeInfoSection.js new file mode 100644 index 0000000..63f2a0a --- /dev/null +++ b/src/js/ui/sections/akNodeInfoSection.js @@ -0,0 +1,40 @@ +// Arching Kaos Node Info Section +// +// Kaotisk Hund - 2024 +// +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0 +// +// +import { makeElement } from "../../arching-kaos-generator.js"; + +export function akNodeInfoSection() +{ + var whereAmI = { + element: "div", + className: "where-am-i", + innerHTML: [ + { element: "img", src:"./img/logo.png", onclick:"menusel({id:'#/welcome-section'})"}, + { element: "span", innerText:">"}, + { element: "h2", innerText:"Stellar"}, + { element: "span", innerText:">"}, + { element: "h2", innerText:"Node Info" } + ] + }; + var content = { + element: "div", + className: "content", + innerHTML: [ + { element: "em", id:"node-info-not-found", innerText:"No data found (yet?)!"} + ] + }; + var akNodeInfoSection = { + element: "div", + id: "arching-kaos-node-info", + innerHTML: [ + whereAmI, + content + ] + }; + makeElement(akNodeInfoSection, document.querySelector('.main')); +} +// @license-end diff --git a/src/js/ui/sections/chatSection.js b/src/js/ui/sections/chatSection.js new file mode 100644 index 0000000..b6d2ce3 --- /dev/null +++ b/src/js/ui/sections/chatSection.js @@ -0,0 +1,34 @@ +// Arching Kaos Chat Section +// +// Kaotisk Hund - 2024 +// +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0 +// + +import { makeElement } from "../../arching-kaos-generator.js"; + +export function chatSection() +{ + var chatSection = { + element: 'div', + id:"chat-section", + style:"height: 100%;", + innerHTML: [ + { + element: 'button', + style:"position: fixed;", + onclick:"refreshChat()", + innerText:"Refresh" + }, + { + element: 'iframe', + id: "chat-iframe", + src: "https://irc.arching-kaos.net", + style: "width: 100%; height: 100%;" + } + ] + }; + + makeElement(chatSection, document.querySelector('.main')); +} +// @license-end diff --git a/src/js/ui/sections/commentsSection.js b/src/js/ui/sections/commentsSection.js new file mode 100644 index 0000000..a0ee7ad --- /dev/null +++ b/src/js/ui/sections/commentsSection.js @@ -0,0 +1,38 @@ +// Arching Kaos Comments Section +// +// Kaotisk Hund - 2024 +// +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0 +// + +import { makeElement } from "../../arching-kaos-generator.js"; + +export function commentsSection() +{ + var whereAmI = { + element: "div", + className: "where-am-i", + innerHTML: [ + { element: "img", src:"./img/logo.png", onclick:"menusel({id:'#/welcome-section'})"}, + { element: "span", innerText:">"}, + { element: "h2", innerText:"Comments"} + ] + }; + var content = { + element: "div", + className: "content", + innerHTML: [ + { element: "em", id:"comments-sec-not-found", innerText: "No data found (yet?)!"} + ] + }; + var commentsSection = { + element: 'div', + id: 'comments-section', + innerHTML: [ + whereAmI, + content + ] + }; + makeElement(commentsSection, document.querySelector('.main')); +} +// @license-end diff --git a/src/js/ui/sections/filesSection.js b/src/js/ui/sections/filesSection.js new file mode 100644 index 0000000..a8147dc --- /dev/null +++ b/src/js/ui/sections/filesSection.js @@ -0,0 +1,41 @@ +// Arching Kaos Files Section +// +// Kaotisk Hund - 2024 +// +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0 +// + +import { makeElement } from "../../arching-kaos-generator.js"; + +export function filesSection() +{ + var whereAmI = { + element: "div", + className: "where-am-i", + innerHTML: [ + { element: "img", src:"./img/logo.png", onclick:"menusel({id:'#/welcome-section'})"}, + { element: "span", innerText:">"}, + { element: "h2", innerText:"Modules"}, + { element: "span", innerText:">"}, + { element: "h2", innerText:"Files"} + ] + }; + var content = { + element: "div", + className: "content", + innerHTML: [ + { element: "em", id:"files-sec-not-found", innerText: "No data found (yet?)!"} + ] + }; + var filesSection = { + element: 'div', + id: "files-section", + innerHTML: [ + whereAmI, + content + ] + }; + + makeElement(filesSection, document.querySelector('.main')); +} +// @license-end diff --git a/src/js/ui/sections/mixtapesSection.js b/src/js/ui/sections/mixtapesSection.js new file mode 100644 index 0000000..4848f78 --- /dev/null +++ b/src/js/ui/sections/mixtapesSection.js @@ -0,0 +1,38 @@ +// Arching Kaos Mixtapes Section +// +// Kaotisk Hund - 2024 +// +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0 +// + +import { makeElement } from "../../arching-kaos-generator.js"; + +export function mixtapesSection() +{ + var whereAmI = { + element: "div", + className: "where-am-i", + innerHTML: [ + { element: "img", src:"./img/logo.png", onclick:"menusel({id:'#/welcome-section'})"}, + { element: "span", innerText:">"}, + { element: "h2", innerText:"Mixtapes"} + ] + }; + var content = { + element: "div", + className: "content", + innerHTML: [ + { element: "em", id:"mixtapes-sec-not-found", innerText:"No data found (yet?)!"} + ] + }; + var mixtapesSection = { + element: "div", + id: "mixtapes-section", + innerHTML: [ + whereAmI, + content + ] + }; + makeElement(mixtapesSection, document.querySelector('.main')); +} +// @license-end diff --git a/src/js/ui/sections/myPageSection.js b/src/js/ui/sections/myPageSection.js new file mode 100644 index 0000000..5dbd2ab --- /dev/null +++ b/src/js/ui/sections/myPageSection.js @@ -0,0 +1,54 @@ +// Arching Kaos My Page Section +// +// Kaotisk Hund - 2024 +// +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0 +// + +import { makeElement } from "../../arching-kaos-generator.js"; + +export function myPageSection() +{ + var whereAmI = { + element: "div", + className: "where-am-i", + innerHTML: [ + { element: "img", src:"./img/logo.png", onclick:"menusel({id:'#/welcome-section'})"}, + { element: "span", innerText:">"}, + { element: "h2", innerText:"Stellar"}, + { element: "span", innerText:">"}, + { element: "h2", innerText: "My Page" } + ] + }; + var content = { + element: "div", + className: "content", + innerHTML: [ + { element: "h2", innerText: "My page" }, + { element: "button", id: "stellar-freigher-connect-address-button", onclick:"connect()", innerText:"Connect with Freighter wallet" }, + { element: "div", id:"my-news", innerHTML:[ + { element: "h3", innerText:"My news"}, + { element: "em", id:"my-news-sec-not-found", innerText:"No data found (yet?)!" } + ]}, + { element: "div", id:"my-mixtapes", innerHTML:[ + { element: "h3", innerText:"My mixtapes"}, + { element: "em", id:"my-mixtapes-sec-not-found", innerText:"No data found (yet?)!" } + ]}, + { element: "div", id:"my-zchain", innerHTML:[ + { element: "h3", innerText:"My zchain"}, + { element: "em", id:"my-zchain-sec-not-found", innerText:"No data found (yet?)!" } + ]} + ] + }; + var myPageSection = { + element: "div", + id: "mypage-section", + innerHTML: [ + whereAmI, + content + ] + }; + + makeElement(myPageSection, document.querySelector('.main')); +} +// @license-end diff --git a/src/js/ui/sections/newsSection.js b/src/js/ui/sections/newsSection.js new file mode 100644 index 0000000..983a031 --- /dev/null +++ b/src/js/ui/sections/newsSection.js @@ -0,0 +1,40 @@ +// Arching Kaos News Section +// +// Kaotisk Hund - 2024 +// +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0 +// + +import { makeElement } from "../../arching-kaos-generator.js"; + +export function newsSection() +{ + var whereAmI = { + element: "div", + className: "where-am-i", + innerHTML: [ + { element: "img", src:"./img/logo.png", onclick:"menusel({id:'#/welcome-section'})"}, + { element: "span", innerText:">"}, + { element: "h2", innerText:"Modules"}, + { element: "span", innerText:">"}, + { element: "h2", innerText:"News"} + ] + }; + var content = { + element: "div", + className: "content", + innerHTML: [ + { element: "em", id:"news-sec-not-found", innerText: "No data found (yet?)!"} + ] + }; + var newsSection = { + element: 'div', + id: 'news-section', + innerHTML: [ + whereAmI, + content + ] + }; + makeElement(newsSection, document.querySelector('.main')); +} +// @license-end diff --git a/src/js/ui/sections/notFoundSection.js b/src/js/ui/sections/notFoundSection.js new file mode 100644 index 0000000..46fc421 --- /dev/null +++ b/src/js/ui/sections/notFoundSection.js @@ -0,0 +1,47 @@ +// Arching Kaos Not Found Section +// +// Kaotisk Hund - 2024 +// +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0 +// + +import { makeElement } from "../../arching-kaos-generator.js"; + +export function notFoundSection() +{ + var whereAmI = { + element: "div", + className: "where-am-i", + innerHTML: [ + { element: "img", src:"./img/logo.png", onclick:"menusel({id:'#/welcome-section'})"}, + { element: "span", innerText:">"}, + { element: "h2", innerText:"Not found"} + ] + }; + var content = { + element: "div", + className: "content", + innerHTML: [ + { + element: 'p', + innerText: 'Soft 404' + }, + { + element: 'p', + innerText: 'Please select an entry from the menu' + } + ] + }; + var notFoundSection = { + element: 'div', + id: 'not-found-section', + hidden: true, + innerHTML: [ + whereAmI, + content + ] + }; + + makeElement(notFoundSection, document.querySelector('.main')); +} +// @license-end diff --git a/src/js/ui/sections/radioSection.js b/src/js/ui/sections/radioSection.js new file mode 100644 index 0000000..0cc131f --- /dev/null +++ b/src/js/ui/sections/radioSection.js @@ -0,0 +1,203 @@ +// Arching Kaos Radio Section +// +// Kaotisk Hund - 2024 +// +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0 +// + +import { makeElement } from "../../arching-kaos-generator.js"; +import { start_radio, sync_radio } from "../../radio-emulator.js"; + +window.start_radio = start_radio; +window.sync_radio = sync_radio; + +export function radioSection() +{ + var whereAmI = { + element: "div", + className: "where-am-i", + innerHTML: [ + { element: "img", src:"./img/logo.png", onclick:"menusel({id:'#/welcome-section'})"}, + { element: "span", innerText:">"}, + { element: "h2", innerText:"Radio"} + ] + }; + var radioContent = { + element:"div", + id: "radio-main", + innerHTML:[ + {element:"div",className:"start-top",innerHTML:[ + {element:"div",className:"div-groups",style:"flex-grow:1;",innerHTML:[ + {element:"div",className:"now-playing-details",innerHTML:[ + {element:"div",className:"div-groups-row",innerHTML:[ + {element:"img", className:"generated"}, + {element:"table", innerHTML:[ + {element:"tr",innerHTML:[ + {element:"th", innerText:"Artist"}, + {element:"td", className:"artist"} + ]}, + {element:"tr",innerHTML:[ + {element:"th", innerText:"Title"}, + {element:"td", className:"title"} + ]}, + {element:"tr",innerHTML:[ + {element:"th", innerText:"Starts On (ms)"}, + {element:"td", className:"starts-on"} + ]}, + {element:"tr",innerHTML:[ + {element:"th", innerText:"Duration"}, + {element:"td",className:"show-duration"} + ]} + ]} + ]} + ]}, + {element:"div", className:"enhanced-player",innerHTML:[ + {element:"div", className:"radio-player",innerHTML:[ + {element:"audio", id: "radio-player", preload:"auto", controls:true, muted:true} + ]}, + {element:"div", className:"div-row",innerHTML:[ + {element:"button", id:"start-button",innerText:"Start!"}, + {element:"button", id:"sync-button",innerText:"Sync"} + ]} + ]} + ]}, + {element:"div",className:"previously-played"}, + ]}, + {element:"div", className:"more-details", innerHTML:[ + {element:"details",id:"progress-details", innerHTML:[ + {element:"summary", innerText:"Progress details"}, + {element:"div",innerHTML:[ + {element:"p", innerText:"Download progress:"}, + {element:"progress",className:"dl-progress", max:"100"} + ]}, + {element:"div",innerHTML:[ + {element:"p", innerText:"Live progress:"}, + {element:"progress",className:"play-progress"} + ]}, + {element:"div", className:"div-inline",innerHTML:[ + {element:"div", className:"div-inline",innerHTML:[ + {element:"p", innerText:"Listening at:"}, + {element:"p", className:"listening-at"}, + ]}, + {element:"div", className:"div-inline",innerHTML:[ + {element:"p", innerText:"Show playback:"}, + {element:"div", className:"no-break",innerHTML:[ + {element:"p", className:"relative-time"}, + {element:"p", innerText:"/"}, + {element:"p", className:"show-duration"} + ]} + ]} + ]} + ]}, + {element:"details",id:"sync-info", innerHTML:[ + {element:"summary", innerText:"Sync info"}, + {element:"div",className:"groups",innerHTML:[ + {element:"h3", innerText:"Timings"}, + {element:"table", innerHTML:[ + {element:"tr",innerHTML:[ + {element:"th", innerText:"Time of visit (ms)"}, + {element:"td", className:"time-of-visit"} + ]}, + {element:"tr",innerHTML:[ + {element:"th", innerText:"Time elapsed since visited (s)"}, + {element:"td", className:"you-are-here"} + ]}, + {element:"tr",innerHTML:[ + {element:"th", innerText:"List started on (ms)"}, + {element:"td", className:"started-on"} + ]}, + {element:"tr",innerHTML:[ + {element:"th", innerText:"List duration (s)"}, + {element:"td",className:"list-duration"} + ]} + ]}, + {element:"h3", innerText:"Calculations"}, + {element:"table", innerHTML:[ + {element:"tr",innerHTML:[ + {element:"th", innerText:"Times Fully Played"}, + {element:"td", className:"min-played"} + ]}, + {element:"tr",innerHTML:[ + {element:"th", innerText:"Times Played"}, + {element:"td", className:"max-played"} + ]}, + {element:"tr",innerHTML:[ + {element:"th", innerText:"Dt = TP - TFP"}, + {element:"td", className:"d-t"} + ]}, + {element:"tr",innerHTML:[ + {element:"th", innerText:"Delta time"}, + {element:"td",className:"delta-time"} + ]}, + {element:"tr",innerHTML:[ + {element:"th", innerText:"Initial \"tune in\" time (s)"}, + {element:"td",className:"current-time"} + ]} + + ]}, + ]} + ]}, + {element:"details",id:"about", innerHTML:[ + {element:"summary",innerText:"Info to get you started"}, + {element:"h2",innerText:"Notice"}, + {element:"p",innerText:"If you are visiting for the first time, you might need to \"Allow Audio\" first. Please do and refresh the page."}, + {element:"h2",innerText:"About"}, + {element:"p",innerText:"This is a \"Radio Station Emulator\". We create lists with shows to be played, but since we are not doing streaming of the playlists, we offer another way of \"tuning in\"."}, + {element:"p",innerText:"Providing the time a list started playing and having pre-calculated the starting timestamps of each show relevant to the list start timestamp, we can calculate which show is on and what its current time of playing is."}, + {element:"p",innerText:"Ultimately, you are hearing what we would be streaming, as you would do for a regular radio station."}, + {element:"h2",innerText:"Steps"}, + {element:"ol",innerHTML:[ + {element:"li",innerText:"First, your browser is going to ask our server here, what is the current list that plays right now. It will get a response and will fetch that list."}, + {element:"li",innerText:"Based on properties of the list overall and the time of visit, your browser will start comparing each show's properties found in the list, to figure the relative time of yours on the list. A progress bar labeled \"Live progress\" will be indicating the correct time on the show."}, + {element:"li",innerText:"Having figured out the show that is playing, it will go and download the whole show. Progress of that would be observable via the \"Download progress\" bar below."}, + {element:"li",innerText:"Upon completion of the download, the \"Sync\" button is auto pressed and the player start playing the show from the calculated second it calculated previously."}, + ]}, + {element:"h2",innerText:"Notes"}, + {element:"ul",innerHTML:[ + {element:"li",innerText:"Sometimes, you might need to press the \"Sync\" button more than once. That's mostly due to bandwidth capabilities of both the server and the client. The \"tune\" would be right if you press it multiple times and land near the same timespace over and over."}, + {element:"li",innerText:"Ideally, if \"Listening at:\" and \"Show playback:\" havea the same value then you are in sync!"} + ]} + ]}, + {element:"details",id:"data", innerHTML:[ + {element:"summary", innerText:"Data segments"}, + {element:"h3",innerText:"Hash of list"}, + {element:"pre", className:"list-hash"}, + {element:"h3",innerText:"List info (JSON)"}, + {element:"pre", className:"list-info"}, + {element:"h3",innerText:"Hash of current show"}, + {element:"pre", className:"current-show-hash"}, + {element:"h3",innerText:"Show info (JSON)"}, + {element:"pre", className:"show-info"}, + {element:"div", innerHTML:[ + {element:"a", href:"./data.html", target:"_blank",innerText:"Data"} + ]} + ]} + ]} + ] + }; + var content = { + element: "div", + className: "content", + innerHTML: [ + radioContent + ] + }; + var radioSection = { + element: "div", + id: 'radio-section', + hidden: true, + style: 'height: 100%;', + innerHTML: [ + whereAmI, + content + ] + }; + makeElement(radioSection, document.querySelector('.main')); + document.querySelector("#start-button").addEventListener("click",()=>{ + start_radio(); + document.querySelector("#start-button").remove(); + }); + document.querySelector("#sync-button").addEventListener("click",()=>{sync_radio();}); +} + +// @license-end diff --git a/src/js/ui/sections/settingsSection.js b/src/js/ui/sections/settingsSection.js new file mode 100644 index 0000000..8d8be0f --- /dev/null +++ b/src/js/ui/sections/settingsSection.js @@ -0,0 +1,55 @@ +// Arching Kaos Settings Section +// +// Kaotisk Hund - 2024 +// +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0 +// + +import { makeElement } from "../../arching-kaos-generator.js"; +import { getSettings, showSettings } from "../../arching-kaos-web-ui-settings.js"; +import { debugLog } from "../../utils.js"; + +var settings = getSettings(); +debugLog(settings); + +export function settingsSection() +{ + var whereAmI = { + element: "div", + className:"where-am-i", + innerHTML:[ + {element: "img", src:"./img/logo.png", onclick: "menusel({id:'#/welcome-section'})"}, + {element: "span", innerText:">"}, + {element: "h2", innerText:"🔧 Settings"} + ] + }; + var settingsSection = { + element: 'div', + id: "settings-section", + innerHTML: [ + whereAmI + ] + }; + + makeElement(settingsSection, document.querySelector('.main')); + showSettings(); +} + +export function getSettingsPage() +{ + return document.querySelector('#settings-section'); +} + +// var server = new StellarSdk.Server(settings.stellar.horizon.list[settings.stellar.horizon.active], {allowHttp:true}); + +// if ( getSettings().stellar.scan ) +// { +// scanStellarNetworkForPeers(); +// } +// +// if ( getSettings().ak.scan ) +// { +// ringlocalbell(); +// setInterval(ringlocalbell, 10*60*1000); +// } +// @license-end diff --git a/src/js/ui/sections/statsSection.js b/src/js/ui/sections/statsSection.js new file mode 100644 index 0000000..c88bfe5 --- /dev/null +++ b/src/js/ui/sections/statsSection.js @@ -0,0 +1,51 @@ +// Arching Kaos Stellar Balances Section +// +// Kaotisk Hund - 2024 +// +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0 +// + +import { makeElement } from "../../arching-kaos-generator.js"; + +export function statsSection() +{ + var whereAmI = { + element: "div", + className: "where-am-i", + innerHTML: [ + { element: "img", src:"./img/logo.png", onclick:"menusel({id:'#/welcome-section'})"}, + { element: "span", innerText:">"}, + { element: "h2", innerText:"Explore"}, + { element: "span", innerText:">"}, + { element: "h2", innerText:"Stats"} + ] + }; + var content = { + element : "div", + className: "content", + innerHTML: [ + { element: "div", className: "available-networks", innerHTML: [ + { element: "h3", innerText: "Networks" }, + { element: "details", className: "stellar-network", innerHTML:[ + { element:"summary", innerText:"Stellar"} + ]}, + { element: "details", className: "aknet-network", innerHTML:[ + { element:"summary", innerText:"Arching Kaos Experimental Instance"} + ]}, + { element: "details", className: "aknet-sblocks", innerHTML:[ + { element:"summary", innerText:"Arching Kaos SBlocks"} + ]} + ]} + ] + }; + var statsSection = { + element: 'div', + id: "stats-section", + innerHTML: [ + whereAmI, + content + ] + }; + makeElement(statsSection, document.querySelector('.main')); +} +// @license-end diff --git a/src/js/ui/sections/stellarBalancesSection.js b/src/js/ui/sections/stellarBalancesSection.js new file mode 100644 index 0000000..fd07dde --- /dev/null +++ b/src/js/ui/sections/stellarBalancesSection.js @@ -0,0 +1,41 @@ +// Arching Kaos Stellar Balances Section +// +// Kaotisk Hund - 2024 +// +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0 +// + +import { makeElement } from "../../arching-kaos-generator.js"; + +export function stellarBalancesSection() +{ + var whereAmI = { + element: "div", + className: "where-am-i", + innerHTML: [ + { element: "img", src:"./img/logo.png", onclick:"menusel({id:'#/welcome-section'})"}, + { element: "span", innerText:">"}, + { element: "h2", innerText:"Stellar"}, + { element: "span", innerText:">"}, + { element: "h2", innerText: "Balances" } + ] + }; + var content = { + element: "div", + className: "content", + innerHTML: [ + { element: "em", id: "stellar-balances-not-found", innerText: "No data found (yet?)!" }, + { element: "table", id:"stellar-balances-table" } + ] + }; + var stellarBalancesSection = { + element: "div", + id: "stellar-balances", + innerHTML: [ + whereAmI, + content + ] + }; + makeElement(stellarBalancesSection, document.querySelector('.main')); +} +// @license-end diff --git a/src/js/ui/sections/stellarDataConfigSection.js b/src/js/ui/sections/stellarDataConfigSection.js new file mode 100644 index 0000000..a7816a1 --- /dev/null +++ b/src/js/ui/sections/stellarDataConfigSection.js @@ -0,0 +1,40 @@ +// Arching Kaos Stellar Data Config Section +// +// Kaotisk Hund - 2024 +// +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0 +// + +import { makeElement } from "../../arching-kaos-generator.js"; + +export function stellarDataConfigSection() +{ + var whereAmI = { + element: "div", + className: "where-am-i", + innerHTML: [ + { element: "img", src:"./img/logo.png", onclick:"menusel({id:'#/welcome-section'})"}, + { element: "span", innerText:">"}, + { element: "h2", innerText:"Stellar"}, + { element: "span", innerText:">"}, + { element: "h2", innerText:"Data"} + ] + }; + var content = { + element: "div", + className: "content", + innerHTML: [ + { element: "em", id:"stellar-data-config-not-found", innerText:"No data found (yet?)!" } + ] + }; + var stellarDataConfigSection = { + element: "div", + id: "stellar-data-config", + innerHTML: [ + whereAmI, + content + ] + }; + makeElement(stellarDataConfigSection, document.querySelector('.main')); +} +// @license-end diff --gi |