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 -- default-layout-wrapper is the entire page. Since the final
-- value passed to hamletToRepHtml cannot be a widget, this allows -- value passed to hamletToRepHtml cannot be a widget, this allows
-- you to use normal widget features in default-layout. -- you to use normal widget features in default-layout.
copyrightWidget <- widgetToPageContent $
$(widgetFile "copyright")
pc <- widgetToPageContent $ do pc <- widgetToPageContent $ do
$(combineStylesheets 'StaticR $(combineStylesheets 'StaticR
[ css_bootstrap_css [ css_bootstrap_css

View file

@ -73,6 +73,9 @@ data AppSettings = AppSettings
-- ^ Currency character -- ^ Currency character
, appCashCharge :: Int , appCashCharge :: Int
-- ^ Extra charge for paying in cash in cents -- ^ Extra charge for paying in cash in cents
, appCopyright :: Text
, appCopyrightLink :: Text
-- ^ Text and link to source
} }
instance FromJSON AppSettings where instance FromJSON AppSettings where
@ -96,11 +99,12 @@ instance FromJSON AppSettings where
appMutableStatic <- o .:? "mutable-static" .!= defaultDev appMutableStatic <- o .:? "mutable-static" .!= defaultDev
appSkipCombining <- o .:? "skip-combining" .!= defaultDev appSkipCombining <- o .:? "skip-combining" .!= defaultDev
-- appCopyright <- o .: "copyright"
appAnalytics <- o .:? "analytics" appAnalytics <- o .:? "analytics"
appEmail <- o .: "email" appEmail <- o .: "email"
appCurrency <- o .: "currency" appCurrency <- o .: "currency"
appCashCharge <- o .: "cash_charge" appCashCharge <- o .: "cash_charge"
appCopyright <- o .: "copyright"
appCopyrightLink <- o .: "copyright_link"
return AppSettings {..} return AppSettings {..}

View file

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

View file

@ -27,7 +27,7 @@
.right { .right {
display: inline-block; display: inline-block;
/*float: right;*/ float: right;
padding: 2em; padding: 2em;
} }
@ -131,7 +131,7 @@ footer {
margin-top: 1em; margin-top: 1em;
} }
footer a { footer span a {
margin-top: 1em; margin-top: 1em;
display: inline-block; display: inline-block;
position: relative; 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} <a href=@{SummaryR}>_{MsgSummary}
<span> <span>
<a href=@{AvatarR}>_{MsgAvatars} <a href=@{AvatarR}>_{MsgAvatars}
<div .right>
^{pageBody copyrightWidget}