From 5cb240471dd816096bf41b0e927ec7fa38299857 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 31 Oct 2024 00:38:49 -0400 Subject: [PATCH] update sites, header links, sidebar padding, and readme --- .gitignore | 3 ++ README.md | 2 +- app.vue | 3 +- assets/style/components/header.css | 12 ++++---- assets/style/components/sidebar.css | 6 ++-- assets/style/pages/category/content.css | 2 +- assets/style/pages/error.css | 38 ++++++++++++++++++++++++ assets/style/pages/index/hero.css | 2 +- assets/style/pages/pages.css | 6 +--- assets/style/style.css | 1 + components/Header.vue | 27 +++++++++++++---- content/about.md | 15 +++++----- content/companies/eskimo.md | 2 +- content/companies/neuenet.md | 4 +-- content/companies/webia.md | 2 +- content/domains/git-domains.md | 2 +- content/domains/hnsau.md | 2 +- content/domains/outofthisworld.md | 2 +- content/domains/parked.md | 2 +- content/domains/sinpapeles.md | 2 +- content/domains/take-ctrl.md | 2 +- content/hosting/tinysites.md | 13 ++++++++ content/portfolios/kindthief.md | 2 +- content/portfolios/spencersolberg.md | 2 +- content/submit.md | 2 +- content/tools/htools.md | 6 ++-- error.vue | 5 ++-- public/apple-touch-icon.png | Bin 3098 -> 3103 bytes public/favicon-48x48.png | Bin 851 -> 884 bytes public/favicon.ico | Bin 15086 -> 15086 bytes public/favicon.svg | 18 +++++------ public/js/hns.js | 28 ----------------- public/js/redirect.js | 7 ----- public/site.webmanifest | 2 +- public/web-app-manifest-192x192.png | Bin 3426 -> 3424 bytes public/web-app-manifest-512x512.png | Bin 13832 -> 13845 bytes 36 files changed, 129 insertions(+), 93 deletions(-) create mode 100644 assets/style/pages/error.css create mode 100644 content/hosting/tinysites.md delete mode 100644 public/js/hns.js delete mode 100644 public/js/redirect.js diff --git a/.gitignore b/.gitignore index 768a14e..9aaeeef 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,6 @@ logs .env .env.* !.env.example + +# Server files +ecosystem.config.js \ No newline at end of file diff --git a/README.md b/README.md index c9922cf..6730c4f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ - HNS↗WS + HNS↗WS ## Gateway and web directory for the Handshake naming system. diff --git a/app.vue b/app.vue index 622e395..aa7ca48 100644 --- a/app.vue +++ b/app.vue @@ -14,7 +14,8 @@ { name: 'apple-mobile-web-app-title', content: "HNS↗WS" }, ], script: [ - { defer: 'true', 'data-domain': 'hns.ws', src: 'https://pa.inspin.io/js/latest.js' } + { defer: 'true', 'data-domain': 'hns.ws', src: 'https://pa.inspin.io/js/latest.js' }, + { async: 'true', src: 'https://css.hns.js/' }, ] }) diff --git a/assets/style/components/header.css b/assets/style/components/header.css index d333513..1a039c8 100644 --- a/assets/style/components/header.css +++ b/assets/style/components/header.css @@ -22,11 +22,10 @@ header { .cta, .links { - text-align: right; list-style-type: none; white-space: nowrap; padding: 0; - margin: .5rem .25rem 0 0; + margin: .5rem .5rem 0 .5rem; li { display: inline-block; @@ -59,10 +58,11 @@ header { .redirect { position: absolute; - right: 1rem; - top: 0; + right: 1.1rem; + top: .1rem; + background: var(--b-color); font-size: .85rem; - padding: .7rem .85rem .6rem .75rem; + padding: .6rem .85rem .5rem .75rem; &:hover { cursor: pointer; @@ -76,7 +76,7 @@ header { background: var(--b-color); font-size: .8rem; font-weight: 400; - padding: .6rem .75rem; + padding: .6rem 2.5rem .6rem .75rem; border: .1rem solid var(--hr-color); outline: none; diff --git a/assets/style/components/sidebar.css b/assets/style/components/sidebar.css index da4b7ba..14f8ef5 100644 --- a/assets/style/components/sidebar.css +++ b/assets/style/components/sidebar.css @@ -13,10 +13,10 @@ margin: 0 0 1rem 0; li { - margin: 1.75rem 1rem; + margin: 1.75rem .975rem 1.75rem 1rem; &:first-of-type { - margin: .5rem 1rem 1.75rem 1rem; + margin: .5rem 1rem 1.75rem .975rem; } label { @@ -29,7 +29,7 @@ } .subcategory li { - margin: .35rem 1rem; + margin: .35rem .5rem; } a { diff --git a/assets/style/pages/category/content.css b/assets/style/pages/category/content.css index 6a02a1c..936df3f 100644 --- a/assets/style/pages/category/content.css +++ b/assets/style/pages/category/content.css @@ -1,5 +1,5 @@ .category .content { - padding: 0 1rem 2rem 1rem; + padding: 2rem 1rem; h2 { color: var(--ft-color); diff --git a/assets/style/pages/error.css b/assets/style/pages/error.css new file mode 100644 index 0000000..4e5971b --- /dev/null +++ b/assets/style/pages/error.css @@ -0,0 +1,38 @@ +.error { + text-align: center; + padding: 6rem 0; + + h1, + h2, + a { + color: var(--f-color); + padding: 0; + margin: 1rem 0; + } + + h1 { + font-size: 3.25rem; + font-weight: 600; + } + + h2 { + font-size: 1.75rem; + } + + a { + display: inline-block; + width: fit-content; + color: var(--t-color); + background: var(--b-color); + font-size: .95rem; + font-weight: 600; + border: .15rem solid var(--hr-color); + padding: .65rem 1.85rem; + margin: 1rem .25rem 0 0; + + &:hover { + cursor: pointer; + border-color: var(--t-color); + } + } +} \ No newline at end of file diff --git a/assets/style/pages/index/hero.css b/assets/style/pages/index/hero.css index 71312ea..ed75001 100644 --- a/assets/style/pages/index/hero.css +++ b/assets/style/pages/index/hero.css @@ -53,7 +53,7 @@ } .hero { - padding: 0 0 1rem 0; + padding: 2rem 0 0 0; h1 { color: var(--ft-color); diff --git a/assets/style/pages/pages.css b/assets/style/pages/pages.css index 3820e85..6e01033 100644 --- a/assets/style/pages/pages.css +++ b/assets/style/pages/pages.css @@ -3,12 +3,8 @@ display: grid; grid-template-columns: 12rem 36rem; max-width: 50rem; - padding: 2rem 1rem 0 1rem; - margin: 0 auto; -} - -.index { padding: 2rem 1rem; + margin: 0 auto; } .about, diff --git a/assets/style/style.css b/assets/style/style.css index 323c7b9..a85d4ff 100644 --- a/assets/style/style.css +++ b/assets/style/style.css @@ -6,6 +6,7 @@ /* Pages */ @import 'pages/pages'; +@import 'pages/error'; /* Index */ @import 'pages/index/content'; diff --git a/components/Header.vue b/components/Header.vue index 2cd97c0..0ac050c 100644 --- a/components/Header.vue +++ b/components/Header.vue @@ -4,6 +4,22 @@ const { isMobile, isDesktopOrTablet } = useDevice(); const menu = ref(false) + const query = ref('') + + const search = async() => { + if (query.value) { + // remove protocol + let input = query.value.replace(/(^\w+:|^)\/\//, '') + + // split into domain and path + let [domain, ...paths] = input.split('/') + let path = paths.join('/') + + navigateTo('http://' + domain + '.hns.ws/' + path, { + external: true + }) + } + } function openMenu() { menu.value = true } function closeMenu() { menu.value = false } @@ -14,14 +30,15 @@