mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-24 04:27:59 +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
|
||||
|
|
|
@ -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