--- a/base/resources/public/css/site.css Tue Dec 04 13:18:02 2018 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +0,0 @@
-/*
- * SQWL colors:
- * - green: #006634 / #00532b / #008745
- * - red: #e94e1b
- * - brown: #693e11 / #482500 / #9a744c / #eedece
- */
-
-body {
- color: #693e11;
-}
-
-h1, h2, h3, a {
- color: #006634;
-}
-
-small, h4 small {
- color: #693e11;
-}
-
-.col-centered{
- float: none;
- margin: 0 auto;
-}
-
-.jumbotron {
- background-color: #eedece;
-}
-
-.panel-title, .navbar-default .navbar-nav>li>a {
- color: #006634;
-}
-
-.panel-default {
- border-color: #9a744c;
-}
-
-.panel-default>.panel-heading {
- background-color: #eedece;
- border-color: #9a744c;
- color: #693e11;
-}
-
-.panel-default>.panel-heading+.panel-collapse>.panel-body {
- border-top-color: #9a744c;
-}
-
-.panel-group .panel-heading+.panel-collapse>.list-group,
-.panel-group .panel-heading+.panel-collapse>.panel-body {
- border-top-color: #9a744c;
-}
-
-.panel-footer {
- background-color: #eedece;
- border-color: #9a744c;
-}
-
-.nav-tabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover,
-.dropdown-menu>li>a {
- color: #693e11;
-}
-
-.navbar-brand {
- font-size: 32px;
-}
-
-.navbar-default {
- background-color: #eedece;
- border-color: #9a744c;
-}
-
-.navbar-section {
- font-size: 24px;
-}
-
-.dropdown-menu>.active>a, .dropdown-menu>.active>a:focus, .dropdown-menu>.active>a:hover {
- background-color: #006634;
-}
-
-.btn-default {
- border-color: #9a744c;
- color: #693e11;
- outline-color: #9a744c;
-}
-
-.btn-default.active, .btn-default.focus,
-.btn-default:active, .btn-default:focus, .btn-default:hover {
- background-color: #eedece;
- border-color: #9a744c;
- color: #693e11;
- outline-color: #9a744c;
-}
-
-.btn-default.disabled, .btn-default.disabled.active, .btn-default.disabled.focus,
-.btn-default.disabled:active, .btn-default.disabled:focus,
-.btn-default.disabled:hover, .btn-default[disabled], .btn-default[disabled].active,
-.btn-default[disabled].focus, .btn-default[disabled]:active,
-.btn-default[disabled]:focus, .btn-default[disabled]:hover,
-fieldset[disabled] .btn-default, fieldset[disabled] .btn-default.active,
-fieldset[disabled] .btn-default.focus, fieldset[disabled] .btn-default:active,
-fieldset[disabled] .btn-default:focus, fieldset[disabled] .btn-default:hover {
- background-color: #eedece;
- border-color: #9a744c;
- color: #693e11;
-}
-
-.btn-primary {
- background-color: #006634;
- border-color: #00532b;
- outline-color: #00532b;
-}
-
-.btn-primary.active, .btn-primary.focus,
-.btn-primary:active, .btn-primary:focus, .btn-primary:hover {
- background-color: #693e11;
- border-color: #482500;
- outline-color: #482500;
-}
-
-.btn-primary.disabled, .btn-primary.disabled.active, .btn-primary.disabled.focus,
-.btn-primary.disabled:active, .btn-primary.disabled:focus,
-.btn-primary.disabled:hover, .btn-primary[disabled], .btn-primary[disabled].active,
-.btn-primary[disabled].focus, .btn-primary[disabled]:active,
-.btn-primary[disabled]:focus, .btn-primary[disabled]:hover,
-fieldset[disabled] .btn-primary, fieldset[disabled] .btn-primary.active,
-fieldset[disabled] .btn-primary.focus, fieldset[disabled] .btn-primary:active,
-fieldset[disabled] .btn-primary:focus, fieldset[disabled] .btn-primary:hover {
- background-color: #008745;
- border-color: #00532b;
-}
-
-hr {
- border-top-color: #eedece;
-}
-
-.modal-header {
- border-bottom-color: #eedece;
-}
-
-div.modal-content a {
- cursor: pointer;
-}
-
-a.link {
- cursor: pointer;
-}
-
-/* SVG */
-svg g text {
- cursor: default;
-}
-
-svg g text.legend {
- font-family: sans-serif;
- font-size: 11px;
- fill: #111;
-}
-
-svg g line.level {
- stroke: grey;
- stroke-opacity: 0.75;
- stroke-width: 0.3px;
-}
-
-svg g line.level.level-val-100 {
- stroke: #693e11;
- stroke-width: 2px;
-}
Binary file base/resources/public/images/icon.png has changed
--- a/base/src/sqwl/cms/Layout.scala Tue Dec 04 13:18:02 2018 +0100
+++ b/base/src/sqwl/cms/Layout.scala Thu Dec 06 13:27:14 2018 +0100
@@ -12,10 +12,10 @@
lazy val bootstrapCss = s"/${http.prefix}/assets/bootstrap/${versions.bootstrap}/css/bootstrap.min.css"
lazy val bootstrapJs = s"/${http.prefix}/assets/bootstrap/${versions.bootstrap}/js/bootstrap.min.js"
lazy val fontAwesomeCss = s"/${http.prefix}/assets/font-awesome/${versions.fontAwesome}/css/all.min.css"
- lazy val siteCss = s"/${http.prefix}/public/css/site.css?${BuildInfo.hgId}"
lazy val jquery = s"/${http.prefix}/assets/jquery/${versions.jquery}/jquery.min.js"
def apply(content: iContent, st: ViewState): TypedTag[String] = {
+ val siteCss = s"/${http.prefix}/public/${content.styleSheet._1}"
html(
head(
tags2.style("""
--- a/base/src/sqwl/cms/Server.scala Tue Dec 04 13:18:02 2018 +0100
+++ b/base/src/sqwl/cms/Server.scala Thu Dec 06 13:27:14 2018 +0100
@@ -45,8 +45,12 @@
}
} ~ pathPrefix(http.prefix / ASSETS) {
getFromResourceDirectory("META-INF/resources/webjars")
+ } ~ pathPrefix(http.prefix / PUBLIC / content.icon._1) {
+ getFromFile(content.icon._2.toFile)
+ } ~ pathPrefix(http.prefix / PUBLIC / content.styleSheet._1) {
+ getFromFile(content.styleSheet._2.toFile)
} ~ pathPrefix(http.prefix / PUBLIC) {
- getFromResourceDirectory("public")
+ getFromDirectory(content.publicAssets.toString)
}
}
--- a/base/src/sqwl/cms/datamodel.scala Tue Dec 04 13:18:02 2018 +0100
+++ b/base/src/sqwl/cms/datamodel.scala Thu Dec 06 13:27:14 2018 +0100
@@ -23,6 +23,11 @@
}
trait iContent {
+ def appTitle: String
+ def appTitleShort: String
+ def icon: (String, Path)
+ def publicAssets: Path
+ def styleSheet: (String, Path)
def articlesByTag(t: iTag): Seq[iArticle]
def articlesByCategory(c: iCategory): Seq[iArticle]
def tags: Seq[iTag]
--- a/base/src/sqwl/cms/layout/Navbar.scala Tue Dec 04 13:18:02 2018 +0100
+++ b/base/src/sqwl/cms/layout/Navbar.scala Thu Dec 06 13:27:14 2018 +0100
@@ -33,12 +33,12 @@
span(cls:="icon-bar")
),
a(href:="#", cls:="navbar-brand", paddingTop:=4, paddingBottom:=4,
- img(src:=s"/${http.prefix}/public/images/icon.png", alt:="SQWL",
- width:=40, height:=40)),
+ img(src:=s"/${http.prefix}/public/${cnt.icon._1}",
+ alt:=cnt.appTitleShort, width:=40, height:=40)),
a(href:="#", cls:="navbar-brand visible-xs",
- span("KPŽ")),
+ span(cnt.appTitleShort)),
a(href:="#", cls:="navbar-brand hidden-xs",
- span("Kvalita pracovního života v České republice"))
+ span(cnt.appTitle))
)
//tag("nav")(cls:="hidden-xs", navMenu)
)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/content/public/css/site.css Thu Dec 06 13:27:14 2018 +0100
@@ -0,0 +1,167 @@
+/*
+ * SQWL colors:
+ * - green: #006634 / #00532b / #008745
+ * - red: #e94e1b
+ * - brown: #693e11 / #482500 / #9a744c / #eedece
+ */
+
+body {
+ color: #693e11;
+}
+
+h1, h2, h3, a {
+ color: #006634;
+}
+
+small, h4 small {
+ color: #693e11;
+}
+
+.col-centered{
+ float: none;
+ margin: 0 auto;
+}
+
+.jumbotron {
+ background-color: #eedece;
+}
+
+.panel-title, .navbar-default .navbar-nav>li>a {
+ color: #006634;
+}
+
+.panel-default {
+ border-color: #9a744c;
+}
+
+.panel-default>.panel-heading {
+ background-color: #eedece;
+ border-color: #9a744c;
+ color: #693e11;
+}
+
+.panel-default>.panel-heading+.panel-collapse>.panel-body {
+ border-top-color: #9a744c;
+}
+
+.panel-group .panel-heading+.panel-collapse>.list-group,
+.panel-group .panel-heading+.panel-collapse>.panel-body {
+ border-top-color: #9a744c;
+}
+
+.panel-footer {
+ background-color: #eedece;
+ border-color: #9a744c;
+}
+
+.nav-tabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover,
+.dropdown-menu>li>a {
+ color: #693e11;
+}
+
+.navbar-brand {
+ font-size: 32px;
+}
+
+.navbar-default {
+ background-color: #eedece;
+ border-color: #9a744c;
+}
+
+.navbar-section {
+ font-size: 24px;
+}
+
+.dropdown-menu>.active>a, .dropdown-menu>.active>a:focus, .dropdown-menu>.active>a:hover {
+ background-color: #006634;
+}
+
+.btn-default {
+ border-color: #9a744c;
+ color: #693e11;
+ outline-color: #9a744c;
+}
+
+.btn-default.active, .btn-default.focus,
+.btn-default:active, .btn-default:focus, .btn-default:hover {
+ background-color: #eedece;
+ border-color: #9a744c;
+ color: #693e11;
+ outline-color: #9a744c;
+}
+
+.btn-default.disabled, .btn-default.disabled.active, .btn-default.disabled.focus,
+.btn-default.disabled:active, .btn-default.disabled:focus,
+.btn-default.disabled:hover, .btn-default[disabled], .btn-default[disabled].active,
+.btn-default[disabled].focus, .btn-default[disabled]:active,
+.btn-default[disabled]:focus, .btn-default[disabled]:hover,
+fieldset[disabled] .btn-default, fieldset[disabled] .btn-default.active,
+fieldset[disabled] .btn-default.focus, fieldset[disabled] .btn-default:active,
+fieldset[disabled] .btn-default:focus, fieldset[disabled] .btn-default:hover {
+ background-color: #eedece;
+ border-color: #9a744c;
+ color: #693e11;
+}
+
+.btn-primary {
+ background-color: #006634;
+ border-color: #00532b;
+ outline-color: #00532b;
+}
+
+.btn-primary.active, .btn-primary.focus,
+.btn-primary:active, .btn-primary:focus, .btn-primary:hover {
+ background-color: #693e11;
+ border-color: #482500;
+ outline-color: #482500;
+}
+
+.btn-primary.disabled, .btn-primary.disabled.active, .btn-primary.disabled.focus,
+.btn-primary.disabled:active, .btn-primary.disabled:focus,
+.btn-primary.disabled:hover, .btn-primary[disabled], .btn-primary[disabled].active,
+.btn-primary[disabled].focus, .btn-primary[disabled]:active,
+.btn-primary[disabled]:focus, .btn-primary[disabled]:hover,
+fieldset[disabled] .btn-primary, fieldset[disabled] .btn-primary.active,
+fieldset[disabled] .btn-primary.focus, fieldset[disabled] .btn-primary:active,
+fieldset[disabled] .btn-primary:focus, fieldset[disabled] .btn-primary:hover {
+ background-color: #008745;
+ border-color: #00532b;
+}
+
+hr {
+ border-top-color: #eedece;
+}
+
+.modal-header {
+ border-bottom-color: #eedece;
+}
+
+div.modal-content a {
+ cursor: pointer;
+}
+
+a.link {
+ cursor: pointer;
+}
+
+/* SVG */
+svg g text {
+ cursor: default;
+}
+
+svg g text.legend {
+ font-family: sans-serif;
+ font-size: 11px;
+ fill: #111;
+}
+
+svg g line.level {
+ stroke: grey;
+ stroke-opacity: 0.75;
+ stroke-width: 0.3px;
+}
+
+svg g line.level.level-val-100 {
+ stroke: #693e11;
+ stroke-width: 2px;
+}
Binary file example/content/public/images/icon.png has changed
--- a/example/src/sqwl/cms/Content.scala Tue Dec 04 13:18:02 2018 +0100
+++ b/example/src/sqwl/cms/Content.scala Thu Dec 06 13:27:14 2018 +0100
@@ -46,6 +46,11 @@
}
object Content extends iContent {
+ def appTitle: String = "Kvalita pracovního života - studie"
+ def appTitleShort: String = "KPŽ - studie"
+ def icon = ("icon.png", Paths.get("example/content/public/images/icon.png"))
+ def publicAssets: Path = Paths.get("example/content/public")
+ def styleSheet = ("site.css", Paths.get("example/content/public/css/site.css"))
def articlesByTag(t: iTag): Seq[iArticle] = Seq()
def articlesByCategory(c: iCategory): Seq[iArticle] = Seq()
def tags: Seq[iTag] = Seq()