From b4c9f9c9ca4faef3bd1f56f57887957b5dd1cdab Mon Sep 17 00:00:00 2001 From: Lucas Cimon Date: Sun, 3 Dec 2017 17:26:55 +0100 Subject: [PATCH] Fixing 2 more linters in run.sh test_ludochaordic --- .htmlhintrc | 3 +++ gen_imgs_from_mds.py | 7 ++++--- run.sh | 11 ++++++----- static/css/main.css | 3 ++- templates/base.html | 1 + 5 files changed, 16 insertions(+), 9 deletions(-) create mode 100755 .htmlhintrc diff --git a/.htmlhintrc b/.htmlhintrc new file mode 100755 index 0000000..a5210fa --- /dev/null +++ b/.htmlhintrc @@ -0,0 +1,3 @@ +{ + "attr-value-double-quotes": false +} diff --git a/gen_imgs_from_mds.py b/gen_imgs_from_mds.py index 762de98..3077694 100755 --- a/gen_imgs_from_mds.py +++ b/gen_imgs_from_mds.py @@ -24,16 +24,17 @@ for md_file_path in sys.argv[1:]: img_url = img.attrib['src'] if img_url.startswith('http'): continue - gen_img('content/' + img_url) - # Adding also images from "Image:" metadata entries + gen_img(os.path.join('content', img_url)) + # Adding also images from "Image:" pelican metadata entries for line in md_content.splitlines()[:6]: if not line.startswith('Image: '): continue - gen_img('content/' + line.replace('Image: ', '').strip()) + gen_img(os.path.join('content', line.replace('Image: ', '').strip())) if not sys.argv[1:]: print('Checking that pelican plugin image_process.scale works OK on those imgs') from PIL import Image + sys.path.append('../pelican-plugins/image_process/') from image_process import scale for ext, content in sorted(SMALLEST.items()): print('- Testing {} img'.format(ext)) diff --git a/run.sh b/run.sh index aa2e123..7768a01 100755 --- a/run.sh +++ b/run.sh @@ -20,20 +20,21 @@ test_ludochaordic () { git clone https://github.com/Lucas-C/ludochaordic.git cd ludochaordic - npm install -g csslint htmlhint htmllint-cli lighthouse + npm install -g csslint htmlhint lighthouse pip install pelican markdown beautifulsoup4 pillow html5lib html5validator ../pelican-mg/gen_imgs_from_mds.py content/*.md make DEBUG=1 OUTPUTDIR=output html - csslint --ignore=order-alphabetical output/theme/css/main.css + csslint --ignore=bulletproof-font-face,fallback-colors,order-alphabetical output/theme/css/main.css - html5validator --root output/ + html5validator --root output/ \ + --ignore='Element "style" not allowed as child of element "div" in this context.' + cp .htmlhintrc output/ htmlhint output/ - htmllint output/ make devserver - lighthouse http://localhost: + lighthouse http://localhost:8000 make stopserver } diff --git a/static/css/main.css b/static/css/main.css index 4e75457..967e822 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -69,6 +69,7 @@ a { .uk-nav-offcanvas > li > a:last-child { border-bottom: 1px solid rgba(0, 0, 0, 0.3); } .uk-nav-offcanvas .uk-nav-divider { + box-sizing: border-box; border-top: 1px solid rgba(255, 255, 255, 0.01); margin: 0; height: 4px; @@ -166,7 +167,7 @@ a { min-width: 0; /* required for flexbox shrink to work properly - Chrome 60 */ max-height: 50%; max-width: 50%; - padding: 1rem; + padding: 1rem; /* csslint allow: box-model */ margin: 0 auto; width: 100%; height: 100%; diff --git a/templates/base.html b/templates/base.html index 1f26211..284288c 100644 --- a/templates/base.html +++ b/templates/base.html @@ -19,6 +19,7 @@ + {% block title %}{{ SITENAME }}{% endblock %}