From 525427c6919c32a871ddd04e6b20cd57854189f7 Mon Sep 17 00:00:00 2001 From: Dave Lane Date: Wed, 4 Sep 2024 15:53:51 +1200 Subject: [PATCH] adjusting width for mobile devices, created included data arrays --- src/app.css | 4 +- src/{ => lib}/colours.js | 0 src/lib/processData.svelte | 112 ------------- src/lib/references.js | 154 ++++++++++++++++++ src/references.js | 3 - src/routes/+layout.svelte | 4 +- src/routes/+page.svelte | 294 ++++++++++++++-------------------- src/routes/about/+page.svelte | 4 + 8 files changed, 284 insertions(+), 291 deletions(-) rename src/{ => lib}/colours.js (100%) delete mode 100644 src/lib/processData.svelte create mode 100644 src/lib/references.js delete mode 100644 src/references.js diff --git a/src/app.css b/src/app.css index bdd2160..9c00cc4 100644 --- a/src/app.css +++ b/src/app.css @@ -8,8 +8,8 @@ body { box-sizing: border-box; margin: 0 auto; min-height: 100%; - padding: 2em; - width: 96%; + padding: 1em; + width: 100%; font-size: 1.2em; border: double 3px #ddd; border-top: none; diff --git a/src/colours.js b/src/lib/colours.js similarity index 100% rename from src/colours.js rename to src/lib/colours.js diff --git a/src/lib/processData.svelte b/src/lib/processData.svelte deleted file mode 100644 index 8b550ff..0000000 --- a/src/lib/processData.svelte +++ /dev/null @@ -1,112 +0,0 @@ - - diff --git a/src/lib/references.js b/src/lib/references.js new file mode 100644 index 0000000..ccffb7f --- /dev/null +++ b/src/lib/references.js @@ -0,0 +1,154 @@ +export const references = { + // filter technologies based on a subset of categories + full_category_list: [ + 'App Ecosystem', + 'Application Design', + 'Asset Management', + 'Association Management', + 'Association Management System', + 'Blog Syndication', + 'Book Reviews', + 'Calendar', + 'Collaborative', + 'Collaborative Markdown Editing', + 'Collaborative Wiki', + 'Content Management Systems', + 'Digital Media Sales', + 'Document Management', + 'Email Marketing Automation', + 'Email Services', + 'Enterprise Resource Planning', + 'Event Management', + 'Facial Recognition', + 'Facility Booking', + 'Federated Messaging', + 'Fediverse', + 'File Synchronisation', + 'Forum', + 'Framasoft', + 'Home Automation', + 'Home Security', + 'Image Backup', + 'Image Gallery', + 'Kanban Project Management', + 'Learning Management System', + 'Link Ranking', + 'Link Sharing', + 'Link Shortener', + 'Membership Management', + 'Messaging Cache', + 'Micro-blogging', + 'Multi-Domain Server', + 'Multimedia', + 'Music Discovery', + 'Music Streaming', + 'Network Infrastructure Monitoring', + 'Newsletters', + 'Online Forms', + 'Password Manager', + 'Photos', + 'Portfolio Management', + 'Privacy', + 'Productivity', + 'Reading List', + 'Remote Desktop Sharing', + 'Remote Incremental Encrypted System Backups', + 'Reverse Proxy', + 'Rich Messaging Client', + 'Rich Messaging Server', + 'Scheduling', + 'Server Monitoring', + 'Share Secrets Management', + 'Single Sign-On', + 'Social Bookmarking', + 'Social Media', + 'Software Development Forge', + 'Software Interface Designer', + 'Streaming', + 'Surveys', + 'TURN/STUN Server', + 'Video', + 'Video Conferencing', + 'Video Surveillance', + 'Visualisation of Time Series Data', + 'Webmail', + 'Webserver', + 'Website Analytics' + ], + copyleft_list: ['AGPL-3', 'AGPL-3+', 'GPL', 'GPL-2', 'GPL-2+', 'GPL-3', 'GPL-3+', 'LGPL-3'], + category_filter_list: [ + 'App Ecosystem', + 'Application Design', + 'Asset Management', + 'Association Management', + 'Association Management System', + 'Blog Syndication', + 'Book Reviews', + 'Calendar', + 'Collaborative', + 'Collaborative Markdown Editing', + 'Collaborative Wiki', + 'Content Management Systems', + 'Digital Media Sales', + 'Document Management', + 'Email Marketing Automation', + 'Email Services', + 'Enterprise Resource Planning', + 'Event Management', + 'Facial Recognition', + 'Facility Booking', + 'Federated Messaging', + 'Fediverse', + 'File Synchronisation', + 'Forum', + 'Framasoft', + 'Home Automation', + 'Home Security', + 'Image Backup', + 'Image Gallery', + 'Kanban Project Management', + 'Learning Management System', + 'Link Ranking', + 'Link Sharing', + 'Link Shortener', + 'Membership Management', + 'Messaging Cache', + 'Micro-blogging', + 'Multi-Domain Server', + 'Multimedia', + 'Music Discovery', + 'Music Streaming', + 'Network Infrastructure Monitoring', + 'Newsletters', + 'Online Forms', + 'Password Manager', + 'Photos', + 'Portfolio Management', + 'Privacy', + 'Productivity', + 'Reading List', + 'Remote Desktop Sharing', + 'Remote Incremental Encrypted System Backups', + 'Reverse Proxy', + 'Rich Messaging Client', + 'Rich Messaging Server', + 'Scheduling', + 'Server Monitoring', + 'Share Secrets Management', + 'Single Sign-On', + 'Social Bookmarking', + 'Social Media', + 'Software Development Forge', + 'Software Interface Designer', + 'Streaming', + 'Surveys', + 'TURN/STUN Server', + 'Video', + 'Video Conferencing', + 'Video Surveillance', + 'Visualisation of Time Series Data', + 'Webmail', + 'Webserver', + 'Website Analytics' + ] +}; diff --git a/src/references.js b/src/references.js deleted file mode 100644 index ebaa201..0000000 --- a/src/references.js +++ /dev/null @@ -1,3 +0,0 @@ -const References = {}; - -export { References }; diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index a522696..abebd7c 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -26,10 +26,10 @@ } footer { display: inline-grid; - margin: auto; + margin: 4em, auto, 0, auto; grid-template-columns: 1fr 1fr 1fr; } footer div { - text-align: center; + text-align: left; } diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 1f334bb..79a68a7 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -3,13 +3,123 @@ export let data; const { webservices } = data; - //import References from '../references.js'; - import { colours } from '../colours.js'; - import { processData } from '../lib/processData.svelte'; + import { references } from '$lib/references.js'; + import { colours } from '$lib/colours.js'; - console.log('colours: ', colours); + //console.log('colours: ', colours); + // + //function + // digest and return useful info from the Webservices JSON feed + function processData(webservices) { + let instances = 0; + let current = []; + let future = []; + // properties of technologies + let category_list = []; + let analogue_list = []; + let license_list = []; + // properties of instances + let status_list = []; + let affiliate_list = []; + let host_list = []; + + // actual objects + let hosts = []; + let affiliates = []; + // + // just a trivial reassignment + //let hosts = webservices.hosts; + // + // pull out relevant info in useful chunks. + for (let key in webservices.technologies) { + let tech = webservices.technologies[key]; + if (tech.hasOwnProperty('categories') && tech.categories.constructor === Array) { + tech.categories.forEach(function (category, index) { + if (category_list.hasOwnProperty(category)) category_list[category]++; + else category_list[category] = 1; + }); + } + if (tech.hasOwnProperty('analogues') && tech.analogues.constructor === Array) { + tech.analogues.forEach(function (analogue, index) { + if (analogue_list.hasOwnProperty(analogue)) analogue_list[analogue]++; + else analogue_list[analogue] = 1; + }); + } + if (tech.hasOwnProperty('license')) { + let license = tech.license; + if (license_list.hasOwnProperty(license)) license_list[license]++; + else license_list[license] = 1; + } + + if (hasInstances(tech)) { + tech['name'] = key; + current.push(tech); + //console.log(tech.name + ': ' + tech.instances.length + ' instances...'); + tech.instances.forEach(function (instance, i) { + instances++; + if (instance.hasOwnProperty('status')) { + let tag = instance.status; + if (status_list.hasOwnProperty(tag)) status_list[tag]++; + else status_list[tag] = 1; + } + if (instance.hasOwnProperty('affiliation')) { + let tag = instance.affiliation; + if (affiliate_list.hasOwnProperty(tag)) affiliate_list[tag]++; + else affiliate_list[tag] = 1; + } + if (instance.hasOwnProperty('host')) { + let tag = instance.host; + if (host_list.hasOwnProperty(tag)) host_list[tag]++; + else host_list[tag] = 1; + } + }); + } else { + future[key] = tech; + } + } + for (let key in webservices.hosts) { + //console.log('key: ', key); + let host = webservices.hosts[key]; + host['name'] = key; + //console.log('host: ', host); + if ( + host.hasOwnProperty('domain') && + !(host.hasOwnProperty('status') && host.status == 'retired') + ) { + hosts[key] = host; + } + } + //console.log('webservices.affiliates: ', webservices.affiliates); + for (let key in webservices.affiliates) { + //console.log('key: ', key); + let affiliate = webservices.affiliates[key]; + //console.log('affiliate assignment: ', affiliate); + affiliates[key] = affiliate; + // if (affiliate.hasOwnProperty('name')) { + // affiliate_data[key] = affiliate; + // } + } + + return { + total_instances: instances, + active_services: current, + candidate_services: future, + tech_lists: { + category_list: category_list, + analogue_list: analogue_list, + license_list: license_list + }, + instance_lists: { + status_list: status_list, + affiliate_list: affiliate_list, + host_list: host_list + }, + hosts: hosts, + affiliates: affiliates + }; + } // console.log(technologies); // return true if a tech object includes valid instances @@ -174,6 +284,7 @@ //console.log('categories array: ', results.tech_tags.categories); //console.log('categories keys: ', categories); + console.log('references: ', references); console.log('category_list: ', category_list); //console.log('analogue_list: ', analogue_list); console.log('license_list: ', license_list); @@ -181,172 +292,11 @@ console.log('affiliate_list: ', affiliate_list); console.log('hosts_list: ', host_list); - // filter technolologies based on a subset of categories - const full_category_list = [ - 'App Ecosystem', - 'Application Design', - 'Asset Management', - 'Association Management', - 'Association Management System', - 'Blog Syndication', - 'Book Reviews', - 'Calendar', - 'Collaborative', - 'Collaborative Markdown Editing', - 'Collaborative Wiki', - 'Content Management Systems', - 'Digital Media Sales', - 'Document Management', - 'Email Marketing Automation', - 'Email Services', - 'Enterprise Resource Planning', - 'Event Management', - 'Facial Recognition', - 'Facility Booking', - 'Federated Messaging', - 'Fediverse', - 'File Synchronisation', - 'Forum', - 'Framasoft', - 'Home Automation', - 'Home Security', - 'Image Backup', - 'Image Gallery', - 'Kanban Project Management', - 'Learning Management System', - 'Link Ranking', - 'Link Sharing', - 'Link Shortener', - 'Membership Management', - 'Messaging Cache', - 'Micro-blogging', - 'Multi-Domain Server', - 'Multimedia', - 'Music Discovery', - 'Music Streaming', - 'Network Infrastructure Monitoring', - 'Newsletters', - 'Online Forms', - 'Password Manager', - 'Photos', - 'Portfolio Management', - 'Privacy', - 'Productivity', - 'Reading List', - 'Remote Desktop Sharing', - 'Remote Incremental Encrypted System Backups', - 'Reverse Proxy', - 'Rich Messaging Client', - 'Rich Messaging Server', - 'Scheduling', - 'Server Monitoring', - 'Share Secrets Management', - 'Single Sign-On', - 'Social Bookmarking', - 'Social Media', - 'Software Development Forge', - 'Software Interface Designer', - 'Streaming', - 'Surveys', - 'TURN/STUN Server', - 'Video', - 'Video Conferencing', - 'Video Surveillance', - 'Visualisation of Time Series Data', - 'Webmail', - 'Webserver', - 'Website Analytics' - ]; - const copyleft_list = [ - 'AGPL-3', - 'AGPL-3+', - 'GPL', - 'GPL-2', - 'GPL-2+', - 'GPL-3', - 'GPL-3+', - 'LGPL-3' - ]; - const category_filter_list = [ - 'App Ecosystem', - 'Application Design', - 'Asset Management', - 'Association Management', - 'Association Management System', - 'Blog Syndication', - 'Book Reviews', - 'Calendar', - 'Collaborative', - 'Collaborative Markdown Editing', - 'Collaborative Wiki', - 'Content Management Systems', - 'Digital Media Sales', - 'Document Management', - 'Email Marketing Automation', - 'Email Services', - 'Enterprise Resource Planning', - 'Event Management', - 'Facial Recognition', - 'Facility Booking', - 'Federated Messaging', - 'Fediverse', - 'File Synchronisation', - 'Forum', - 'Framasoft', - 'Home Automation', - 'Home Security', - 'Image Backup', - 'Image Gallery', - 'Kanban Project Management', - 'Learning Management System', - 'Link Ranking', - 'Link Sharing', - 'Link Shortener', - 'Membership Management', - 'Messaging Cache', - 'Micro-blogging', - 'Multi-Domain Server', - 'Multimedia', - 'Music Discovery', - 'Music Streaming', - 'Network Infrastructure Monitoring', - 'Newsletters', - 'Online Forms', - 'Password Manager', - 'Photos', - 'Portfolio Management', - 'Privacy', - 'Productivity', - 'Reading List', - 'Remote Desktop Sharing', - 'Remote Incremental Encrypted System Backups', - 'Reverse Proxy', - 'Rich Messaging Client', - 'Rich Messaging Server', - 'Scheduling', - 'Server Monitoring', - 'Share Secrets Management', - 'Single Sign-On', - 'Social Bookmarking', - 'Social Media', - 'Software Development Forge', - 'Software Interface Designer', - 'Streaming', - 'Surveys', - 'TURN/STUN Server', - 'Video', - 'Video Conferencing', - 'Video Surveillance', - 'Visualisation of Time Series Data', - 'Webmail', - 'Webserver', - 'Website Analytics' - ]; const filtered_technologies = filterTechnologiesByCategoryList( results.active_services, - full_category_list, -// category_filter_list + references.full_category_list, +// references.category_filter_list ); const technologies = sortTechnologies(filtered_technologies); @@ -355,12 +305,12 @@

Web Services

-

- This sites exists to provide an 'always-up-to-date', in-depth description of the This sites exists to provide an 'always-up-to-date', in-depth description of the libre software web services I have set up and maintain.

+