Browse Source

Merge pull request #62 from Extravi/newui

Improved UI and Themes
hnhx 2 years ago
parent
commit
377093f824

+ 1 - 1
donate.php

@@ -8,7 +8,7 @@
     </head>
     <body>
         <div class="misc-container">
-              <h1>Donate</h1>
+              <h1>Donate to the developer</h1>
                <h3>Bitcoin (BTC):</h3>
                <p>bc1qs43kh6tvhch02dtsp7x7hcrwj8fwe4rzy7lp0h</p>
                <img src="static/images/btc.png" alt="btc qr code" width="150" height="150"/>

+ 1 - 1
engines/brave/video.php

@@ -53,7 +53,7 @@
                 echo "<a href=\"$url\">";
                 echo "$base_url";
                 echo "<h2>$title</h2>";
-                echo "<img src=\"image_proxy.php?url=$thumbnail\">";
+                echo "<img class=\"video-img\" src=\"image_proxy.php?url=$thumbnail\">";
                 echo "<br>";
                 echo "<span>$date - $views</span>";
                 echo "</a>";

+ 0 - 1
search.php

@@ -9,7 +9,6 @@
     <body>
         <form class="sub-search-container" method="get" autocomplete="off">
             <h1 class="logomobile"><a class="noDecoration" href="./">Libre<span class="X">X</span></a></h1>
-            <a href="./"><img class="logo" src="static/images/librex.png" alt="librex logo"></a>
             <input type="text" name="q"
                 <?php
                     $query_encoded = urlencode($query);

+ 3 - 1
settings.php

@@ -61,11 +61,13 @@
                 <select name="theme">
                 <?php
                     $themes = "<option value=\"dark\">Dark</option>
+                    <option value=\"amoled\">AMOLED</option>
                     <option value=\"light\">Light</option>
                     <option value=\"auto\">Auto</option>
                     <option value=\"nord\">Nord</option>
                     <option value=\"night_owl\">Night Owl</option>
-                    <option value=\"discord\">Discord</option>";
+                    <option value=\"discord\">Discord</option>
+                    <option value=\"github_night\">GitHub Night</option>";
 
                     if (isset($_COOKIE["theme"]))
                     {

+ 24 - 0
static/css/amoled.css

@@ -0,0 +1,24 @@
+:root {
+    --main-bg: #000000;
+    --main-fg: #F1F3F4;
+
+    --result-link-fg: #8AB4F8;
+    --result-fg: #BABCBE;
+
+    --button-bg: #141414;
+
+    --special-result-border: opacity: 0;
+    --special-text-background: #080808;
+    --special-text-color: #F1F3F4;
+
+    --search-container-text-color: #F1F3F4;
+    --search-container-background-color: #141414;
+    --search-container-background-border: #202124;
+
+    --search-form-background-color: #080808;
+
+    --border: #202124;
+
+    --footer-fg: #BABCBE;
+    --footer-bg: #080808;
+}

+ 3 - 0
static/css/dark.css

@@ -13,8 +13,11 @@
 
     --search-container-text-color: #e8eaed;
     --search-container-background-color: #333333;
+    --search-container-background-border: #5f6368;
 
     --search-form-background-color: #161616;
+    
+    --border: #303134;
 
     --footer-fg: #999da2;
     --footer-bg: #161616;

+ 11 - 1
static/css/discord.css

@@ -7,7 +7,17 @@
 
     --button-bg: #36393f;
 
-    --special-result-border: #dcddde;
+    --special-result-border: opacity: 0;
+    --special-text-background: #36393f;
+    --special-text-color: #dcddde;
+
+    --search-container-text-color: #dcddde;
+    --search-container-background-color:  #282b30;
+    --search-container-background-border: opacity: 0;
+
+    --search-form-background-color: #36393f;
+
+    --border: opacity: 0;
 
     --footer-fg: #dcddde;
     --footer-bg: #36393f;

+ 25 - 0
static/css/github_night.css

@@ -0,0 +1,25 @@
+:root {
+    --main-bg: #0d1117;
+    --main-fg: #f0f6fc;
+
+    --result-link-fg: #58a6ff;
+    --result-fg: #8b949e;
+
+    --button-bg: #1f242b;
+
+    --special-result-border: opacity: 0;
+    --special-text-background: #161b22;
+    --special-text-color: #f0f6fc;
+
+    --search-container-text-color: #f0f6fc;
+    --search-container-background-color: #1f242b;
+    --search-container-background-border: #303842;
+
+    --search-form-background-color: #161b22;
+    
+    --border: #303842;
+
+    --footer-fg: #8b949e;
+    --footer-bg: #161b22;
+    /* GitHub's Border Colours: #444c56 */
+}

+ 14 - 4
static/css/light.css

@@ -1,14 +1,24 @@
 :root {
-    --main-bg: #fff;
+    --main-bg: #f2f4f7;
     --main-fg: #202124;
 
     --result-link-fg: #1a0dab;
     --result-fg: #70757a;
 
-    --button-bg: #f2f2f2;
+    --button-bg: #fff;
 
-    --special-result-border: #bdc1c6;
+    --special-result-border: opacity: 0;
+    --special-text-background: #fff;
+    --special-text-color: #202124;
 
-    --footer-fg: #70757a;
+    --search-container-text-color: #202124;
+    --search-container-background-color: #fff;
+    --search-container-background-border: #dadce0;
+
+    --search-form-background-color: #f9fafd;
+    
+    --border: #dadce0;
+
+    --footer-fg: #202124;
     --footer-bg: #f2f2f2;
 }

+ 12 - 2
static/css/night_owl.css

@@ -7,8 +7,18 @@
 
     --button-bg: #122d42;
 
-    --special-result-border: #d6deeb;
+    --special-result-border: opacity: 0;
+    --special-text-background: #122d42;
+    --special-text-color: #d6deeb;
+
+    --search-container-text-color: #d6deeb;
+    --search-container-background-color:  #535470;
+    --search-container-background-border: opacity: 0;
+
+    --search-form-background-color: #122d42;
+
+    --border: opacity: 0;
 
     --footer-fg: #d6deeb;
-    --footer-bg: #011627;
+    --footer-bg: #535470;
 }

