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/css/main/layouts/mobile.css b/css/main/layouts/mobile.css index eb822eb..8ae3a9b 100644 --- a/css/main/layouts/mobile.css +++ b/css/main/layouts/mobile.css @@ -81,15 +81,24 @@ align-content: center;} .webrings .auto-scroll { + height: 65%; + width: fit-content; flex-direction: row; animation-name: scroll-webring-mobile;} .webrings .scroll_one, .webrings .scroll_two { + gap: 2em; flex-direction: row;} + .webrings .scroll_one > div , .webrings .scroll_two > div { + flex-shrink: 0; + height: 100%; + width: fit-content; + } + .webrings .auto-scroll > * > div img { - height: 60px; - width: auto;} + height: 100%; + width: auto;} .scroll_below-clip-box { position: absolute; @@ -127,6 +136,10 @@ from {transform: translateX(calc(-50%));} to {transform: translateX(0%);}} + .webrings .auto-scroll { + animation-duration: 25s; + } + /* Vertical scroll text */ .verticalscroll .auto-scroll { animation-name: scroll-vertical; diff --git a/img/webrings/transfem_cloud_button.png b/img/webrings/transfem_cloud_button.png new file mode 100644 index 0000000..caf2d42 Binary files /dev/null and b/img/webrings/transfem_cloud_button.png differ diff --git a/img/webrings/transfem_cloud_left_arrow.png b/img/webrings/transfem_cloud_left_arrow.png new file mode 100644 index 0000000..77da797 Binary files /dev/null and b/img/webrings/transfem_cloud_left_arrow.png differ diff --git a/img/webrings/transfem_cloud_right_arrow.png b/img/webrings/transfem_cloud_right_arrow.png new file mode 100644 index 0000000..edbb606 Binary files /dev/null and b/img/webrings/transfem_cloud_right_arrow.png differ 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_enby_button.png b/img/webrings/transfem_enby_button.png new file mode 100644 index 0000000..b4aa6df Binary files /dev/null and b/img/webrings/transfem_enby_button.png differ diff --git a/img/webrings/transfem_enby_left_arrow.png b/img/webrings/transfem_enby_left_arrow.png new file mode 100644 index 0000000..0fa3a45 Binary files /dev/null and b/img/webrings/transfem_enby_left_arrow.png differ diff --git a/img/webrings/transfem_enby_right_arrow.png b/img/webrings/transfem_enby_right_arrow.png new file mode 100644 index 0000000..782fa16 Binary files /dev/null and b/img/webrings/transfem_enby_right_arrow.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/img/webrings/transfem_trans_button.png b/img/webrings/transfem_trans_button.png new file mode 100644 index 0000000..cc38b3b Binary files /dev/null and b/img/webrings/transfem_trans_button.png differ diff --git a/img/webrings/transfem_trans_left_arrow.png b/img/webrings/transfem_trans_left_arrow.png new file mode 100644 index 0000000..6aa6bf1 Binary files /dev/null and b/img/webrings/transfem_trans_left_arrow.png differ diff --git a/img/webrings/transfem_trans_right_arrow.png b/img/webrings/transfem_trans_right_arrow.png new file mode 100644 index 0000000..cd06925 Binary files /dev/null and b/img/webrings/transfem_trans_right_arrow.png differ diff --git a/includes/common_webrings.inc.php b/includes/common_webrings.inc.php new file mode 100644 index 0000000..b8ea5cc --- /dev/null +++ b/includes/common_webrings.inc.php @@ -0,0 +1,40 @@ + 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 = ` +
+
+ +
+ (not yet, but maybe soon!) +
+ `; + } 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 = ` +
+ + previous site + + + transfem webring + + + next site + +
+ `; + } +} diff --git a/includes/transfemwebring_contr.inc.php b/includes/transfemwebring_contr.inc.php new file mode 100644 index 0000000..10d3c59 --- /dev/null +++ b/includes/transfemwebring_contr.inc.php @@ -0,0 +1,112 @@ + [ + "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" + ] +]; + +$TRANSFEMRING_SCRIPT_SOURCE = [ + "selected_source" => 1, + "sources" => + [["url" => "https://fem.nz/ring/transfemring.js", + "source" => "internet"], + ["url" => "/transfemwebring.js", + "source" => "local"]] + ]; + +// Specific variables for script +$TRANSFEMRING_ROOT = "https://fem.nz"; +$TRANSFEMRING_VALID_WIDGET_TYPES = ["transgender", "nonbinary"]; + +// Personal identifiers/choices +$TRANSFEMRING_WIDGET_TYPE = $TRANSFEMRING_VALID_WIDGET_TYPES[1]; +$TRANSFEMRING_ID = 8; + +// Functions +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; +} + +$transfemring_sites = scrapeWebsiteSites($TRANSFEMRING_SCRIPT_SOURCE,'sites: [',']'); +$transfemring_sites = primarySplit($transfemring_sites); +for ($i = 0; $i < sizeof($transfemring_sites); $i++) { + $depured_transfemring_sites[$i] = secondarySplit($transfemring_sites[$i]); +} +$transfemring_sites = $depured_transfemring_sites; + +for ($i = 1; $i < count($transfemring_sites); $i++){ + if ($transfemring_sites[$i]['id'] == $TRANSFEMRING_ID) { + + $transfem_prev = 'https://' . $transfemring_sites[($i-1)]["site_link"]; + $transfem_current = 'https://' . $transfemring_sites[($i)]["site_link"]; + $transfem_next = 'https://' . $transfemring_sites[($i+1)]["site_link"]; + $found = TRUE; + } +} + +if (!isset($found)) { + echo ("ERROR ID NOT FOUND"); +} \ No newline at end of file diff --git a/includes/transfemwebring_view.inc.php b/includes/transfemwebring_view.inc.php new file mode 100644 index 0000000..9a3fde2 --- /dev/null +++ b/includes/transfemwebring_view.inc.php @@ -0,0 +1,20 @@ + +
+ + " alt="previous site" style="vertical-align: middle; height: 100%;"> + + + " alt="transfem webring" style="vertical-align: middle; height: 100%;"> + + + " alt="next site" style="transform: scaleX(-1); vertical-align: middle; height: 100%;"> + +
+ + previous site + transing the internet + next site + + `, + nb: ` +
+ previous site + transing the internet + next site +
+ `, + cloud: `
+ previous site + transing the internet + next site +
`, + error: `
+ +
(this site isn't part of the webring... yet!)
+
`, + }, + }; + // code + webring.idx = webring.sites.findIndex(site => location.href.startsWith(site, 8)); + document.currentScript.outerHTML = webring.idx === -1 ? webring.widgets.error : + (webring.widgets[document.currentScript.dataset.widget] ?? webring.widgets.default) + .replace("PREV", "https://" + webring.sites.at(webring.idx - 1)) + .replace("NEXT", "https://" + webring.sites[(webring.idx + 1) % webring.sites.length]); +} \ No newline at end of file diff --git a/includes/transingtheinternet_contr.inc.php b/includes/transingtheinternet_contr.inc.php new file mode 100644 index 0000000..dcd02a4 --- /dev/null +++ b/includes/transingtheinternet_contr.inc.php @@ -0,0 +1,108 @@ + [ + "left_arrow" => "../../../img/webrings/transfem_enby_left_arrow.png", + "button" => "../../../img/webrings/transfem_enby_button.png", + "right_arrow" => "../../../img/webrings/transfem_enby_right_arrow.png" + ], + "trans" => [ + "left_arrow" => "../../../img/webrings/transfem_trans_left_arrow.png", + "button" => "../../../img/webrings/transfem_trans_button.png", + "right_arrow" => "../../../img/webrings/transfem_trans_right_arrow.png" + ], + "cloud" => [ + "left_arrow" => "../../../img/webrings/transfem_cloud_left_arrow.png", + "button" => "../../../img/webrings/transfem_cloud_button.png", + "right_arrow" => "../../../img/webrings/transfem_cloud_right_arrow.png" + ] +]; + +$TRANSING_SCRIPT_SOURCE = [ + "selected_source" => 1, + "sources" => + [["url" => "https://transring.neocities.org/ring.js", + "source" => "internet"], + ["url" => "/transingtheinternet.js", + "source" => "local"]] + ]; + +// Specific variables for script +$TRANSING_ROOT = "https://transring.neocities.org"; +$TRANSING_VALID_WIDGET_TYPES = ["cloud", "enby", "trans","error"]; + +// Personal identifiers/choices +$TRANSING_WIDGET_TYPE = $TRANSING_VALID_WIDGET_TYPES[1]; +$TRANSING_ID = 1; + +// Functions +function transingSplit(string $array) { + $array = preg_replace('/\s+/', '', $array); + $i = 0; + while (strlen($array) !== 0) { + + // Strip coma if found + if (str_starts_with($array,',')) { + $array = substr($array,1); + } + if (str_starts_with(strrev($array),',')) { + $array = substr($array,0,-1); + } + + $temp = strpos($array,'/',1); + + if (strpos($array,'/',1) > 1 or strpos($array,'/',1) == FALSE) { + $commented=FALSE; + } else { + $commented=TRUE; + } + + + if (str_starts_with($array,',')) { + $array = substr($array,1); + } + + // Get substring position and length + $commented ? $start_pos=3 : $start_pos=1; + $end_pos = strpos($array,"\"",$start_pos); + $item_len = $end_pos - $start_pos; + + if (!$commented){ + $return_array[$i] = substr($array,$start_pos,$item_len); + } else { + $return_array[$i] = ''; + } + + // Save website into array, and strip array + if (!$commented) { + $item_len = $item_len +2; // +2 from " and " + } else { + $item_len = $item_len +4; // +4 from ", ", / and / + } + + $array = substr($array,$item_len); + + $i++; + } + + return $return_array; +} + +$transing_sites = scrapeWebsiteSites($TRANSING_SCRIPT_SOURCE,'sites :[',']'); +$transing_sites = transingSplit($transing_sites); + +for ($i = 0; $i < count($transing_sites); $i++){ + if ($i == $TRANSING_ID) { + $transing_prev = 'https://' . $transing_sites[($i-1)]; + $transing_current = 'https://' . $transing_sites[($i)]; + $transing_next = 'https://' . $transing_sites[($i+1)]; + $found = TRUE; + } +} + +if (!isset($found)) { + echo ("ERROR ID NOT FOUND"); +} \ No newline at end of file diff --git a/includes/transingtheinternet_view.inc.php b/includes/transingtheinternet_view.inc.php new file mode 100644 index 0000000..0330ba3 --- /dev/null +++ b/includes/transingtheinternet_view.inc.php @@ -0,0 +1,24 @@ + + " alt="transing the internet"> +
(this site isn't part of the webring... yet!)
+ +
+ " alt="previous site"> + " alt="transing the internet"> + " alt="next site"> +
+
-
- +
+ +