From cf7afda7e00558d4e086c34c11dcf2bd098cdc28 Mon Sep 17 00:00:00 2001 From: ManeraKai Date: Tue, 1 Nov 2022 19:32:49 +0300 Subject: Improved design of sidebar and customize popup https://github.com/libredirect/libredirect/issues/369 --- src/pages/options/widgets/general.ejs | 185 +++++++++++++++------------------ src/pages/options/widgets/services.ejs | 160 ++++++++++++++-------------- src/pages/stylesheets/styles.css | 17 ++- 3 files changed, 176 insertions(+), 186 deletions(-) (limited to 'src/pages') diff --git a/src/pages/options/widgets/general.ejs b/src/pages/options/widgets/general.ejs index e24046db..ca96f1c8 100644 --- a/src/pages/options/widgets/general.ejs +++ b/src/pages/options/widgets/general.ejs @@ -1,102 +1,87 @@
-
-

General

-
-
-
-

Theme

- -
-
-

Network

- -
-
-
-

Fallback to clearnet if no instances are available for the current network

- -
-
-
-

- -
-
-
-

Latency Threshold

- - -
-
-
-

-
-
-
-
-   -   -
- -
-
-
- -
- -     - - -   - Export Settings    - - - - - Reset Settings -
-
-
-

Customize Popup

-
- - +
+

General

+
+
+
+

Theme

+ +
+
+

Network

+ +
+
+
+

Fallback to clearnet if no instances are available for the current network

+ +
+
+
+

+ +
+
+
+

Latency Threshold

+ + +
+
+
+

+
+
+
+
+   +   +
+ +
+
+
+ +
+ +     + +   Export Settings    + + + + + Reset Settings +
+
diff --git a/src/pages/options/widgets/services.ejs b/src/pages/options/widgets/services.ejs index 44c6a9f3..c3019074 100644 --- a/src/pages/options/widgets/services.ejs +++ b/src/pages/options/widgets/services.ejs @@ -1,86 +1,84 @@ <% for (const service in config.services) { -%>
-
-

<%= config.services[service].name %>

-
-
-
-

Enable

- -
- <% if (Object.keys(config.services[service].frontends).length > 1) { %> -
-

Frontend

- -
- <% if (config.services[service].embeddable) { _%> -
-

Embed Frontend

- -
- <% } _%> - <% } _%> - <% if (config.services[service].embeddable) { _%> -
-

Redirect Type

- -
- <% } _%> -
- <% for (const frontend in config.services[service].frontends) { -%> - <% if (config.services[service].frontends[frontend].instanceList) { _%> -
- <% for (const network in config.networks) { -%> -
-
-

Default Instances

-
-
-
-
-

Custom Instances

-
-
-
- - -
-
-
- <% if (network == "clearnet") { _%> -
- - -
- <% } _%> -
- <% } %> -
- <% } _%> - <% } %> +
+

<%= config.services[service].name %>

+
+
+
+

Enable

+ +
+
+

Show in Popup

+ +
+ <% if (Object.keys(config.services[service].frontends).length> 1) { %> +
+

Frontend

+ +
+ <% if (config.services[service].embeddable) { _%> +
+

Embed Frontend

+ +
+ <% } _%> <% } _%> <% if (config.services[service].embeddable) { _%> +
+

Redirect Type

+ +
+ <% } _%> +
+ <% for (const frontend in config.services[service].frontends) { -%> <% if (config.services[service].frontends[frontend].instanceList) { _%> +
+ <% for (const network in config.networks) { -%> +
+
+

Default Instances

+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+ <% if (network=="clearnet" ) { _%> +
+ + +
+ <% } _%> +
+ <% } %> +
+ <% } _%> <% } %>
<% } %> diff --git a/src/pages/stylesheets/styles.css b/src/pages/stylesheets/styles.css index 0df2f9fa..5f2871e4 100644 --- a/src/pages/stylesheets/styles.css +++ b/src/pages/stylesheets/styles.css @@ -79,7 +79,6 @@ select { margin: 0; max-width: 500px; border-radius: 3px; - cursor: pointer; } input[type="url"], @@ -110,11 +109,19 @@ section.option-block h2 { body.option { display: flex; padding: 40px; - width: 900px; + width: 1100px; +} + +section.links { + display: flex; + flex-wrap: wrap; + flex-direction: column; + width: 300px; + max-height: 720px; } section.links div { - margin: 20px 0; + margin: 10px; width: max-content; } @@ -458,7 +465,7 @@ body div section { display: none; } -div.about > div { +div.about>div { justify-content: start; width: 520px; } @@ -480,4 +487,4 @@ input:disabled { div.about a { width: 500px; display: inline-block; -} +} \ No newline at end of file -- cgit 1.4.1