From d56d8a2f1eb7751af456acaa9420c46a9abca896 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Wed, 3 May 2017 14:10:11 +0100 Subject: [PATCH 1/2] Fix script location and run handle --- md_pdf/assets/static/context.js | 3 ++- md_pdf/assets/templates/cover-template.html | 2 +- md_pdf/assets/templates/footer.html | 6 +++--- md_pdf/assets/templates/header.html | 6 +++--- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/md_pdf/assets/static/context.js b/md_pdf/assets/static/context.js index 90adc1b..8675777 100644 --- a/md_pdf/assets/static/context.js +++ b/md_pdf/assets/static/context.js @@ -21,4 +21,5 @@ function subst() { } } -window.subst = subst(); + +subst(); diff --git a/md_pdf/assets/templates/cover-template.html b/md_pdf/assets/templates/cover-template.html index 8675240..53f95a4 100644 --- a/md_pdf/assets/templates/cover-template.html +++ b/md_pdf/assets/templates/cover-template.html @@ -1,7 +1,7 @@ - +

{{ title }}

diff --git a/md_pdf/assets/templates/footer.html b/md_pdf/assets/templates/footer.html index 8765260..9b988e4 100644 --- a/md_pdf/assets/templates/footer.html +++ b/md_pdf/assets/templates/footer.html @@ -1,10 +1,9 @@ - - + - +
@@ -12,5 +11,6 @@
+ diff --git a/md_pdf/assets/templates/header.html b/md_pdf/assets/templates/header.html index e8b7db6..91e760b 100644 --- a/md_pdf/assets/templates/header.html +++ b/md_pdf/assets/templates/header.html @@ -1,9 +1,9 @@ - - + - + + From a07e57137cab7db762fd2573c094323193d85cdb Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Wed, 3 May 2017 14:13:14 +0100 Subject: [PATCH 2/2] Fix scss linting --- .sass-lint.yml | 60 +++++++++++++++++++++++++++++++++ md_pdf/assets/static/style.scss | 3 +- package.json | 2 +- 3 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 .sass-lint.yml diff --git a/.sass-lint.yml b/.sass-lint.yml new file mode 100644 index 0000000..45bbe42 --- /dev/null +++ b/.sass-lint.yml @@ -0,0 +1,60 @@ +rules: + clean-import-paths: 0 + extends-before-mixins: 2 + extends-before-declarations: 2 + force-attribute-nesting: 0 + no-css-comments: 0 + no-debug: 1 + no-duplicate-properties: + - 2 + - + exclude: + - src + - transform + no-ids: 0 + no-important: 0 + no-transition-all: 0 + no-vendor-prefixes: 2 + no-qualifying-elements: 0 + no-url-protocols: 0 + no-warn: 1 + hex-notation: + - 2 + - + style: uppercase + indentation: + - 2 + - + size: 2 + variable-name-format: + - 2 + - + allow-leading-underscore: false + convention: hyphenatedlowercase + quotes: + - 2 + - + style: double + property-sort-order: + - 2 + - + order: 'concentric' + empty-line-between-blocks: 2 + space-after-bang: 2 + space-after-colon: 2 + space-after-comma: 2 + space-before-bang: 2 + space-before-brace: 2 + space-before-colon: 2 + space-between-parens: 2 + trailing-semicolon: 2 + leading-zero: 0 + single-line-per-selector: 0 + force-pseudo-nesting: 0 + force-element-nesting: 0 + placeholder-in-extend: 0 + no-url-domains: 0 + nesting-depth: + - 2 + - + max-depth: 5 diff --git a/md_pdf/assets/static/style.scss b/md_pdf/assets/static/style.scss index 5025637..1212730 100644 --- a/md_pdf/assets/static/style.scss +++ b/md_pdf/assets/static/style.scss @@ -3,8 +3,7 @@ body.cover { text-align: center; & h1 { - font-size: 48px; padding-top: 400px; - + font-size: 48px; } } diff --git a/package.json b/package.json index 33e2150..3062185 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "description": "", "scripts": { "test": "npm run lint-scss && npm run lint-js", - "lint-scss": "sass-lint -vq md_pdf/assets/static/**/*.scss", + "lint-scss": "sass-lint -vqc .sass-lint.yml md_pdf/assets/static/**/*.scss", "lint-js": "eslint -c eslint-config-dabapps/base/.eslintrc md_pdf/assets/static/**/*.js" }, "repository": {