From 6e3ee9bcff814d8c83ba89ff322c604c072c2c2a Mon Sep 17 00:00:00 2001 From: EdwardLangdon <101938856+EdwardLangdon@users.noreply.github.com> Date: Sat, 25 Jun 2022 07:11:37 +0000 Subject: [PATCH 1/2] Added About page --- src/pages/options/widgets/about.pug | 18 ++++++++++++++++++ src/pages/widgets/icons.pug | 6 +++++- src/pages/widgets/links.pug | 7 +++++-- 3 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 src/pages/options/widgets/about.pug diff --git a/src/pages/options/widgets/about.pug b/src/pages/options/widgets/about.pug new file mode 100644 index 0000000..67897e7 --- /dev/null +++ b/src/pages/options/widgets/about.pug @@ -0,0 +1,18 @@ +doctype html + +img(src='./assets/images/libredirect.png') +| Libredirect Icon +img + +p + | Homepage - + a(href='https://libredirect.github.io/') https://libredirect.github.io +p + | FAQ - + a(href='https://libredirect.github.io/faq.html') https://libredirect.github.io/faq.html +p + | Docs - + a(href='https://libredirect.github.io/docs.html') https://libredirect.github.io/docs.html +p + | Github - + a(href='https://github.com/libredirect/libredirect') https://github.com/libredirect/libredirect diff --git a/src/pages/widgets/icons.pug b/src/pages/widgets/icons.pug index 89e207a..3810934 100644 --- a/src/pages/widgets/icons.pug +++ b/src/pages/widgets/icons.pug @@ -39,4 +39,8 @@ mixin general mixin unify svg(xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor") - path(d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z") \ No newline at end of file + path(d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z") + +mixin about + svg(xmlns='http://www.w3.org/2000/svg' height='48' width='48') + path(d='M22.65 34h3V22h-3ZM24 18.3q.7 0 1.175-.45.475-.45.475-1.15t-.475-1.2Q24.7 15 24 15q-.7 0-1.175.5-.475.5-.475 1.2t.475 1.15q.475.45 1.175.45ZM24 44q-4.1 0-7.75-1.575-3.65-1.575-6.375-4.3-2.725-2.725-4.3-6.375Q4 28.1 4 23.95q0-4.1 1.575-7.75 1.575-3.65 4.3-6.35 2.725-2.7 6.375-4.275Q19.9 4 24.05 4q4.1 0 7.75 1.575 3.65 1.575 6.35 4.275 2.7 2.7 4.275 6.35Q44 19.85 44 24q0 4.1-1.575 7.75-1.575 3.65-4.275 6.375t-6.35 4.3Q28.15 44 24 44Zm.05-3q7.05 0 12-4.975T41 23.95q0-7.05-4.95-12T24 7q-7.05 0-12.025 4.95Q7 16.9 7 24q0 7.05 4.975 12.025Q16.95 41 24.05 41ZM24 24Z') \ No newline at end of file diff --git a/src/pages/widgets/links.pug b/src/pages/widgets/links.pug index b2dca78..ed152c1 100644 --- a/src/pages/widgets/links.pug +++ b/src/pages/widgets/links.pug @@ -74,6 +74,9 @@ mixin links(service) +maps a(href="#maps" data-localise="__MSG_maps__") Maps - .title + .title +send - a(href="#sendTargets" data-localise="__MSG_sendFiles__") Send Files \ No newline at end of file + a(href="#sendTargets" data-localise="__MSG_sendFiles__") Send Files + .title + img(src="about", alt="") + a(href="about" data-localise="__MSG_about") About \ No newline at end of file From f2294d7da063e05ee81befb27173b791bccdc2c8 Mon Sep 17 00:00:00 2001 From: ManeraKai Date: Tue, 28 Jun 2022 10:31:34 +0300 Subject: [PATCH 2/2] fixing & refining About Page #368 --- src/pages/options/index.html | 31 ++++++++++++++++++++++++- src/pages/options/index.pug | 1 + src/pages/options/widgets/about.pug | 35 ++++++++++++++--------------- src/pages/popup/popup.html | 13 +++++++---- src/pages/popup/popup.js | 3 +-- src/pages/popup/popup.pug | 13 +++++++---- src/pages/stylesheets/styles.css | 9 ++++++++ src/pages/widgets/icons.pug | 4 ++-- src/pages/widgets/links.pug | 7 +++--- 9 files changed, 82 insertions(+), 34 deletions(-) diff --git a/src/pages/options/index.html b/src/pages/options/index.html index f438ad0..6d97cfa 100644 --- a/src/pages/options/index.html +++ b/src/pages/options/index.html @@ -50,11 +50,16 @@ Maps -
+ +
+ + + About +
@@ -1994,6 +1999,30 @@
+
+
+

