From d144c01b6759d35d5652aba41d935b4c04b5dc07 Mon Sep 17 00:00:00 2001 From: oyenuga17 <64274826+oyenuga17@users.noreply.github.com> Date: Mon, 12 Feb 2024 12:01:15 +0100 Subject: [PATCH] Implement dark mode on install, papers, logos and page.eml (-carbon footprint -privacy -code of conduct pages) (#2032) * implement dark mode and redesign on papers * implement darkmode on logos and page.eml (-carbon footprint, -privacy -code of conduct pages) * adjust styles * implement dark mode on install Ocaml * corrections * more correction * update tag background color dark mode --------- Co-authored-by: sabine --- .../policies/logos/OCaml_Sticker_darkmode.svg | 116 ++++++++++++++++++ src/ocamlorg_frontend/css/partials/tags.css | 2 +- src/ocamlorg_frontend/css/styles.css | 5 + src/ocamlorg_frontend/pages/install.eml | 21 ++-- src/ocamlorg_frontend/pages/logos.eml | 18 +-- src/ocamlorg_frontend/pages/page.eml | 14 +-- src/ocamlorg_frontend/pages/papers.eml | 52 ++++---- tailwind.config.js | 1 + 8 files changed, 181 insertions(+), 48 deletions(-) create mode 100644 asset/policies/logos/OCaml_Sticker_darkmode.svg diff --git a/asset/policies/logos/OCaml_Sticker_darkmode.svg b/asset/policies/logos/OCaml_Sticker_darkmode.svg new file mode 100644 index 0000000000..98d3dc20f2 --- /dev/null +++ b/asset/policies/logos/OCaml_Sticker_darkmode.svg @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ocamlorg_frontend/css/partials/tags.css b/src/ocamlorg_frontend/css/partials/tags.css index e7cf7fbea6..362d8a5fed 100644 --- a/src/ocamlorg_frontend/css/partials/tags.css +++ b/src/ocamlorg_frontend/css/partials/tags.css @@ -1,3 +1,3 @@ .tag { - @apply text-blue-500 h-8 inline-flex items-center text-sm px-3 border border-blue-500 rounded-3xl mr-2 mb-2 whitespace-nowrap; + @apply text-primary dark:text-dark-primary h-8 inline-flex items-center text-sm px-3 border border-primary dark:border-dark-primary bg-primary_25 dark:bg-dark-primary_10 rounded-md mr-2 mb-2 whitespace-nowrap; } \ No newline at end of file diff --git a/src/ocamlorg_frontend/css/styles.css b/src/ocamlorg_frontend/css/styles.css index 50a8389782..24fc59f6ce 100644 --- a/src/ocamlorg_frontend/css/styles.css +++ b/src/ocamlorg_frontend/css/styles.css @@ -136,6 +136,11 @@ body { padding: 0.2rem 0rem; } +.dark :is(h1:target, h2:target, h3:target, h4:target, h5:target, h6:target) { + background:#003357; + padding: 0.2rem 0rem; +} + .prose :is(h1, h2, h3, h4, h5, h6)[id]:hover::before { content: " "; @apply absolute top-0 h-full border-l-4 border-gray-400 -ml-3; diff --git a/src/ocamlorg_frontend/pages/install.eml b/src/ocamlorg_frontend/pages/install.eml index e11da4cf48..daa4d93419 100644 --- a/src/ocamlorg_frontend/pages/install.eml +++ b/src/ocamlorg_frontend/pages/install.eml @@ -6,17 +6,24 @@ Layout.render ~canonical:"" @@
-
-

+
+

Install OCaml

-
+ +
+% let render_multi_button ~title ~active_tab ~class_ = + +% in + <% render_multi_button ~title:"Linux, macOS or *BSD" ~active_tab:"linux_mac_bsd" ~class_:"rounded-l rounded-l-lg border-r-0"; %> + <% render_multi_button ~title:"Windows" ~active_tab:"win" ~class_:"rounded-r rounded-r-lg"; %> +
-
+

If you need more explicit instructions than provided on this quick-install page, you can find a more detailed explanation of the installation process here.

@@ -25,7 +32,7 @@ Layout.render
-
+

Install OCaml on Linux, macOS, or *BSD

@@ -89,7 +96,7 @@ Layout.render

Congratulations, you have now installed OCaml!

-
+

Set Up an OCaml Development Environment

@@ -107,7 +114,7 @@ Layout.render

-
+

Install OCaml on Windows

diff --git a/src/ocamlorg_frontend/pages/logos.eml b/src/ocamlorg_frontend/pages/logos.eml index 7b0d21d660..3034cd211e 100644 --- a/src/ocamlorg_frontend/pages/logos.eml +++ b/src/ocamlorg_frontend/pages/logos.eml @@ -3,21 +3,21 @@ Layout.render ~title:"OCaml Logos" ~description:"Here are some of the logos related to the OCaml programming language." ~canonical:Url.about @@ -
+
-
-

The OCaml Logo

-

Brand Guidelines | Assets | License

+
+

The OCaml Logo

+

Brand Guidelines | Assets | License

-
+
-
+

Brand Guidelines

@@ -29,14 +29,16 @@ Layout.render

The logo should be linked to the OCaml website, ocaml.org. The logo is available in several formats and colors (e.g. adapt the width or change the part after logo/ to match the one of the file you want in the repository).

- " alt="logo-with-name"> + " alt="logo-with-name"> + " alt="OCaml">

svg | png | jpg | more

The following SVG file is suitable to make stickers. It is released under the same liberal license as the logo so do not hesitate to print your own stickers to promote OCaml!

- " alt="logo"> + " alt="logo"> + " alt="OCaml">

svg |

diff --git a/src/ocamlorg_frontend/pages/page.eml b/src/ocamlorg_frontend/pages/page.eml index a6c3ca1618..29b0541139 100644 --- a/src/ocamlorg_frontend/pages/page.eml +++ b/src/ocamlorg_frontend/pages/page.eml @@ -1,17 +1,17 @@ let render ~title ~description ~meta_title ~meta_description ~content ~canonical = Layout.render ~title:meta_title ~description:meta_description ~canonical @@ -
+
-
-

<%s! title %>

-

<%s! description %>

+
+

<%s! title %>

+

<%s! description %>

-
-
+
+
-
+
<%s! content %>
diff --git a/src/ocamlorg_frontend/pages/papers.eml b/src/ocamlorg_frontend/pages/papers.eml index 5e90a041b7..b6a953bfca 100644 --- a/src/ocamlorg_frontend/pages/papers.eml +++ b/src/ocamlorg_frontend/pages/papers.eml @@ -4,39 +4,39 @@ Layout.render ~description:"A selection of papers grouped by popular categories." ~canonical:Url.papers ~active_top_nav_item:Header.Learn @@ -
+
-
-

Papers

-

+

+

Papers

+

With its strong academic roots, OCaml is known to be a spearhead in the development of Programming Language Theory. This page contains a selection of papers that have influenced OCaml and other functional programming languages.

-