diff --git a/css/global/fonts/beefont.ttf b/css/global/fonts/beefont.ttf deleted file mode 100644 index ed5ec31..0000000 Binary files a/css/global/fonts/beefont.ttf and /dev/null differ diff --git a/css/global/fonts/lmmono10-regular.woff b/css/global/fonts/lmmono10-regular.woff deleted file mode 100644 index 9f33af2..0000000 Binary files a/css/global/fonts/lmmono10-regular.woff and /dev/null differ diff --git a/css/global/fonts/molecule31_font.ttf b/css/global/fonts/molecule31_font.ttf new file mode 100644 index 0000000..e4c8592 Binary files /dev/null and b/css/global/fonts/molecule31_font.ttf differ diff --git a/css/global/fonts/ms_pgothic.ttf b/css/global/fonts/ms_pgothic.ttf new file mode 100644 index 0000000..a3ac9be Binary files /dev/null and b/css/global/fonts/ms_pgothic.ttf differ diff --git a/css/global/styling/global-styling.css b/css/global/styling/global-styling.css index cc9e131..87961ba 100644 --- a/css/global/styling/global-styling.css +++ b/css/global/styling/global-styling.css @@ -58,22 +58,28 @@ img { image-rendering: pixelated;} font-weight: normal; font-style: normal;} - @font-face { font-family: 'basiic'; src: url('../fonts/basiic.ttf') format('truetype'); font-weight: normal; + font-style: normal; +} + +@font-face { + font-family: 'molecule31'; + src: url('../fonts/molecule31_font.ttf') format('truetype'); + font-weight: normal; font-style: normal;} @font-face { - font-family: 'beefont'; - src: url('../fonts/beefont.ttf') format('truetype'); + font-family: 'ms pgothic'; + src: url('../fonts/ms_pgothic.ttf') format('truetype'); font-weight: normal; font-style: normal;} * { text-align: center; } -body { font-family: 'special elite', honyaji, basiic, monospace, serif, sans-serif; } +body { font-family: 'special elite', monospace, serif, sans-serif; } /* ----------------- Color -------------------- */ diff --git a/img/webrings/transfem_enby_arrow.png b/img/webrings/transfem_enby_arrow.png new file mode 100644 index 0000000..c0428ce Binary files /dev/null and b/img/webrings/transfem_enby_arrow.png differ diff --git a/img/webrings/transfem_enby_banner.png b/img/webrings/transfem_enby_banner.png new file mode 100644 index 0000000..2e24499 Binary files /dev/null and b/img/webrings/transfem_enby_banner.png differ diff --git a/img/webrings/transfem_trans_arrow.png b/img/webrings/transfem_trans_arrow.png new file mode 100644 index 0000000..32c80b0 Binary files /dev/null and b/img/webrings/transfem_trans_arrow.png differ diff --git a/img/webrings/transfem_trans_banner.png b/img/webrings/transfem_trans_banner.png new file mode 100644 index 0000000..1061ef2 Binary files /dev/null and b/img/webrings/transfem_trans_banner.png differ diff --git a/includes/transfemring.js b/includes/transfemring.js new file mode 100644 index 0000000..8d1a386 --- /dev/null +++ b/includes/transfemring.js @@ -0,0 +1,73 @@ +// based again off https://transring.neocities.org/ring.js :) +// which is based off https://juneish.neocities.org/resources/webstring/ + +{ + const VALID_WIDGET_TYPES = ["transgender", "nonbinary"] + + let transfemring = { + // sitelist (oldest to newest) + // strip the protocol off + sites: [{"id":1,"description":"You're here!","site_link":"fem.nz","author":"me","in_the_ring":true,"notes":"","created_at":"2025-10-07T08:10:09.659Z","updated_at":"2025-10-07T08:10:09.659Z"},{"id":2,"description":"transfem webdev :p","site_link":"skyler.lol","author":"Skyler!","in_the_ring":false,"notes":"","created_at":"2025-10-07T08:10:35.275Z","updated_at":"2025-10-07T08:10:35.275Z"},{"id":3,"description":"just a personal site for music, musings, and blog posts! ran by a transfem enby :)","site_link":"transferns.neocities.org","author":"Andie/Fern","in_the_ring":true,"notes":"","created_at":"2025-10-07T08:10:57.429Z","updated_at":"2025-12-11T02:14:39.833Z"},{"id":4,"description":"the most evil and repulsive website on planet earth","site_link":"cresentri.com","author":"cresentri","in_the_ring":true,"notes":"","created_at":"2025-10-07T08:11:30.742Z","updated_at":"2025-10-07T08:11:30.883Z"},{"id":5,"description":"i'm messing around with trying to learn how to use html for somewhat interesting things i guess","site_link":"iseel.neocities.org","author":"IseeL","in_the_ring":true,"notes":"","created_at":"2025-10-07T08:12:18.126Z","updated_at":"2025-10-07T08:29:03.148Z"},{"id":6,"description":"Just a place for me to share info about my projects and talk about things i enjoy \u003c3","site_link":"vivslakes.moe","author":"Viv","in_the_ring":true,"notes":"","created_at":"2025-10-07T08:13:05.476Z","updated_at":"2025-10-07T08:13:05.567Z"},{"id":7,"description":"all kinds of things!","site_link":"fionaruthbo.neocities.org","author":"Fiona Ruthbo","in_the_ring":true,"notes":"","created_at":"2025-10-07T08:14:16.412Z","updated_at":"2025-10-07T08:14:16.428Z"},{"id":8,"description":"Poetry, halftones, and Twitchy.","site_link":"klara.nz","author":"me!","in_the_ring":true,"notes":"","created_at":"2025-10-07T08:39:07.132Z","updated_at":"2025-10-07T08:57:26.399Z"},{"id":9,"description":"a little birdie on the internet :)","site_link":"kestrel.pet","author":"Kestrel","in_the_ring":true,"notes":"","created_at":"2025-11-15T06:57:16.625Z","updated_at":"2025-11-15T06:57:26.268Z"},{"id":10,"description":"autistic artist musician webdev dragon(girl?)thing; very gay; rawr","site_link":"ytd.wtf","author":"Yuri the Dragon","in_the_ring":true,"notes":"","created_at":"2025-12-30T09:57:00.232Z","updated_at":"2025-12-30T11:19:58.022Z"},{"id":11,"description":"This website runs on my living room heater","site_link":"izzy.kiwi","author":"Just Izzy","in_the_ring":false,"notes":"","created_at":"2025-12-30T11:19:12.953Z","updated_at":"2026-01-01T02:54:57.059Z"},{"id":12,"description":"a dump for all of my projects and adhd thoughts","site_link":"ikelene.dev","author":"Ikelene","in_the_ring":true,"notes":"","created_at":"2026-01-23T01:52:44.443Z","updated_at":"2026-01-23T01:52:44.463Z"},{"id":13,"description":"contains my mind space, which includes gaming, references, easter eggs, art, programming, etc!","site_link":"theabsoluterealm.com","author":"ezra","in_the_ring":true,"notes":"","created_at":"2026-01-23T01:54:27.672Z","updated_at":"2026-01-23T01:56:27.520Z"},{"id":14,"description":"Just a trans girl that likes radios, computers, creative freedom, art, etc not much more to it!","site_link":"cafepots.neocities.org","author":"Cafe_Pots","in_the_ring":true,"notes":"","created_at":"2026-01-30T08:36:39.133Z","updated_at":"2026-01-30T08:36:51.946Z"},{"id":15,"description":"Extension of my cute, sparkley, sprinkle filled transfem brain! ദ്ദി◝ ⩊ ◜)","site_link":"winzpir.neocities.org","author":"Winzpir/Angel","in_the_ring":true,"notes":"","created_at":"2026-02-20T01:31:47.843Z","updated_at":"2026-02-20T01:31:47.843Z"}], + root: "https://fem.nz" + } + console.log(transfemring) + transfemring.index = location.href.startsWith("file://") ? 0 : transfemring.sites.findIndex((entry) => location.href.includes("://" + entry.site_link)); + let widget = document.currentScript.dataset.widget ?? "transgender"; + + function urlWithWidget(path) { + return `${transfemring.root}/ring/${widget}/${path}` + } + + if (!VALID_WIDGET_TYPES.includes(widget)) { + console.log("To web admin: transfem webring widget should have data-widget set to one of the following if configured (attribute will default to 'transgender'):", VALID_WIDGET_TYPES) + console.log(`data-widget currently set to: ${widget}`) + widget = "transgender" + } + + if (transfemring.index === -1) { + document.currentScript.outerHTML = ` +
+ `; + } else { + function nextActive() { + let currentIndex = transfemring.index + 1 + while (!location.href.includes(transfemring.sites[currentIndex % transfemring.sites.length].site_link)) { + if (transfemring.sites[currentIndex % transfemring.sites.length].in_the_ring) { + return transfemring.sites[currentIndex % transfemring.sites.length] + } + currentIndex++ + } + return transfemring.sites[currentIndex % transfemring.sites.length] + } + function previousActive() { + let currentIndex = transfemring.index - 1 + while (!location.href.includes(transfemring.sites.at(currentIndex).site_link)) { + if (transfemring.sites.at(currentIndex).in_the_ring) { + return transfemring.sites.at(currentIndex) + } + currentIndex-- + } + return transfemring.sites[currentIndex % transfemring.sites.length] + } + let next = "https://" + nextActive().site_link + let prev = "https://" + previousActive().site_link; + document.currentScript.outerHTML = ` + + `; + } +} diff --git a/includes/transfemwebring.inc.php b/includes/transfemwebring.inc.php new file mode 100644 index 0000000..d8c563e --- /dev/null +++ b/includes/transfemwebring.inc.php @@ -0,0 +1,8 @@ + 1, + "sources" => + [["url" => "https://fem.nz/ring/transfemring.js", + "source" => "internet"], + ["url" => "includes/transfemring.js", + "source" => "local"]] + ]; + +$VALID_WIDGET_TYPES = ["transgender", "nonbinary"]; + +$widget_type = $VALID_WIDGET_TYPES[1]; +$id = 8; + + +/* Implement fallback if scraping doesn't work */ + +function scrapeSitesFromSource(array $source) { + + function getSiteArray(array $source) { + function getFile(array $source){ + + $selected_source = $source["sources"][$source["selected_source"]]; + + if ($selected_source["source"] === "local") { + $file = file_get_contents($selected_source["url"]); + } else { + $curl = curl_init($selected_source["url"]); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); + + $file = curl_exec($curl); + if ($file === false) { + echo "Error: " . curl_error($curl); + exit; + } + + curl_close($curl); + } + return $file; + } + + function extractSites(string $script) { + $start_pos = strpos($script,"sites: [") + 8; // needle has 9 characters + $end_pos = strpos($script, "]", $start_pos); + + $sites = substr($script, $start_pos, $end_pos - $start_pos); + + return $sites; + } + + return extractSites(getFile($source)); + } + + function primarySplit(string $array) { + $i = 0; + while (strlen($array) !== 0) { + // Strip coma if found + if (str_starts_with($array,',')) { + $array = substr($array,1); + } + + // Get substring position and length + $start_pos = 1; + $end_pos = strpos($array,"}",1); + $item_len = $end_pos - $start_pos; + + // Save website into array, and strip array + $return_array[$i] = substr($array,$start_pos,$item_len); + $array = substr($array,$item_len+2); // +2 from { and } + + $i++; + } + return $return_array; + } + + function secondarySplit(string $sub_array) { + while (strlen($sub_array) !== 0){ + if (str_starts_with($sub_array,',')) { + $sub_array = substr($sub_array,1); + } + + $key_start_pos = 1; + $key_end_pos = strpos($sub_array,"\"",1); + $key_len = $key_end_pos - $key_start_pos; + $key = substr($sub_array,$key_start_pos,$key_len); + + $value_start_pos = $key_len + 3; // +3 from " , " and : + // Check if key is quoted + if (strpos($sub_array,"\"",$value_start_pos) != $value_start_pos) { + $keyhasQuotes = FALSE; + $value_end_pos = strpos($sub_array,","); + } else { + $value_start_pos++; // +1 from " + $value_end_pos = strpos($sub_array,"\"",$value_start_pos); + $keyhasQuotes = TRUE; + } + $value_len = $value_end_pos - $value_start_pos; + $value = substr($sub_array,$value_start_pos,$value_len); + + $return_sub_array[$key] = $value; + + $sub_sub_array_len = $key_len + $value_len + 3; // +3 from " , " and : + if ($keyhasQuotes) { + $sub_sub_array_len = $sub_sub_array_len + 2; // +2 from " and " + } + + $sub_array = substr($sub_array,$sub_sub_array_len); + } + return $return_sub_array; + } + + $websites = primarySplit(getSiteArray($source)); + + for ($i = 0; $i < sizeof($websites); $i++) { + $return_websites[$i] = secondarySplit($websites[$i]); + } + + return $return_websites; + +} + +$transfermring_sites = scrapeSitesFromSource($JS_SCRIPT_URL); + + +$root = "https://fem.nz"; + +// Add checks if id is at the start + +for ($i = 0; $i < count($transfermring_sites); $i++){ + if ($transfermring_sites[$i]["id"] == $id){ + $prev = $transfermring_sites[($i-1)]["site_link"]; + $current = $transfermring_sites[($i)]["site_link"]; + $next = $transfermring_sites[($i+1)]["site_link"]; + } +} + +$prev = 'https://' . $prev; +$current = 'https://' . $current; +$next = 'https://' . $next; + +$file = [ + "nonbinary" => [ + "arrow_path" => "../../../img/webrings/transfem_enby_arrow.png", + "banner_path" => "../../../img/webrings/transfem_enby_banner.png" + ], + "transgender" => [ + "arrow_path" => "../../../img/webrings/transfem_trans_arrow.png", + "banner_path" => "../../../img/webrings/transfem_trans_banner.png" + ] +]; diff --git a/includes/transfemwebring_view.inc.php b/includes/transfemwebring_view.inc.php new file mode 100644 index 0000000..6b57112 --- /dev/null +++ b/includes/transfemwebring_view.inc.php @@ -0,0 +1,20 @@ + + +