added copyright notice

This commit is contained in:
nek0 2015-09-17 21:54:04 +02:00
parent d00eedcbab
commit f2e6098199
6 changed files with 16 additions and 5 deletions

View file

@ -121,7 +121,8 @@ instance Yesod App where
-- default-layout-wrapper is the entire page. Since the final
-- value passed to hamletToRepHtml cannot be a widget, this allows
-- you to use normal widget features in default-layout.
copyrightWidget <- widgetToPageContent $
$(widgetFile "copyright")
pc <- widgetToPageContent $ do
$(combineStylesheets 'StaticR
[ css_bootstrap_css

View file

@ -67,12 +67,15 @@ data AppSettings = AppSettings
-- ^ Copyright text to appear in the footer of the page
, appAnalytics :: Maybe Text
-- ^ Google Analytics code
, appEmail :: Text
, appEmail :: Text
-- ^ notification address
, appCurrency :: Text
-- ^ Currency character
, appCashCharge :: Int
-- ^ Extra charge for paying in cash in cents
, appCopyright :: Text
, appCopyrightLink :: Text
-- ^ Text and link to source
}
instance FromJSON AppSettings where
@ -96,11 +99,12 @@ instance FromJSON AppSettings where
appMutableStatic <- o .:? "mutable-static" .!= defaultDev
appSkipCombining <- o .:? "skip-combining" .!= defaultDev
-- appCopyright <- o .: "copyright"
appAnalytics <- o .:? "analytics"
appEmail <- o .: "email"
appCurrency <- o .: "currency"
appCashCharge <- o .: "cash_charge"
appCopyright <- o .: "copyright"
appCopyrightLink <- o .: "copyright_link"
return AppSettings {..}

View file

@ -29,3 +29,6 @@ database:
email: "nek0@momen"
currency: "€"
cash_charge: 50
copyright: "Powered by YAMMAT"
copyright_link: "https://github.com/nek0/yammat"

View file

@ -27,7 +27,7 @@
.right {
display: inline-block;
/*float: right;*/
float: right;
padding: 2em;
}
@ -131,7 +131,7 @@ footer {
margin-top: 1em;
}
footer a {
footer span a {
margin-top: 1em;
display: inline-block;
position: relative;

View file

@ -0,0 +1 @@
<a href=#{appCopyrightLink $ appSettings master} target=_blank>#{appCopyright $ appSettings master}

View file

@ -30,3 +30,5 @@
<a href=@{SummaryR}>_{MsgSummary}
<span>
<a href=@{AvatarR}>_{MsgAvatars}
<div .right>
^{pageBody copyrightWidget}