About

+
+
+ +
diff --git a/src/pages/options/index.pug b/src/pages/options/index.pug index 9198c0f..553f918 100644 --- a/src/pages/options/index.pug +++ b/src/pages/options/index.pug @@ -31,5 +31,6 @@ html#elementToShowWithJavaScript(lang="en") include ./widgets/translate.pug include ./widgets/maps.pug include ./widgets/sendTargets.pug + include ./widgets/about.pug script(type="module" src="./index.js") \ No newline at end of file diff --git a/src/pages/options/widgets/about.pug b/src/pages/options/widgets/about.pug index 67897e7..954522b 100644 --- a/src/pages/options/widgets/about.pug +++ b/src/pages/options/widgets/about.pug @@ -1,18 +1,17 @@ -doctype html - -img(src='./assets/images/libredirect.png') -| Libredirect Icon -img - -p - | Homepage - - a(href='https://libredirect.github.io/') https://libredirect.github.io -p - | FAQ - - a(href='https://libredirect.github.io/faq.html') https://libredirect.github.io/faq.html -p - | Docs - - a(href='https://libredirect.github.io/docs.html') https://libredirect.github.io/docs.html -p - | Github - - a(href='https://github.com/libredirect/libredirect') https://github.com/libredirect/libredirect +section#about_page.option-block + .some-block.option-block + h1(data-localise="__MSG_about__") About + hr + .about + .some-block.option-block + h4 Donate: ♥️ + h4 https://libredirect.github.io/donate + .some-block.option-block + h4 FAQ: + h4 https://libredirect.github.io/faq + .some-block.option-block + h4 Docs: + h4 https://libredirect.github.io/docs + .some-block.option-block + h4 Source Code: + h4 https://libredirect.github.io/source_code \ No newline at end of file diff --git a/src/pages/popup/popup.html b/src/pages/popup/popup.html index 2b6c565..4030f0e 100644 --- a/src/pages/popup/popup.html +++ b/src/pages/popup/popup.html @@ -191,26 +191,31 @@
-
+ -
+ -
+ -
+ +
diff --git a/src/pages/popup/popup.js b/src/pages/popup/popup.js index a54c69a..e12e61e 100644 --- a/src/pages/popup/popup.js +++ b/src/pages/popup/popup.js @@ -51,7 +51,6 @@ utils.copyRaw(true).then(r => { copy_raw.addEventListener("click", () => utils.copyRaw(false, copy_raw)); } }) - document.getElementById("more-options").addEventListener("click", () => browser.runtime.openOptionsPage()); const allSites = document.getElementsByClassName('all_sites')[0]; @@ -323,7 +322,7 @@ document.addEventListener("change", () => { for (const a of document.getElementsByTagName('a')) { a.addEventListener('click', e => { - if (!a.classList.contains('button')) { + if (!a.classList.contains('prevent')) { browser.tabs.create({ url: a.getAttribute('href') }); e.preventDefault(); } diff --git a/src/pages/popup/popup.pug b/src/pages/popup/popup.pug index ce155e1..13eb66a 100644 --- a/src/pages/popup/popup.pug +++ b/src/pages/popup/popup.pug @@ -124,25 +124,30 @@ html(lang="en") +services hr #change_instance_div.some-block - a#change_instance.title.button + a#change_instance.title.button.prevent h4(data-localise="__MSG_switchInstance__") Change Instance +change_instance #copy_raw_div.some-block(title="Copy the original redirected link") - a#copy_raw.title.button + a#copy_raw.title.button.prevent h4(data-localise="__MSG_copyRaw__") Copy Raw +copy_raw #unify_div.some-block(title="Unify cookies across all selected instances") - a#unify.title.button + a#unify.title.button.prevent h4(data-localise="__MSG_unifySettings__") Unify Settings +unify .some-block - a#more-options.title.button + a#more-options.title.button.prevent h4(data-localise="__MSG_settings__") Settings +settings + .some-block + a#about.title.button(href="/pages/options/index.html#about") + h4(data-localise="__MSG_about__") About + +about + .space script(type="module" src="../options/init.js") diff --git a/src/pages/stylesheets/styles.css b/src/pages/stylesheets/styles.css index 0ef55da..67b0229 100644 --- a/src/pages/stylesheets/styles.css +++ b/src/pages/stylesheets/styles.css @@ -453,4 +453,13 @@ button { body div section { display: none; +} + +div.about > div{ + justify-content: start; + width: 520px; +} + +div.about h4 { + width: auto; } \ No newline at end of file diff --git a/src/pages/widgets/icons.pug b/src/pages/widgets/icons.pug index 3810934..cc77ad1 100644 --- a/src/pages/widgets/icons.pug +++ b/src/pages/widgets/icons.pug @@ -42,5 +42,5 @@ mixin unify path(d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z") mixin about - svg(xmlns='http://www.w3.org/2000/svg' height='48' width='48') - path(d='M22.65 34h3V22h-3ZM24 18.3q.7 0 1.175-.45.475-.45.475-1.15t-.475-1.2Q24.7 15 24 15q-.7 0-1.175.5-.475.5-.475 1.2t.475 1.15q.475.45 1.175.45ZM24 44q-4.1 0-7.75-1.575-3.65-1.575-6.375-4.3-2.725-2.725-4.3-6.375Q4 28.1 4 23.95q0-4.1 1.575-7.75 1.575-3.65 4.3-6.35 2.725-2.7 6.375-4.275Q19.9 4 24.05 4q4.1 0 7.75 1.575 3.65 1.575 6.35 4.275 2.7 2.7 4.275 6.35Q44 19.85 44 24q0 4.1-1.575 7.75-1.575 3.65-4.275 6.375t-6.35 4.3Q28.15 44 24 44Zm.05-3q7.05 0 12-4.975T41 23.95q0-7.05-4.95-12T24 7q-7.05 0-12.025 4.95Q7 16.9 7 24q0 7.05 4.975 12.025Q16.95 41 24.05 41ZM24 24Z') \ No newline at end of file + svg( xmlns="http://www.w3.org/2000/svg" height="24" width="24" fill="currentColor") + path( d="M11 17h2v-6h-2Zm1-8q.425 0 .713-.288Q13 8.425 13 8t-.287-.713Q12.425 7 12 7t-.712.287Q11 7.575 11 8t.288.712Q11.575 9 12 9Zm0 13q-2.075 0-3.9-.788-1.825-.787-3.175-2.137-1.35-1.35-2.137-3.175Q2 14.075 2 12t.788-3.9q.787-1.825 2.137-3.175 1.35-1.35 3.175-2.138Q9.925 2 12 2t3.9.787q1.825.788 3.175 2.138 1.35 1.35 2.137 3.175Q22 9.925 22 12t-.788 3.9q-.787 1.825-2.137 3.175-1.35 1.35-3.175 2.137Q14.075 22 12 22Zm0-2q3.35 0 5.675-2.325Q20 15.35 20 12q0-3.35-2.325-5.675Q15.35 4 12 4 8.65 4 6.325 6.325 4 8.65 4 12q0 3a.35 2.325 5.675Q8.65 20 12 20Zm0-8Z") \ No newline at end of file diff --git a/src/pages/widgets/links.pug b/src/pages/widgets/links.pug index ed152c1..cac2ecb 100644 --- a/src/pages/widgets/links.pug +++ b/src/pages/widgets/links.pug @@ -1,4 +1,4 @@ -include ../widgets/icons.pug +include ./icons.pug mixin links(service) section#links.links @@ -77,6 +77,7 @@ mixin links(service) .title +send a(href="#sendTargets" data-localise="__MSG_sendFiles__") Send Files + .title - img(src="about", alt="") - a(href="about" data-localise="__MSG_about") About \ No newline at end of file + +about + a(href="#about" data-localise="__MSG_about") About \ No newline at end of file