mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +01:00
data-theme should follow the theme
This commit is contained in:
parent
af1781dcd0
commit
d5a7653393
2 changed files with 5 additions and 2 deletions
|
@ -20,7 +20,7 @@ html lang="en"
|
|||
= csrf_meta_tag()
|
||||
script type="text/javascript" src=Routes.static_path(@conn, "/js/app.js") async="async"
|
||||
= render PhilomenaWeb.LayoutView, "_opengraph.html", assigns
|
||||
body data-theme="default"
|
||||
body data-theme=theme_name(@current_user)
|
||||
= render PhilomenaWeb.LayoutView, "_burger.html", assigns
|
||||
#container class=container_class(@current_user)
|
||||
= render PhilomenaWeb.LayoutView, "_header.html", assigns
|
||||
|
@ -28,4 +28,4 @@ html lang="en"
|
|||
main#content class=layout_class(@conn)
|
||||
= render @view_module, @view_template, assigns
|
||||
= render PhilomenaWeb.LayoutView, "_footer.html", assigns
|
||||
= clientside_data(@conn)
|
||||
= clientside_data(@conn)
|
||||
|
|
|
@ -74,6 +74,9 @@ defmodule PhilomenaWeb.LayoutView do
|
|||
def stylesheet_path(conn, _user),
|
||||
do: Routes.static_path(conn, "/css/default.css")
|
||||
|
||||
def theme_name(%{theme: theme}), do: theme
|
||||
def theme_name(_user), do: "default"
|
||||
|
||||
def artist_tags(tags),
|
||||
do: Enum.filter(tags, & &1.namespace == "artist")
|
||||
|
||||
|
|
Loading…
Reference in a new issue