Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement dark mode on releases, industrial users, academic users, why ocaml pages #2008

Merged
merged 13 commits into from
Feb 6, 2024
2 changes: 1 addition & 1 deletion asset/logos/janestreet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions asset/logos/old-twitter-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions src/ocamlorg_frontend/css/partials/bg_sections.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,19 @@
background: linear-gradient(45deg, #022E50, #0063A8);
@apply border-none;
}

.intro-section-simple {
background: url("/img/innerbottombg.png") left bottom no-repeat, url("/img/innertopbg.png") right top no-repeat;
@apply pt-16 pb-16 bg-sand;
}

.dark-intro-section-simple {
background: linear-gradient(45deg, #010105, #10162D);
@apply pt-16 pb-16;
}

.dark-section-navigation {
background: none;
@apply pt-16 pb-16 bg-dark-background_navigation;
}
}
10 changes: 5 additions & 5 deletions src/ocamlorg_frontend/css/partials/buttons.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@layer components {
.btn {
@apply rounded bg-primary border border-primary font-normal text-lg text-white whitespace-nowrap transition-colors inline-flex items-center justify-center space-x-3 dark:border-dark-primary dark:bg-dark-primary dark:text-white;
@apply rounded bg-primary border border-primary font-normal text-lg text-white whitespace-nowrap transition-colors inline-flex items-center justify-center space-x-3 dark:border-dark-primary dark:bg-dark-primary dark:text-dark-white;
}

.btn {
Expand Down Expand Up @@ -56,20 +56,20 @@
}

.btn-ghost:active {
@apply text-white bg-primary_dark;
@apply text-white bg-primary_dark;
}


/* TODO: remove when no longer in use */
.btn-legacy-tertiary {
@apply bg-transparent border border-white text-white;
@apply bg-transparent border border-white dark:border-dark-white text-white dark:text-dark-white;
}

.btn-legacy-tertiary:hover {
@apply bg-legacy-default dark:bg-legacy-dark-default bg-opacity-10 border-white;
@apply bg-content dark:bg-dark-content bg-opacity-10 border-white dark:border-dark-white;
}

.btn-legacy-tertiary:active {
@apply bg-legacy-default dark:bg-legacy-dark-default bg-opacity-20;
@apply bg-content dark:bg-dark-content bg-opacity-10;
}
}
6 changes: 5 additions & 1 deletion src/ocamlorg_frontend/css/partials/cards.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@layer utilities {
.resources-card {
@apply rounded-xl py-12 px-8 text-white bg-opacity-5 bg-legacy-default dark:bg-legacy-dark-default transform hover:scale-105 transition-transform;
@apply rounded-xl py-4 px-4 text-white dark:text-dark-white bg-opacity-5 bg-white dark:bg-dark-background transform hover:scale-105 transition-transform;
}

.legacy-card-hover {
Expand All @@ -14,4 +14,8 @@
.dark-card {
@apply bg-dark-card hover:bg-dark-card_hover hover:outline outline-[3px] hover:outline-dark-primary hover:shadow-[0px_0px_12px_0px_#00000050] rounded-2xl border;
}

.dark-inverted-card {
@apply bg-white hover:outline outline-[3px] hover:outline-dark-primary hover:shadow-[0px_0px_12px_0px_#00000050] rounded-2xl border;
}
}
3 changes: 1 addition & 2 deletions src/ocamlorg_frontend/css/partials/grid_logos.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
}

.grid-logos > a {
border-bottom: 1px solid #dfdfdf;
border-right: 1px solid #dfdfdf;
@apply border-b border-r border-solid border-separator_20 dark:border-dark-separator_30
}

@media (min-width: 1024px) {
Expand Down
9 changes: 0 additions & 9 deletions src/ocamlorg_frontend/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,6 @@ body {
background: #a72f2014;
}

.intro-section-simple {
background: url("/img/innerbottombg.png") left bottom no-repeat, url("/img/innertopbg.png") right top no-repeat;
@apply pt-48 pb-24;
}

.intro-section-simple p {
@apply text-legacy-lighter lg:text-lg;
}

.divider span {
width: 7px;
height: 7px;
Expand Down
20 changes: 10 additions & 10 deletions src/ocamlorg_frontend/pages/about.eml
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,47 @@ Layout.render
~title:"Why OCaml?"
~description:"OCaml is a mature, statically-typed, functional programming language. Learn more about its rich history and what makes it unique."
~canonical:Url.about @@
<div class="intro-section-simple">
<div class="intro-section-simple dark:dark-intro-section-simple">
<div class="container-fluid">
<div class="text-center w-full lg:w-2/3 m-auto">
<h1 class="font-bold mb-6">Why OCaml?</h1>
<h1 class="font-bold mb-6 text-title dark:text-dark-title">Why OCaml?</h1>
<div class="flex items-center justify-center space-x-8 mt-11 lg:space-x-24">
<div>
<a
class="hover:text-primary rounded-lg hover:bg-legacy-primary-100 h-28 w-28 inline-block transition-colors"
class="hover:text-primary dark:hover:text-dark-primary hover:bg-primary_25 dark:hover:bg-dark-primary_20 rounded-lg h-28 w-28 inline-block transition-colors"
href="#strength"
>
<%s! Icons.lightning "h-10 w-10 mb-4 m-auto mt-6" %>
<div class="font-semibold text-lg">Strengths</div>
<div class="font-semibold text-lg text-content dark:text-dark-content">Strengths</div>
</a>
</div>
<div>
<a
class="hover:text-primary h-28 w-28 rounded-lg hover:bg-legacy-primary-100 inline-block transition-colors"
class="hover:text-primary dark:hover:text-dark-primary hover:bg-primary_25 dark:hover:bg-dark-primary_20 h-28 w-28 rounded-lg inline-block transition-colors"
href="#history"
>
<%s! Icons.clock "h-10 w-10 mb-4 m-auto mt-6" %>
<div class="font-semibold text-lg">History</div>
<div class="font-semibold text-lg text-content dark:text-dark-content">History</div>
</a>
</div>
<div>
<a
class="hover:text-primary h-28 w-28 rounded-lg hover:bg-legacy-primary-100 inline-block transition-colors"
class="hover:text-primary dark:hover:text-dark-primary hover:bg-primary_25 dark:hover:bg-dark-primary_20 h-28 w-28 rounded-lg inline-block transition-colors"
href="#features"
>
<%s! Icons.features "h-10 w-10 mb-4 m-auto mt-6" %>
<div class="font-semibold text-lg">Features</div>
<div class="font-semibold text-lg text-content dark:text-dark-content">Features</div>
</a>
</div>
</div>
</div>
</div>
</div>

<div class="bg-legacy-default dark:bg-legacy-dark-default">
<div class="bg-white dark:bg-dark-background">
<div class="py-10 lg:py-28">
<div class="container-fluid">
<div class="prose lg:prose-lg mx-auto max-w-5xl">
<div class="prose dark:prose-invert lg:prose-lg mx-auto max-w-5xl">
<h2 id="strength">Why OCaml?</h2>
<div class="space-y-10">
<p>
Expand Down
Loading
Loading