web staff: drive css from templates (like tpac)
authorBill Erickson <berick@esilibrary.com>
Wed, 4 Dec 2013 14:50:20 +0000 (09:50 -0500)
committerBill Erickson <berick@esilibrary.com>
Wed, 4 Dec 2013 14:50:20 +0000 (09:50 -0500)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
Open-ILS/src/templates/staff/css/style.css.tt2 [new file with mode: 0644]
Open-ILS/src/templates/staff/t_base.tt2
Open-ILS/src/templates/staff/t_splash.tt2
Open-ILS/web/css/skin/default/staff/base.css [deleted file]

index 57cb02b..2e557db 100644 (file)
@@ -239,7 +239,7 @@ sub find_template {
     my @parts = split('/', $path);
     my $localpath = $path;
 
-    if ($localpath =~ m|opac/css|) {
+    if ($localpath =~ m|/css/|) {
         $r->content_type('text/css; encoding=utf8');
     } else {
         $r->content_type('text/html; encoding=utf8');
diff --git a/Open-ILS/src/templates/staff/css/style.css.tt2 b/Open-ILS/src/templates/staff/css/style.css.tt2
new file mode 100644 (file)
index 0000000..fc45281
--- /dev/null
@@ -0,0 +1,80 @@
+/* --------------------------------------------------------------------------
+ * Simple default navbar style adjustements to apply the Evergreen color.
+ * TODO: style other components to match EG color scheme
+ */
+.navbar-default {
+    background: -webkit-linear-gradient(#00593d, #007a54);
+    background-color: #007a54;
+    color: #fff;
+}
+
+.navbar-default .navbar-nav>li>a {
+    color: #fff;
+}
+
+.navbar-default .navbar-nav>li>a:hover {
+    color: #ddd;
+}
+
+.navbar-default .navbar-nav>.dropdown>a .caret {
+    border-top-color: #fff;
+    border-bottom-color: #fff;
+}
+.navbar-default .navbar-nav>.dropdown>a:hover .caret {
+    border-top-color: #ddd;
+    border-bottom-color: #ddd;
+}
+
+/* --------------------------------------------------------------------------
+ * Structural modifications
+ */
+
+#top-content-container {
+    /* allow the primary container to occupy most of the page,
+     * but leave some narrow gutters along the side, much 
+     * narrower than the default Bootstrapp container gutters.
+     */
+    width: 95%;
+}
+
+
+/* --------------------------------------------------------------------------
+ * Temporaray local CSS required to make angular-ui-bootstrap
+ * version 0.6.0 look right with Bootstrap CSS 3.0
+ */
+.nav, .pagination, .carousel a { cursor: pointer; }
+.modal {
+    display: block;
+    height: 0;
+    overflow: visible;
+}
+.modal-body:before,
+.modal-body:after {
+    display: table;
+    content: " ";
+}
+.modal-header:before,
+.modal-header:after {
+    display: table;
+    content: " ";
+}
+
+/* --------------------------------------------------------------------------
+/* Form Validation CSS - http://docs.angularjs.org/guide/forms
+ * TODO: these colors are harsh and don't fit the EG color scheme
+ */
+.form-validated input.ng-invalid.ng-dirty {
+  background-color: #FA787E;
+}
+.form-validated input.ng-valid.ng-dirty {
+  background-color: #78FA89;
+}
+
+/* --------------------------------------------------------------------------
+ * Local style
+ */
+
+#splash-nav .panel-body div {
+    padding-bottom: 10px;
+}
+
index 325f1d9..49b259a 100644 (file)
@@ -9,7 +9,7 @@
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <!-- TODO: remote hosted CSS should be hosted locally instead -->
     <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.1/css/bootstrap.min.css" />
-    <link rel="stylesheet" href="[% ctx.media_prefix %]/css/skin/default/staff/base.css" />
+    <link rel="stylesheet" href="[% ctx.base_path %]/staff/css/style.css" />
   </head>
   <body>
     [% INCLUDE "staff/t_navbar.tt2" %]
index bf8a7b7..f27e041 100644 (file)
@@ -1,10 +1,3 @@
-<style>
-  /* TODO: move me */
-  #splash-nav .panel-body div {
-    padding-bottom: 10px;
-  }
-</style>
-
 <div class="container">
   <div class="row">
     <div class="col-lg-12 text-center">
diff --git a/Open-ILS/web/css/skin/default/staff/base.css b/Open-ILS/web/css/skin/default/staff/base.css
deleted file mode 100644 (file)
index f464560..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/* --------------------------------------------------------------------------
- * Simple default navbar style adjustements to apply the Evergreen color.
- * TODO: style other components to match EG color scheme
- */
-.navbar-default {
-    background: -webkit-linear-gradient(#00593d, #007a54);
-    background-color: #007a54;
-    color: #fff;
-}
-
-.navbar-default .navbar-nav>li>a {
-    color: #fff;
-}
-
-.navbar-default .navbar-nav>li>a:hover {
-    color: #ddd;
-}
-
-.navbar-default .navbar-nav>.dropdown>a .caret {
-    border-top-color: #fff;
-    border-bottom-color: #fff;
-}
-.navbar-default .navbar-nav>.dropdown>a:hover .caret {
-    border-top-color: #ddd;
-    border-bottom-color: #ddd;
-}
-
-/* --------------------------------------------------------------------------
- * Structural modifications
- */
-
-#top-content-container {
-    /* allow the primary container to occupy most of the page,
-     * but leave some narrow gutters along the side, much 
-     * narrower than the default Bootstrapp container gutters.
-     */
-    width: 95%;
-}
-
-
-/* --------------------------------------------------------------------------
- * Temporaray local CSS required to make angular-ui-bootstrap
- * version 0.6.0 look right with Bootstrap CSS 3.0
- */
-.nav, .pagination, .carousel a { cursor: pointer; }
-.modal {
-    display: block;
-    height: 0;
-    overflow: visible;
-}
-.modal-body:before,
-.modal-body:after {
-    display: table;
-    content: " ";
-}
-.modal-header:before,
-.modal-header:after {
-    display: table;
-    content: " ";
-}
-
-/* --------------------------------------------------------------------------
-/* Form Validation CSS - http://docs.angularjs.org/guide/forms
- * TODO: these colors are harsh and don't fit the EG color scheme
- */
-.form-validated input.ng-invalid.ng-dirty {
-  background-color: #FA787E;
-}
-.form-validated input.ng-valid.ng-dirty {
-  background-color: #78FA89;
-}