clckwrks-theme-bootstrap 0.4.2.1 → 0.4.2.2
raw patch · 3 files changed
+36/−45 lines, 3 filesdep ~clckwrksdep ~happstack-authenticatesetup-changed
Dependency ranges changed: clckwrks, happstack-authenticate
Files
- Setup.hs +1/−12
- Theme.hs +15/−10
- clckwrks-theme-bootstrap.cabal +20/−23
Setup.hs view
@@ -1,13 +1,2 @@-#!/usr/bin/env runghc--module Main where- import Distribution.Simple-import Distribution.Simple.Program--hsx2hsProgram = simpleProgram "hsx2hs"--main :: IO ()-main = defaultMainWithHooks simpleUserHooks {- hookedPrograms = [hsx2hsProgram]- }+main = defaultMain
Theme.hs view
@@ -34,13 +34,15 @@ genNavBar = do menu <- lift getNavBarData mName <- query GetSiteName- navBarHTML (fromMaybe "clckwrks" mName) menu+ openId <- query GetEnableOpenId+ navBarHTML (fromMaybe "clckwrks" mName) openId menu -- | helper function to generate a navigation bar from the navigation bar data navBarHTML :: T.Text -- ^ brand- -> NavBar -- ^ navigation bar links+ -> Bool -- ^ enable OpenId+ -> NavBar -- ^ navigation bar links -> GenXML (Clck ClckURL)-navBarHTML brand (NavBar menuItems) = [hsx|+navBarHTML brand enableOpenId (NavBar menuItems) = [hsx| <nav class="navbar navbar-default"> <div class="container-fluid"> -- Brand and toggle get grouped for better mobile display@@ -66,12 +68,9 @@ </span> -- navbar-text would make more sense than navbar-form, but it shifts the images funny. :-/- <span class="navbar-left navbar-btn" ng-controller="OpenIdCtrl" ng-show="!isAuthenticated">- <openid-google />- </span>- <span class="navbar-left navbar-btn" ng-controller="OpenIdCtrl" ng-show="!isAuthenticated">- <openid-yahoo />- </span>+ <% if enableOpenId+ then [openIdHtml] else []+ %> <span up-authenticated=True class="navbar-left navbar-text"> <a ng-click="logout()" href="">Logout {{claims.user.username}}</a>@@ -80,6 +79,12 @@ </div> -- /.container-fluid </nav> |]+ where+ openIdHtml =+ [hsx| <span class="navbar-left navbar-btn" ng-controller="OpenIdCtrl" ng-show="!isAuthenticated">+ <openid-yahoo />+ </span>+ |] mkNavBarItem :: NavBarItem -> GenXML (Clck ClckURL) mkNavBarItem (NBLink (NamedLink ttl lnk)) =@@ -96,7 +101,7 @@ -> XMLGenT (ClckT ClckURL (ServerPartT IO)) XML defaultTemplate ttl hdr bdy = do p <- plugins <$> get- (Just authRouteFn) <- getPluginRouteFn p (pluginName authenticatePlugin)+ ~(Just authRouteFn) <- getPluginRouteFn p (pluginName authenticatePlugin) [hsx| <html> <head>
clckwrks-theme-bootstrap.cabal view
@@ -1,5 +1,5 @@ name: clckwrks-theme-bootstrap-version: 0.4.2.1+version: 0.4.2.2 synopsis: simple bootstrap based template for clckwrks description: A simple bootstrap based theme for clckwrks. homepage: http://www.clckwrks.com/@@ -8,27 +8,27 @@ author: Jeremy Shaw maintainer: jeremy@n-heptane.com category: Clckwrks-build-type: Custom+build-type: Simple cabal-version: >=1.8 extra-source-files: README.md-Tested-With: GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1+Tested-With: GHC == 8.0.1, GHC == 8.6.5, GHC == 8.8.1 data-files:- data/js/npm.js- data/js/bootstrap.min.js- data/js/bootstrap.js- data/css/bootstrap.css.map- data/css/bootstrap.css- data/css/hscolour.css- data/css/bootstrap-theme.min.css- data/css/bootstrap-theme.css.map- data/css/bootstrap-theme.css- data/css/bootstrap.min.css- data/fonts/glyphicons-halflings-regular.eot- data/fonts/glyphicons-halflings-regular.svg- data/fonts/glyphicons-halflings-regular.woff- data/fonts/glyphicons-halflings-regular.ttf- data/fonts/glyphicons-halflings-regular.woff2+ data/js/npm.js+ data/js/bootstrap.min.js+ data/js/bootstrap.js+ data/css/bootstrap.css.map+ data/css/bootstrap.css+ data/css/hscolour.css+ data/css/bootstrap-theme.min.css+ data/css/bootstrap-theme.css.map+ data/css/bootstrap-theme.css+ data/css/bootstrap.min.css+ data/fonts/glyphicons-halflings-regular.eot+ data/fonts/glyphicons-halflings-regular.svg+ data/fonts/glyphicons-halflings-regular.woff+ data/fonts/glyphicons-halflings-regular.ttf+ data/fonts/glyphicons-halflings-regular.woff2 source-repository head type: darcs@@ -36,15 +36,12 @@ location: http://hub.darcs.net/stepcut/clckwrks library- build-tools:- hsx2hs- exposed-modules: Theme Paths_clckwrks_theme_bootstrap build-depends: base > 4 && <5,- clckwrks >= 0.23 && < 0.25,+ clckwrks >= 0.23 && < 0.26, jmacro,- happstack-authenticate >= 2.0 && < 2.4,+ happstack-authenticate >= 2.0 && < 2.5, hsp >= 0.9 && < 0.11, hsx-jmacro, hsx2hs,