+ 11 - 1
static/css/nord.css

@@ -7,7 +7,17 @@
 
     --button-bg: #4C566A;
 
-    --special-result-border: #D8DEE9;
+    --special-result-border: opacity: 0;
+    --special-text-background: #4C566A;
+    --special-text-color: #E5E9F0;
+
+    --search-container-text-color: #E5E9F0;
+    --search-container-background-color:  #2E3440;
+    --search-container-background-border: opacity: 0;
+
+    --search-form-background-color: #4C566A;
+    
+    --border: opacity: 0;
 
     --footer-fg: #D8DEE9;
     --footer-bg: #2E3440;

+ 47 - 21
static/css/styles.css

@@ -56,7 +56,7 @@ a:hover,
     padding: 10px;
     font-size: inherit;
     font-family: sans-serif;
-    border: 1px solid #5f6368;
+    border: 1px solid var(--search-container-background-border);
     border-radius: 25px;
 }
 
@@ -66,7 +66,7 @@ a:hover,
     color: inherit;
     background-color: var(--button-bg);
     font-size: 14px;
-    border: none;
+    border: 1px solid var(--main-bg);
     border-radius: 4px;
     padding: 13px 10px 13px 10px;
 }
@@ -79,7 +79,7 @@ a:hover,
 .sub-search-container {
     background-color: var(--search-form-background-color);
     width: 100%;
-    border-bottom: 1px solid #303134;
+    border-bottom: 1px solid var(--border);
 }
 
 .sub-search-container hr {
@@ -89,18 +89,16 @@ a:hover,
 .sub-search-container input {
     margin-bottom: 20px;
     width: 580px;
-}
-
-.sub-search-container .logo {
-    vertical-align: middle;
-    margin-right: 21px;
-    width: 60px;
-    height: auto;
-    padding: 14px
+    position: relative;
+    left: 140px;
+    margin: 18px;
 }
 
 .logomobile {
-    display: none;
+    position: absolute;
+    margin-top: 0px;
+    top: 20px;
+    left: 20px;
 }
 
 .noDecoration {
@@ -113,7 +111,7 @@ a:hover,
 }
 
 .sub-search-button-wrapper {
-    margin-left: 118px;
+    margin-left: 165px;
 }
 
 .search-button-wrapper button:hover,
@@ -181,7 +179,7 @@ a:hover,
 .text-result-container,
 #time,
 .next-page-button-wrapper {
-    margin-left: 116px;
+    margin-left: 170px;
 }
 
 .text-result-container {
@@ -195,13 +193,23 @@ a:hover,
     border-radius: 8px;
     background: var(--special-text-background);
     color: var(--special-text-color);
-    margin-left: 116px;
+    margin-left: 840px;
+    margin-top: 0px;
+    position: absolute;
+}
+
+@media only screen and (max-width: 1320px) {
+    .special-result-container {
+        position: relative;
+        float: none;
+        margin-left: 165px;
+    }
 }
 
 .text-result-wrapper {
-    max-width: 500px;
+    max-width: 550px;
     word-wrap: break-word;
-    margin-top: 35px;
+    margin-top: 25px;
 }
 
 .text-result-wrapper a {
@@ -209,6 +217,11 @@ a:hover,
     color: var(--result-fg);
 }
 
+.video-img {
+    height: 115px;
+    border-radius: 12px;
+}
+
 .text-result-wrapper h2 {
     font-size: 20px;
     color: var(--result-link-fg);
@@ -280,7 +293,7 @@ a:hover,
     background-color: var(--footer-bg);
     padding-top: 15px;
     padding-bottom: 15px;
-    border-top: 1px solid #303134;
+    border-top: 1px solid var(--border);
     text-align: center;
 }
 
@@ -359,6 +372,8 @@ a:hover,
     }
 
     .logomobile {
+        position: relative;
+        float: none;
         margin-top: 0px;
         margin-bottom: 0px;
         margin-left: auto;
@@ -366,10 +381,16 @@ a:hover,
         padding: 10px;
         font-size: 28px;
         display: block;
+        margin-top: 0px;
+        top: 0px;
+        left: 0px;
     }
 
     .sub-search-container input {
         width: 80%;
+        position: relative;
+        left: 0px;
+        margin-top: 0px;
     }
 
     .sub-search-button-wrapper {
@@ -394,10 +415,11 @@ a:hover,
     }
 
     .special-result-container {
-        max-width: 100%;
-        margin-left: 0px;
+        position: relative;
+        float: none;
+        max-width: 90%;
+        margin-left: 10px;
         width: auto;
-        border-radius: 0px;
     }
 
     .special-result-container img {
@@ -425,6 +447,10 @@ a:hover,
         font-size: 14px;
     }
 
+    .next-page-button-wrapper {
+        margin-bottom: 25px;
+    }
+
     .text-result-container,
     #time,
     .next-page-button-wrapper {