# HG changeset patch # User Ludovic Chabant # Date 1514969889 28800 # Node ID b8db406cc5e4975823db5f73bd061b49c38239d9 # Parent 2f68a463cb0618e05276db9038c5b93fa4ffe935 web: Fix UI bugs and do a few improvements. - Fix problems introduced by upgrading to the latest PureCSS. - Simplify CSS/JS includes into the page. - Add a bit of shadow to the body when the search field is focused/expanded. diff -r 2f68a463cb06 -r b8db406cc5e4 wikked/assets/css/wikked.less --- a/wikked/assets/css/wikked.less Wed Jan 03 00:51:59 2018 -0800 +++ b/wikked/assets/css/wikked.less Wed Jan 03 00:58:09 2018 -0800 @@ -1,5 +1,5 @@ // Import Pure. -@import (less) "../pure/pure.css"; +@import (less) "../../../node_modules/purecss/build/pure.css"; // Foundation icons @import "../font-awesome/less/font-awesome.less"; diff -r 2f68a463cb06 -r b8db406cc5e4 wikked/assets/css/wikked/nav.less --- a/wikked/assets/css/wikked/nav.less Wed Jan 03 00:51:59 2018 -0800 +++ b/wikked/assets/css/wikked/nav.less Wed Jan 03 00:58:09 2018 -0800 @@ -18,6 +18,10 @@ .wiki-menu-a { color: @color-gray-light; + display: block; + text-decoration: none; + line-height: 1.5em; + white-space: nowrap; } .wiki-menu-a-hover { background: @link-hover-color; @@ -64,6 +68,7 @@ background-color: @color-gray-dark; transition: left 200ms ease-in-out 0s, width 200ms ease-in-out 0s, + box-shadow 200ms, !important; a { padding: 0.5em 1em; @@ -89,6 +94,7 @@ } #wiki-menu.wiki-menu-ext { width: @wiki-menu-width-ext !important; + box-shadow: 4px 0px 10px rgba(0, 0, 0, 0.3); } #wiki-menu-shortcut { @@ -177,6 +183,11 @@ list-style: none; } +.wiki-search-underlayer { + background: #CCC; + transition: background 0.5s; +} + // Footer .footer-wrapper { margin: 0 auto; diff -r 2f68a463cb06 -r b8db406cc5e4 wikked/assets/css/wikked/page.less --- a/wikked/assets/css/wikked/page.less Wed Jan 03 00:51:59 2018 -0800 +++ b/wikked/assets/css/wikked/page.less Wed Jan 03 00:58:09 2018 -0800 @@ -76,7 +76,6 @@ // Page editing form#page-edit { - margin-top: 2em; } .editing-input, .editing-preview { diff -r 2f68a463cb06 -r b8db406cc5e4 wikked/commands/web.py --- a/wikked/commands/web.py Wed Jan 03 00:51:59 2018 -0800 +++ b/wikked/commands/web.py Wed Jan 03 00:58:09 2018 -0800 @@ -33,19 +33,13 @@ parser.add_argument( '-d', '--dev', help="Use development mode. " - "This makes Wikked use development assets (separate and " - "uncompressed scripts and stylesheets), along with using " - "code reloading and debugging.", - action='store_true') - parser.add_argument( - '--no-js', - help="Disable Javascript.", + "This makes Wikked use code reloading and debugging.", action='store_true') parser.add_argument( '--no-update', help="Don't auto-update the wiki if a page file has been " - "touched (which means you can refresh a locally modified " - "page with F5)", + "touched (which means you won't be able to refresh a " + "locally modified page with F5)", action='store_true') parser.add_argument( '--no-startup-update', @@ -83,10 +77,6 @@ # When running from the command line, we only have one web server # so make it also serve static files. wikked.settings.WIKI_SERVE_FILES = True - if ctx.args.dev: - wikked.settings.WIKI_DEV_ASSETS = True - if ctx.args.no_js: - wikked.settings.WIKI_DEV_NO_JS = True if not ctx.args.no_update: wikked.settings.WIKI_AUTO_RELOAD = True diff -r 2f68a463cb06 -r b8db406cc5e4 wikked/templates/edit-page.html --- a/wikked/templates/edit-page.html Wed Jan 03 00:51:59 2018 -0800 +++ b/wikked/templates/edit-page.html Wed Jan 03 00:58:09 2018 -0800 @@ -56,16 +56,8 @@ {% endblock %} {% block scripts %} -{% if is_dev %} +{{ super() }} {% if not no_js %} - - -{% endif %} -{% else %} - - {% endif %} {% endblock %} diff -r 2f68a463cb06 -r b8db406cc5e4 wikked/templates/nav.html --- a/wikked/templates/nav.html Wed Jan 03 00:51:59 2018 -0800 +++ b/wikked/templates/nav.html Wed Jan 03 00:58:09 2018 -0800 @@ -5,12 +5,12 @@
-