feat: Adds dark theme support for public portal [CW-2525] (#7979)

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
This commit is contained in:
Nithin David Thomas
2023-10-04 11:56:00 +05:30
committed by GitHub
parent 6a73953003
commit b71a580573
20 changed files with 178 additions and 80 deletions

View File

@@ -28,8 +28,8 @@ By default, it renders:
<% end %>
</head>
<body>
<div class="antialiased">
<main class="main-content min-h-screen flex flex-col" role="main">
<div class="antialiased <%= @theme %>">
<main class="main-content min-h-screen flex flex-col bg-white dark:bg-slate-900" role="main">
<% if !@is_plain_layout_enabled %>
<%= render "public/api/v1/portals/header", portal: @portal %>
<% end %>
@@ -40,6 +40,11 @@ By default, it renders:
</main>
</div>
</body>
<style>
:root {
color-scheme: '<%= @theme %>';
}
</style>
<script>
window.portalConfig = {
portalSlug: '<%= @portal.slug %>',