From e6fecfdcee5593c27805ad13f5966b3a991eb851 Mon Sep 17 00:00:00 2001 From: Dorian Pula Date: Mon, 8 Jul 2013 08:01:00 -0400 Subject: [PATCH] Work on CSS and navigation. --- docs/TODO.rst | 7 ++-- .../css/penguin-common-theme.css | 3 +- .../css/penguin-evening-theme.css | 40 +++++++------------ rookeries_webclient/index.html | 2 - .../js/rookeries-application-0.2.0.js | 2 + .../js/rookeries-controllers-0.2.0.js | 24 +++++------ .../js/rookeries-services.0.2.0.js | 2 +- rookeries_webclient/partials/landing.html | 2 +- rookeries_webclient/partials/nav-menu.html | 8 ++-- 9 files changed, 42 insertions(+), 48 deletions(-) diff --git a/docs/TODO.rst b/docs/TODO.rst index 88f1bb6..4ac27af 100644 --- a/docs/TODO.rst +++ b/docs/TODO.rst @@ -13,7 +13,7 @@ Things To-Do * Fix up navigation with dynamic elements for various apps... * Add in translation strings. -* Add in special JSON string responses for Flask: http://flask.pocoo.org/snippets/83/ + * Try out using xhtml2pdf with Flask when we need PDF reports: http://flask.pocoo.org/snippets/68/ * Look into using Mozilla Persona for authentication: https://www.mozilla.org/en-US/persona/ * Consider switching to Flask-Login: https://flask-login.readthedocs.org/en/latest/ , if issues with auth happen. @@ -21,8 +21,7 @@ Things To-Do * Add in reCaptcha support: https://pypi.python.org/pypi/recaptcha-client * Add in LESS for parts of CSS with common colours, etc.: http://lesscss.org/ -* Add in switchable CSS themes: http://www.thesitewizard.com/css/switch-alternate-css-styles.shtml -* Add in switchable CSS themes: http://www.thesitewizard.com/javascripts/change-style-sheets.shtml +* Look into distributing web fonts as part of client package. Things Done ----------- @@ -31,3 +30,5 @@ Things Done * *2013 June 11* --- Built out setup.py and make it easy to distribute on PyPI. * *2013 June 28* --- Using enums for some parts. See enum34 and SQLAlchemy's Enums. * *2013 June 30* --- Built out user account management and registration. +* *2013 July 03* --- Added special JSON string responses for Flask: http://flask.pocoo.org/snippets/83/ +* *2013 July 04* --- Added switchable CSS themes. \ No newline at end of file diff --git a/rookeries_webclient/css/penguin-common-theme.css b/rookeries_webclient/css/penguin-common-theme.css index e100cd8..f851851 100644 --- a/rookeries_webclient/css/penguin-common-theme.css +++ b/rookeries_webclient/css/penguin-common-theme.css @@ -36,7 +36,8 @@ div.ice-floe { padding: 15px 30px 15px 30px; } -.navigation-bar { +/*** Navigation overrides. ***/ +.nav { text-align: center; font-weight: bold; font-family: "Raleway", sans-serif; diff --git a/rookeries_webclient/css/penguin-evening-theme.css b/rookeries_webclient/css/penguin-evening-theme.css index 47edc2f..a332ace 100644 --- a/rookeries_webclient/css/penguin-evening-theme.css +++ b/rookeries_webclient/css/penguin-evening-theme.css @@ -70,23 +70,7 @@ article > hr { border-color: #111111; } -/*** Navigation menu ***/ -/* Refer to: https://leavesofcode.wordpress.com/2012/08/30/more-pure-css-menus/ */ -ul.navigation { - text-align: center; - font-weight: bold; - font-family: "Raleway", sans-serif; - font-size: 18px; - - border-radius: 25px; - border-style: solid; - border-width: 1px; - background-color: #777777; - border-color: #111111; - box-shadow: 5px 5px #111111; - - margin-top: 12pt; -} +/*** Navigation overrides ***/ nav > ul > li { /*display: inline-block;*/ @@ -99,26 +83,31 @@ nav > ul > li { /*width: 150px;*/ } -nav > ul > li > a { +a { color: #FFC200; text-decoration: none; } -nav > ul > li:hover { +a:hover { background-color: #FFC200; border-radius: 5px; + /*color: #6932ff;*/ + color: #292929; + padding: 5px; } -nav > ul > li:hover > a { - color: #6932ff; -} +/** TODO Move over some of concepts to common CSS. + + +/** TODO Remove if no longer used. **/ /*Hide the submenu.*/ -nav > ul > li > ul { +/* nav > ul > li > ul { display: none; -} +} */ /*Show the submenu on hover.*/ +/* nav > ul > li:hover > ul { display: inline-block; list-style: none; @@ -157,4 +146,5 @@ nav > ul > li > ul > li:hover { nav > ul > li > ul > li:hover > a { color: #6932ff; -} \ No newline at end of file +} +*/ \ No newline at end of file diff --git a/rookeries_webclient/index.html b/rookeries_webclient/index.html index 8300634..2576521 100644 --- a/rookeries_webclient/index.html +++ b/rookeries_webclient/index.html @@ -8,12 +8,10 @@ - - diff --git a/rookeries_webclient/js/rookeries-application-0.2.0.js b/rookeries_webclient/js/rookeries-application-0.2.0.js index 99b9bad..5f04366 100644 --- a/rookeries_webclient/js/rookeries-application-0.2.0.js +++ b/rookeries_webclient/js/rookeries-application-0.2.0.js @@ -8,6 +8,8 @@ * Created with PyCharm. Date: 2013-June-30 @ 23:58 */ + + // The location of the API server. var rookeriesApiPath = "http://localhost\\:5000"; diff --git a/rookeries_webclient/js/rookeries-controllers-0.2.0.js b/rookeries_webclient/js/rookeries-controllers-0.2.0.js index a1fe50d..dd62a64 100644 --- a/rookeries_webclient/js/rookeries-controllers-0.2.0.js +++ b/rookeries_webclient/js/rookeries-controllers-0.2.0.js @@ -66,25 +66,25 @@ function SwitchThemeCtrl($scope) { // TODO Consider having an array of themes and switching to the next with a faux-pointer? // TODO Turn the user preferences into a nice model. -// $scope.user_pref_theme = "daytime" -// $scope.user_pref_alternative_theme = "evening" -// $scope.user_pref_theme_icon_colour = " " +// $scope.user_pref_theme = "daytime"; +// $scope.user_pref_alternative_theme = "evening"; +// $scope.user_pref_theme_icon_colour = " "; - $scope.user_pref_theme = "evening" - $scope.user_pref_alternative_theme = "daytime" - $scope.user_pref_theme_icon_colour = "icon-white" + $scope.user_pref_theme = "evening"; + $scope.user_pref_alternative_theme = "daytime"; + $scope.user_pref_theme_icon_colour = "icon-white"; // Toggle between themes. $scope.switchTheme = function() { if ($scope.user_pref_theme === "daytime") { - $scope.user_pref_theme = "evening" - $scope.user_pref_alternative_theme = "daytime" - $scope.user_pref_theme_icon_colour = "icon-white" + $scope.user_pref_theme = "evening"; + $scope.user_pref_alternative_theme = "daytime"; + $scope.user_pref_theme_icon_colour = "icon-white"; } else { - $scope.user_pref_theme = "daytime" - $scope.user_pref_alternative_theme = "evening" - $scope.user_pref_theme_icon_colour = " " + $scope.user_pref_theme = "daytime"; + $scope.user_pref_alternative_theme = "evening"; + $scope.user_pref_theme_icon_colour = " "; } } diff --git a/rookeries_webclient/js/rookeries-services.0.2.0.js b/rookeries_webclient/js/rookeries-services.0.2.0.js index 3f79fbc..fb948a4 100644 --- a/rookeries_webclient/js/rookeries-services.0.2.0.js +++ b/rookeries_webclient/js/rookeries-services.0.2.0.js @@ -23,6 +23,6 @@ angular.module('rookeries.service', ['ngResource']) .factory('DocPage', function($resource) { return $resource(rookeriesApiPath + '/docs/:page', {}, { - get: {method:'GET', params:{"page": "faq"}} + get: {method:'GET', params:{"page": "page.id"}} }); }); \ No newline at end of file diff --git a/rookeries_webclient/partials/landing.html b/rookeries_webclient/partials/landing.html index a8f16c8..87ff9c3 100644 --- a/rookeries_webclient/partials/landing.html +++ b/rookeries_webclient/partials/landing.html @@ -1,4 +1,4 @@ -

Welcome to Rooker.ies

+

Welcome to Rookeri.es

Welcome back {{ username }}!

diff --git a/rookeries_webclient/partials/nav-menu.html b/rookeries_webclient/partials/nav-menu.html index ce907f8..a29118d 100644 --- a/rookeries_webclient/partials/nav-menu.html +++ b/rookeries_webclient/partials/nav-menu.html @@ -1,4 +1,4 @@ - + +