more shit

master
whotookelburg 1 year ago
parent 3d93375bf4
commit 443887dc10

1
.gitignore vendored

@ -1 +1,2 @@
*replit*
data/index

@ -0,0 +1,21 @@
h1 {
text-align: center;
margin-top: 15%;
font-size: 14vw;
}
div {
white-space: nowrap;
width: auto;
display: block;
margin-left: 30%;
margin-right: 30%;
line-height: 1.5;
}
input[type="submit"]{
/*margin: 0;*/
margin-right: 30;
text-align: center;
}
input[type="text"]{
width: 85%;
}

@ -0,0 +1,22 @@
body {
background-color: #262631;
color: white;
}
a:link {
color: cyan;
}
a:visited{
color: mediumpurple;
}
a:hover {
color: rebeccapurple;
}
sts-icon.bracket {
color: #4f4f4f;
}
sts-icon.s{
color: darkolivegreen;
}
sts-icon.t{
color: saddlebrown;
}

@ -0,0 +1,5 @@
a = '<hr><a href="%s">%s</a>: %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 = '&emsp;%s&emsp;(<a href="mailto:%s">email</a>)'

@ -1,5 +1,15 @@
interactions[basic][cancel] = "Cancel"
interactions[basic][no] = "No"
interactions[basic][okay] = "OK"
interactions[basic][yes] = "Yes"
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"

@ -1,3 +1,3 @@
results[found] = "found $ results"
results[foundonlyone] = "found 1 result"
results[none] = "no results found"
results_found = "found $ results"
results_foundonlyone = "found 1 result"
results_none = "no results found"

@ -1 +1 @@
interactions[choose][tp][acceptnew] = "Accept"
interactions_choose_tp_acceptnew = "Accept"

@ -0,0 +1 @@
<i><sts-icon class="bracket left">[</sts-icon><sts-icon class="s left">s</sts-icon><sts-icon class="t">t</sts-icon><sts-icon class="s right">s</sts-icon><sts-icon class="bracket right">]</sts-icon></i>

@ -0,0 +1,16 @@
<?php
if(!$_GET && !$_POST){
http_response_code(400);
die;
}
if($_GET['content']=='aboutserver'){
require 'src/pages/aboutPage.php';
echo '<html><head>';
echo "<link rel=\"stylesheet\" href=\"assets/themes/".$_COOKIE['sts_theme']."/main.css\">";
echo '</head><body>';
$out = genAbout('en_US') or die('something went wrong! go piss of tyler!');
echo $out;
echo '</body></html>';
die;
}
?>

@ -1,15 +1,43 @@
<?php
// load config
$cfg=parse_ini_file("serve.ini", true);
// load locale
#$lang=locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']);
$lang="en_US";
$strings=parse_ini_file("data/locale/".$lang."/strings/main.ini");
// cookies
if(!isset($_COOKIE['sts_theme'])){
setcookie('sts_theme','default');
$_COOKIE['sts_theme'] = 'default';
}
if(!isset($_COOKIE['sts_scripting'])){
setcookie('sts_scripting','none');
$_COOKIE['sts_scripting'] = 'none';
}
?>
<html>
<head>
<title><?</title>
<title><?php echo $cfg['META']['name']; ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php
echo "<link rel=\"stylesheet\" href=\"assets/themes/".$_COOKIE['sts_theme']."/main.css\">";
echo "<link rel=\"stylesheet\" href=\"assets/themes/".$_COOKIE['sts_theme']."/index.css\">";
?>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
<!--
This script places a badge on your repl's full-browser view back to your repl's cover
page. Try various colors for the theme: dark, light, red, orange, yellow, lime, green,
teal, blue, blurple, magenta, pink!
-->
<script src="https://replit.com/public/js/replit-badge.js" theme="blue" defer></script>
<?php
echo "<h1 title=\"".$strings['misc_stslogohover']."\">".file_get_contents("data/misc/icon/html.html")."</h1><br>";
?>
<?php
echo "<div class=\"searchbox\"><form id=\"searchbox\">\n";
echo "<input class=\"sbox\" type=\"text\" placeholder=\"".$strings['interactions_searcharea_hint']."\" name=\"query\">";
echo "<input type=\"submit\" value=\"".$strings['interactions_basic_search']."\">\n";
echo "</form></div>"
?>
<iframe style="position:absolute;bottom:30px;right:10px;" src="dynamicGen.php?content=aboutserver" width="376" height="276"></iframe>
</body>
</html>

@ -1,22 +1,26 @@
[META]
name = "superTinySearch"
version = [0, 0, 0]
maintain[][name] = "brendan Berger"
maintain[][email] = "whotookelburg"
svn = "<>"
svn = 'https://basedwa.re/elburg/sts'
[MAINTAINERS]
vals = 1
[MAINTAINERS_0]
name = 'brendan Berger'
email = 'whotookelburg@hotmail.com'
[FEATURES]
langs[] = "en_US"
regions[] = "us"
[FEATURES.APPLETS]
[APPLETS]
enabled = false
runtimes[] = "ecmascript"
[FEATURES.UI]
[UI]
themes[] = "default"
default = "default"
icon = "text"
[INDEX]
sites[] = "none"

@ -0,0 +1,37 @@
<?php
function &genAbout($language): ?string{
$strings=array_merge(
parse_ini_file(__DIR__.'/../../data/locale/'.$language.'/strings/aboutpage.ini'),
parse_ini_file(__DIR__.'/../../data/locale/'.$language.'/strings/main.ini')
);
$conf=parse_ini_file(__DIR__.'./../../serve.ini',true);
$output="<h1 title=\"".$strings['misc_stslogohover']."\">".file_get_contents(__DIR__."/../../data/misc/icon/html.html")."</h1>";
$output=$output.sprintf(
$strings['a'],
$conf['META']['svn'],
$strings['meta_project_name'],
$strings['meta_project_desc']
).
'<br>'.
sprintf(
$strings['b'],
sprintf(
'%d.%d.%d',
$conf['META']['version'][0],
$conf['META']['version'][1],
$conf['META']['version'][2]
)
).
'<hr>'.
$strings['ca'].
'<br>'.
sprintf(
$strings['d'],
$conf['MAINTAINERS_0']['name'],
$conf['MAINTAINERS_0']['email'],
$conf['MAINTAINERS_0']['email']
);
return $output;
}
?>
Loading…
Cancel
Save