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"
|
||||
poolsize: "_env:MYSQL_POOLSIZE:10"
|
||||
|
||||
title: 00dani.me
|
||||
#analytics: UA-YOURCODE
|
||||
|
|
|
@ -62,6 +62,8 @@ data AppSettings = AppSettings
|
|||
-- Example app-specific configuration values.
|
||||
, appAnalytics :: Maybe Text
|
||||
-- ^ Google Analytics code
|
||||
, appTitle :: Maybe Text
|
||||
-- ^ Site-wide title.
|
||||
|
||||
, appAuthDummyLogin :: Bool
|
||||
-- ^ Indicate if auth dummy login should be enabled.
|
||||
|
@ -91,6 +93,7 @@ instance FromJSON AppSettings where
|
|||
appSkipCombining <- o .:? "skip-combining" .!= defaultDev
|
||||
|
||||
appAnalytics <- o .:? "analytics"
|
||||
appTitle <- o .:? "title"
|
||||
|
||||
-- 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
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
|
||||
<!-- Static navbar -->
|
||||
<nav .navbar.navbar-default.navbar-static-top>
|
||||
<div .container>
|
||||
<div .navbar-header>
|
||||
<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 class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span .sr-only>Toggle navigation
|
||||
<span .icon-bar>
|
||||
<span .icon-bar>
|
||||
<span .icon-bar>
|
||||
$maybe title <- appTitle $ appSettings master
|
||||
<a class="navbar-brand" href="@{HomeR}">#{title}
|
||||
|
||||
<div #navbar .collapse.navbar-collapse>
|
||||
<ul .nav.navbar-nav>
|
||||
|
@ -21,7 +22,6 @@
|
|||
<a href="@{route}">#{label}
|
||||
|
||||
<!-- Page Contents -->
|
||||
|
||||
<div .container>
|
||||
$if not $ Just HomeR == mcurrentRoute
|
||||
<ul .breadcrumb>
|
||||
|
@ -35,12 +35,7 @@
|
|||
<div .alert.alert-info #message>#{msg}
|
||||
|
||||
|
||||
$if (Just HomeR == mcurrentRoute)
|
||||
^{widget}
|
||||
$else
|
||||
<div .container>
|
||||
<div .row>
|
||||
<div .col-md-12>
|
||||
<main>
|
||||
^{widget}
|
||||
|
||||
<!-- Footer -->
|
||||
|
|
Loading…
Reference in a new issue