From b201dbfc754ef4d09bcfad7bd060780778b0cf72 Mon Sep 17 00:00:00 2001
From: whotookelburg <>
Date: Fri, 24 Feb 2023 05:20:09 +0000
Subject: [PATCH 1/2] some stuff :3 adding support for text / terminal browsers
redone some strings
---
about.php | 0
assets/themes/default/main.css | 12 +++++
assets/themes/default/search.css | 0
data/locale/en_US.ini | 25 +++++++++
data/locale/en_US/strings/aboutpage.ini | 5 --
data/locale/en_US/strings/main.ini | 15 ------
data/locale/en_US/strings/search.ini | 3 --
data/locale/en_US/strings/theme.ini | 1 -
index.php | 55 +++-----------------
search.php | 52 ++++++++++++++++++
src/loadEnv.php | 40 ++++++++++++++
src/pages/{ => modern/dynamic}/aboutPage.php | 0
src/pages/modern/index.php | 15 ++++++
src/pages/text/about.php | 0
src/pages/text/footer.php | 9 ++++
src/pages/text/header.php | 9 ++++
src/pages/text/index.php | 1 +
17 files changed, 169 insertions(+), 73 deletions(-)
create mode 100644 about.php
create mode 100644 assets/themes/default/search.css
create mode 100644 data/locale/en_US.ini
delete mode 100644 data/locale/en_US/strings/aboutpage.ini
delete mode 100644 data/locale/en_US/strings/main.ini
delete mode 100644 data/locale/en_US/strings/search.ini
delete mode 100644 data/locale/en_US/strings/theme.ini
create mode 100644 src/loadEnv.php
rename src/pages/{ => modern/dynamic}/aboutPage.php (100%)
create mode 100644 src/pages/modern/index.php
create mode 100644 src/pages/text/about.php
create mode 100644 src/pages/text/footer.php
create mode 100644 src/pages/text/header.php
create mode 100644 src/pages/text/index.php
diff --git a/about.php b/about.php
new file mode 100644
index 0000000..e69de29
diff --git a/assets/themes/default/main.css b/assets/themes/default/main.css
index 7903c06..4db2c67 100644
--- a/assets/themes/default/main.css
+++ b/assets/themes/default/main.css
@@ -2,6 +2,18 @@ body {
background-color: #262631;
color: white;
}
+div.header{
+ top: 0%;
+}
+div.header.left{
+ left: 0%;
+}
+div.header.right{
+ right: 0%;
+}
+hr{
+ width: 100%;
+}
a:link {
color: cyan;
}
diff --git a/assets/themes/default/search.css b/assets/themes/default/search.css
new file mode 100644
index 0000000..e69de29
diff --git a/data/locale/en_US.ini b/data/locale/en_US.ini
new file mode 100644
index 0000000..89dfc7b
--- /dev/null
+++ b/data/locale/en_US.ini
@@ -0,0 +1,25 @@
+aboutpage_a = '
%s: %s'
+aboutpage_b = 'running v%s'
+aboutpage_ca = 'if there are problems with this page or any other page, contact'
+aboutpage_cb = 'if there are problems with this page or any other page, contact either'
+aboutpage_d = ' %s (email)'
+interactions_adv_aboutx = "About $"
+interactions_basic_about = "About"
+interactions_basic_cancel = "Cancel"
+interactions_basic_no = "No"
+interactions_basic_okay = "OK"
+interactions_basic_search = "Search"
+interactions_basic_yes = "Yes"
+interactions_choose_tp_acceptnew = "Accept"
+interactions_searcharea_hint = "Search query"
+locale_en_native = "English"
+locale_en_this = "English"
+meta_project_desc = "a super lightweight and privacy-centered search engine!"
+meta_project_name = "super tiny search"
+misc_stslogohover = "sts logo"
+region_br = "Brazil"
+region_ca = "Canada"
+region_us = "United States"
+results_found = "found %n results"
+results_foundonlyone = "found 1 result"
+results_none = "no results found"
diff --git a/data/locale/en_US/strings/aboutpage.ini b/data/locale/en_US/strings/aboutpage.ini
deleted file mode 100644
index da485e7..0000000
--- a/data/locale/en_US/strings/aboutpage.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-a = '
%s: %s'
-b = 'running v%s'
-ca = 'if there are problems with this page or any other page, contact'
-cb = 'if there are problems with this page or any other page, contact either'
-d = ' %s (email)'
\ No newline at end of file
diff --git a/data/locale/en_US/strings/main.ini b/data/locale/en_US/strings/main.ini
deleted file mode 100644
index a3efa25..0000000
--- a/data/locale/en_US/strings/main.ini
+++ /dev/null
@@ -1,15 +0,0 @@
-locale_en_native = "English"
-locale_en_this = "English"
-region_us_native = "United States"
-region_us_this = "United States"
-misc_stslogohover = "sts logo"
-meta_project_name = "super tiny search"
-meta_project_desc = "a super lightweight and privacy-centered search engine!"
-interactions_basic_cancel = "Cancel"
-interactions_basic_no = "No"
-interactions_basic_okay = "OK"
-interactions_basic_yes = "Yes"
-interactions_basic_search = "Search"
-interactions_basic_about = "About"
-interactions_adv_aboutx = "About $"
-interactions_searcharea_hint = "Search query"
diff --git a/data/locale/en_US/strings/search.ini b/data/locale/en_US/strings/search.ini
deleted file mode 100644
index 4b001a4..0000000
--- a/data/locale/en_US/strings/search.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-results_found = "found $ results"
-results_foundonlyone = "found 1 result"
-results_none = "no results found"
diff --git a/data/locale/en_US/strings/theme.ini b/data/locale/en_US/strings/theme.ini
deleted file mode 100644
index 126d3bf..0000000
--- a/data/locale/en_US/strings/theme.ini
+++ /dev/null
@@ -1 +0,0 @@
-interactions_choose_tp_acceptnew = "Accept"
\ No newline at end of file
diff --git a/index.php b/index.php
index c9b25db..d563e5d 100644
--- a/index.php
+++ b/index.php
@@ -1,40 +1,4 @@
-message;
- }
- die(sprintf("\n\ncontact %s @ %s",$cfg['MAINTAINERS_0']['name'],$cfg['MAINTAINERS_0']['email']));
- }
-?>
+-
@@ -46,18 +10,11 @@
".file_get_contents("data/misc/icon/html.html")."
";
+ if ($_GET['fpage']==="text"){
+ require 'src/pages/text/index.php';
+ }else{
+ require 'src/pages/modern/index.php';
+ }
?>
- "
- ?>
-
-
-