From 582e051b2367498a3ffe95111c54c00d319bbfa4 Mon Sep 17 00:00:00 2001 From: jpfiset Date: Thu, 22 Dec 2016 07:55:36 -0500 Subject: [PATCH] nunaliit2-couch-command: During nunaliit update command, generate CSS file for test theme. nunaliit2-js: Add theme files for "basic" and "test". Start color replacement. Issue #611 --- .../impl/GenerateCssLibrariesProcess.java | 11 +++- nunaliit2-js/compress/theme-basic.txt | 10 +++ nunaliit2-js/compress/theme-test.txt | 10 +++ nunaliit2-js/pom.xml | 7 ++ .../main/js/nunaliit2/css/basic/n2.theme.css | 64 +++++++++---------- .../main/js/nunaliit2/css/basic/n2.widget.css | 8 +-- 6 files changed, 73 insertions(+), 37 deletions(-) create mode 100644 nunaliit2-js/compress/theme-test.txt diff --git a/nunaliit2-couch-command/src/main/java/ca/carleton/gcrc/couch/command/impl/GenerateCssLibrariesProcess.java b/nunaliit2-couch-command/src/main/java/ca/carleton/gcrc/couch/command/impl/GenerateCssLibrariesProcess.java index 44e110553..a75994ca2 100644 --- a/nunaliit2-couch-command/src/main/java/ca/carleton/gcrc/couch/command/impl/GenerateCssLibrariesProcess.java +++ b/nunaliit2-couch-command/src/main/java/ca/carleton/gcrc/couch/command/impl/GenerateCssLibrariesProcess.java @@ -22,6 +22,7 @@ public void generate(File nunaliit2Dir) throws Exception { File licenseFile = new File(jsDir, "compress/license.txt"); File basicThemeFile = new File(jsDir, "compress/theme-basic.txt"); + File testThemeFile = new File(jsDir, "compress/theme-test.txt"); File basicCssDir = new File(jsDir,"src/main/js/nunaliit2/css/basic"); generate( @@ -31,7 +32,15 @@ public void generate(File nunaliit2Dir) throws Exception { ,basicCssDir ,"nunaliit2.css" ); - + + generate( + new File(jsDir, "compress/nunaliit2-css.cfg") + ,licenseFile + ,testThemeFile + ,basicCssDir + ,"nunaliit2-test.css" + ); + generate( new File(jsDir, "compress/nunaliit2-css.cfg") ,licenseFile diff --git a/nunaliit2-js/compress/theme-basic.txt b/nunaliit2-js/compress/theme-basic.txt index e69de29bb..75bb9a2b0 100644 --- a/nunaliit2-js/compress/theme-basic.txt +++ b/nunaliit2-js/compress/theme-basic.txt @@ -0,0 +1,10 @@ +header.background: #3a3a3a +header.background.button: #2f2f2f +header.background.hover: #1f1f1f +header.background.selected: #160E7D +header.background.module: #444444 +header.color: #fff +header.border.color: rgba(255,255,255,0.6) +header.border.color.module: #575757 +header.border.button.color: #838383 + diff --git a/nunaliit2-js/compress/theme-test.txt b/nunaliit2-js/compress/theme-test.txt new file mode 100644 index 000000000..ccca0ef01 --- /dev/null +++ b/nunaliit2-js/compress/theme-test.txt @@ -0,0 +1,10 @@ +header.background: #fff +header.background.button: #fff +header.background.hover: #eee +header.background.selected: #ddf +header.background.module: #fff +header.color: #000 +header.border.color: rgba(0,0,0,0.6) +header.border.color.module: rgba(0,0,0,0.6) +header.border.button.color: rgba(0,0,0,0.6) + diff --git a/nunaliit2-js/pom.xml b/nunaliit2-js/pom.xml index 7611d185a..ce937e791 100644 --- a/nunaliit2-js/pom.xml +++ b/nunaliit2-js/pom.xml @@ -127,6 +127,13 @@ + + + + + + + diff --git a/nunaliit2-js/src/main/js/nunaliit2/css/basic/n2.theme.css b/nunaliit2-js/src/main/js/nunaliit2/css/basic/n2.theme.css index bb3cef52a..865263148 100644 --- a/nunaliit2-js/src/main/js/nunaliit2/css/basic/n2.theme.css +++ b/nunaliit2-js/src/main/js/nunaliit2/css/basic/n2.theme.css @@ -25,14 +25,14 @@ input[type="text"], input[type="password"], textarea { /* Header Title */ .nunaliit_atlas .nunaliit_header { border-bottom: 1px solid rgba(255,255,255,1); - background-color: #3a3a3a; + background-color: {{header.background}}; -moz-box-shadow: 0 3px 8px rgba(0,0,0,0.5); -webkit-box-shadow: 0 3px 8px rgba(0,0,0,0.5); box-shadow: 0 3px 8px rgba(0,0,0,0.5); - color: #fff; + color: {{header.color}}; } .nunaliit_atlas .nunaliit_header input { - color: #fff; + color: {{header.color}}; } .nunaliit_atlas .nunaliit_header input:disabled { color: #ccc; @@ -41,10 +41,10 @@ input[type="text"], input[type="password"], textarea { font-size: 2.2em; font-weight:500; text-shadow: black 1px 1px 1px; - color:#fff; + color:{{header.color}}; } .nunaliit_atlas .nunaliit_title_link { - color:#fff; + color:{{header.color}}; } .nunaliit_atlas .nunaliit_title_link:hover { text-decoration:none; @@ -52,9 +52,9 @@ input[type="text"], input[type="password"], textarea { /* Sub-Header Title */ .nunaliit_atlas .nunaliit_module_title { - background-color: #444444; - border-top: 1px solid #575757; - color:#fff; + background-color: {{header.background.module}}; + border-top: 1px solid {{header.border.color.module}}; + color:{{header.color}}; } .nunaliit_atlas .nunaliit_module_title_item { @@ -63,7 +63,7 @@ input[type="text"], input[type="password"], textarea { } .nunaliit_atlas .nunaliit_module_title_link { - color:#fff; + color:{{header.color}}; } .nunaliit_atlas .nunaliit_module_title_link:hover { @@ -75,16 +75,16 @@ input[type="text"], input[type="password"], textarea { .nunaliit_atlas .nunaliit_header-nav a, .nunaliit_atlas .nunaliit_header-nav a:visited, .nunaliit_atlas .nunaliit_header-nav span { - color: #fff; + color: {{header.color}}; } .nunaliit_atlas .nunaliit_header-nav li { - background-color: #2f2f2f; - border-left: 1px solid rgba(255,255,255,0.6); - border-right: 1px solid rgba(255,255,255,0.6); - border-bottom:1px solid rgba(255,255,255,0.4); + background-color: {{header.background}}; + border-left: 1px solid {{header.border.color}}; + border-right: 1px solid {{header.border.color}}; + border-bottom:1px solid {{header.border.color}}; } .nunaliit_atlas .nunaliit_header-nav li:hover { - background-color:#1f1f1f; + background-color:{{header.background.hover}}; } .nunaliit_atlas .nunaliit_header-nav li:hover ul li:first-child { border-left: 1px solid rgba(0,0,0,0.9); @@ -98,7 +98,7 @@ input[type="text"], input[type="password"], textarea { border-right: 1px solid #838383; padding: 0 20px; margin:0 0 0 -1px; - background-color: #2f2f2f; + background-color: {{header.background.button}}; -webkit-box-shadow: inset 0 2px 3px rgba(0,0,0,0.2); box-shadow: inset 0 2px 3px rgba(0,0,0,0.2); height: 100%; @@ -109,10 +109,10 @@ input[type="text"], input[type="password"], textarea { border-bottom:0; } .nunaliit_atlas .nunaliit_header-nav li.n2_nav_currentModule { - background-color: #160E7D; + background-color: {{header.background.selected}}; } .nunaliit_atlas .nunaliit_header-nav ul>li>a:hover { - background-color:#000; + background-color:{{header.background.hover}}; border-right:0; } .nunaliit_atlas .nunaliit_header-nav>ul>li:hover>ul>li:first-child { @@ -123,7 +123,7 @@ input[type="text"], input[type="password"], textarea { font-weight: normal; display:block; text-decoration: none; - color: #fff; + color: {{header.color}}; line-height: 0; position: relative; top: 35px; @@ -158,22 +158,22 @@ input[type="text"], input[type="password"], textarea { vertical-align: middle; height:71px; width: 36px; - border-left: 1px solid #838383; - border-right: 1px solid #838383; + border-left: 1px solid {{header.border.button.color}}; + border-right: 1px solid {{header.border.button.color}}; padding:0 20px; - background-color:#2f2f2f; + background-color:{{header.background.button}}; -webkit-box-shadow: inset 0 2px 3px rgba(0,0,0,0.2); box-shadow: inset 0 2px 3px rgba(0,0,0,0.2); } .nunaliit_atlas .nunaliit_header_container .nunaliit_login_link_outer_container:hover { - background-color:rgba(0,0,0,0.9); + background-color:{{header.background.hover}}; } .nunaliit_atlas .nunaliit_header_container .nunaliit_login_link_inner_container { display: inline; } .nunaliit_atlas .nunaliit_header_container .nunaliit_login_link { text-decoration: none; - color: #fff; + color: {{header.color}}; } .nunaliit_atlas .nunaliit_header_container .nunaliit_login_greeting_outer_container { display: table-cell; @@ -183,7 +183,7 @@ input[type="text"], input[type="password"], textarea { } .nunaliit_atlas .nunaliit_header_container .nunaliit_login_greeting_inner_container { display: inline; - color: #fff; + color: {{header.color}}; } .nunaliit_login_greeting_with_editor { @@ -203,7 +203,7 @@ input[type="text"], input[type="password"], textarea { .nunaliit_atlas .nunaliit_module_title .nunaliit_login_link_inner_container { } .nunaliit_atlas .nunaliit_module_title .nunaliit_login_link { - color: #fff; + color: {{header.color}}; text-decoration: none; } .nunaliit_atlas .nunaliit_module_title .nunaliit_login_greeting_outer_container { @@ -221,7 +221,7 @@ Language Switcher } .nunaliit_atlas .nunaliit_header_language a ,.nunaliit_atlas .nunaliit_header_language a:visited { - color: #fff; + color: {{header.color}}; text-decoration: none; } @@ -234,7 +234,7 @@ Help Button } .nunaliit_atlas .nunaliit_help_button a ,.nunaliit_atlas .nunaliit_help_button a:visited { - color: #fff; + color: {{header.color}}; text-decoration: none; } @@ -257,7 +257,7 @@ CreateDocument widget .nunaliit_atlas .nunaliit_module_title .n2widget_createDocumentFromSchema a:visited, .nunaliit_atlas .nunaliit_module_title .n2widget_export a:visited, .nunaliit_atlas .nunaliit_module_title .n2widget_modelBrowser a:visited { - color: #fff; + color: {{header.color}}; text-decoration: none; } @@ -673,7 +673,7 @@ height: auto !important; font-size:0.75em; color: white; border-top: 1px solid rgba(255,255,255,1); - background-color: #3a3a3a; + background-color: {{header.background}}; -moz-box-shadow: 0 3px 8px rgba(0,0,0,0.5); -webkit-box-shadow: 0 3px 8px rgba(0,0,0,0.5); box-shadow: 0 3px 8px rgba(0,0,0,0.5); @@ -690,13 +690,13 @@ height: auto !important; } .nunaliit_atlas .nunaliit_footer_nav ul li { border-right: 1px solid rgba(255,255,255,0.3); - color:#fff; + color:{{header.color}}; } .nunaliit_atlas .nunaliit_footer_nav ul li:first-child { border-right:none; } .nunaliit_atlas .nunaliit_footer_nav ul li a { - color:#fff; + color:{{header.color}}; text-decoration:none; } .nunaliit_atlas .nunaliit_footer_nav ul li a:hover { diff --git a/nunaliit2-js/src/main/js/nunaliit2/css/basic/n2.widget.css b/nunaliit2-js/src/main/js/nunaliit2/css/basic/n2.widget.css index a083927ba..06f4639cc 100644 --- a/nunaliit2-js/src/main/js/nunaliit2/css/basic/n2.widget.css +++ b/nunaliit2-js/src/main/js/nunaliit2/css/basic/n2.widget.css @@ -337,8 +337,8 @@ Help Dialog ============================== */ .n2help_dialog .ui-dialog-titlebar { - background: #3a3a3a; - color: #ffffff; + background: {{header.background}}; + color: {{header.color}}; font-family: helvetica, sans-serif; font-weight: 500; } @@ -636,10 +636,10 @@ Model Browser Widget } .nunaliit_footer .n2widget_modelBrowser a { text-decoration: none; - color: #fff; + color: {{header.color}}; } .nunaliit_footer .n2widget_modelBrowser a:visited { - color: #fff; + color: {{header.color}}; } .n2widget_modelBrowser_model { display: block;