Add a site-wide title
This commit is contained in:
parent
b0d997dabc
commit
3d4c21e18e
3 changed files with 11 additions and 12 deletions
|
@ -31,4 +31,5 @@ database:
|
||||||
database: "_env:MYSQL_DATABASE:lebd"
|
database: "_env:MYSQL_DATABASE:lebd"
|
||||||
poolsize: "_env:MYSQL_POOLSIZE:10"
|
poolsize: "_env:MYSQL_POOLSIZE:10"
|
||||||
|
|
||||||
|
title: 00dani.me
|
||||||
#analytics: UA-YOURCODE
|
#analytics: UA-YOURCODE
|
||||||
|
|
|
@ -62,6 +62,8 @@ data AppSettings = AppSettings
|
||||||
-- Example app-specific configuration values.
|
-- Example app-specific configuration values.
|
||||||
, appAnalytics :: Maybe Text
|
, appAnalytics :: Maybe Text
|
||||||
-- ^ Google Analytics code
|
-- ^ Google Analytics code
|
||||||
|
, appTitle :: Maybe Text
|
||||||
|
-- ^ Site-wide title.
|
||||||
|
|
||||||
, appAuthDummyLogin :: Bool
|
, appAuthDummyLogin :: Bool
|
||||||
-- ^ Indicate if auth dummy login should be enabled.
|
-- ^ Indicate if auth dummy login should be enabled.
|
||||||
|
@ -91,6 +93,7 @@ instance FromJSON AppSettings where
|
||||||
appSkipCombining <- o .:? "skip-combining" .!= defaultDev
|
appSkipCombining <- o .:? "skip-combining" .!= defaultDev
|
||||||
|
|
||||||
appAnalytics <- o .:? "analytics"
|
appAnalytics <- o .:? "analytics"
|
||||||
|
appTitle <- o .:? "title"
|
||||||
|
|
||||||
-- This code enables MySQL's strict mode, without which MySQL will truncate data.
|
-- This code enables MySQL's strict mode, without which MySQL will truncate data.
|
||||||
-- See https://github.com/yesodweb/persistent/wiki/Database-Configuration#strict-mode for details
|
-- See https://github.com/yesodweb/persistent/wiki/Database-Configuration#strict-mode for details
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
|
|
||||||
<!-- Static navbar -->
|
<!-- Static navbar -->
|
||||||
<nav .navbar.navbar-default.navbar-static-top>
|
<nav .navbar.navbar-default.navbar-static-top>
|
||||||
<div .container>
|
<div .container>
|
||||||
<div .navbar-header>
|
<div .navbar-header>
|
||||||
<button type="button" .navbar-toggle.collapsed data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
<button type="button" .navbar-toggle.collapsed data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||||
<span class="sr-only">Toggle navigation</span>
|
<span .sr-only>Toggle navigation
|
||||||
<span class="icon-bar"></span>
|
<span .icon-bar>
|
||||||
<span class="icon-bar"></span>
|
<span .icon-bar>
|
||||||
<span class="icon-bar"></span>
|
<span .icon-bar>
|
||||||
|
$maybe title <- appTitle $ appSettings master
|
||||||
|
<a class="navbar-brand" href="@{HomeR}">#{title}
|
||||||
|
|
||||||
<div #navbar .collapse.navbar-collapse>
|
<div #navbar .collapse.navbar-collapse>
|
||||||
<ul .nav.navbar-nav>
|
<ul .nav.navbar-nav>
|
||||||
|
@ -21,7 +22,6 @@
|
||||||
<a href="@{route}">#{label}
|
<a href="@{route}">#{label}
|
||||||
|
|
||||||
<!-- Page Contents -->
|
<!-- Page Contents -->
|
||||||
|
|
||||||
<div .container>
|
<div .container>
|
||||||
$if not $ Just HomeR == mcurrentRoute
|
$if not $ Just HomeR == mcurrentRoute
|
||||||
<ul .breadcrumb>
|
<ul .breadcrumb>
|
||||||
|
@ -35,12 +35,7 @@
|
||||||
<div .alert.alert-info #message>#{msg}
|
<div .alert.alert-info #message>#{msg}
|
||||||
|
|
||||||
|
|
||||||
$if (Just HomeR == mcurrentRoute)
|
<main>
|
||||||
^{widget}
|
|
||||||
$else
|
|
||||||
<div .container>
|
|
||||||
<div .row>
|
|
||||||
<div .col-md-12>
|
|
||||||
^{widget}
|
^{widget}
|
||||||
|
|
||||||
<!-- Footer -->
|
<!-- Footer -->
|
||||||
|
|
Loading…
Reference in a new issue