diff --git a/package.json b/package.json index 4d8c5181..086cd853 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "watch-client": "npm run build-client-js -- --watch", "watch-browser": "npm run build-client-js -- --watch", "watch-css": "nodemon --watch src/scss -e scss -x \"npm run build-css -- --reload\"", - "build-docs": "node scripts/build-widgets-reference.js > resources/docs/docs/widgets-reference.md && cd resources && mkdocs build --clean", + "build-docs": "node scripts/build-widgets-reference.js > resources/docs/docs/widgets-reference.md && cd resources && node scripts/build-css.js && mkdocs build --clean", "test": "eslint src && npm run build && node tests/test.js" }, "engines": { diff --git a/resources/.gitignore b/resources/.gitignore new file mode 100644 index 00000000..44bbfe87 --- /dev/null +++ b/resources/.gitignore @@ -0,0 +1 @@ +theme/styles.css diff --git a/resources/package.json b/resources/package.json new file mode 100644 index 00000000..34a279fd --- /dev/null +++ b/resources/package.json @@ -0,0 +1,17 @@ +{ + "name": "open-stage-control-docs", + "version": "1.0.0", + "description": "```bash $ sudo apt-get install python python-pip # python package manager $ sudo pip install mkdocs # docs site builder $ sudo pip install mkdocs-material # theme", + "main": "index.js", + "directories": { + "doc": "docs" + }, + "scripts": { + "build": "node-sass -h" + }, + "author": "", + "license": "ISC", + "dependencies": { + "spectre.css": "^0.5.8" + } +} diff --git a/resources/scripts/build-css.js b/resources/scripts/build-css.js new file mode 100644 index 00000000..1abe0a5f --- /dev/null +++ b/resources/scripts/build-css.js @@ -0,0 +1,12 @@ +var sass = require('node-sass'), + path = require('path'), + fs = require('fs') + +var result = sass.renderSync({ + file: path.resolve(__dirname + '/../src/scss/styles.scss'), + outFile: path.resolve(__dirname + '/../theme/styles.css'), + outputStyle: 'compressed', + sourceMap: false +}) + +fs.writeFileSync(path.resolve(__dirname + '/../theme/styles.css'), result.css) diff --git a/resources/theme/styles.css b/resources/src/scss/styles.scss similarity index 91% rename from resources/theme/styles.css rename to resources/src/scss/styles.scss index 56d68a59..880c508c 100644 --- a/resources/theme/styles.css +++ b/resources/src/scss/styles.scss @@ -1,3 +1,7 @@ +$primary-color: rgb(75, 143, 210); +@import "node_modules/spectre.css/src/spectre"; + + body { color: #333; font-family: Helvetica,Arial,sans-serif; @@ -13,10 +17,12 @@ body { .wrap { max-width: 1110px; } -@media (max-width: 570px) -.wrap, .full-width { - min-width: 0; +@media (max-width: 570px){ + .wrap, .full-width { + min-width: 0; + } } + .wrap { margin-right: auto; margin-left: auto; @@ -42,7 +48,7 @@ body { position: fixed; top: 0; z-index: 1000; - background-color: #333; + background-color: #3c4c68; box-shadow: 0 2px 4px -1px rgba(0,0,0,0.25); } @@ -247,8 +253,10 @@ h1:first-child { } #mkdocs-search-query { - border: 1px solid #333; - background:rgba(0,0,0,0.25); + /* border: 1px solid rgba(255,255,255,.1); */ + border:0; + box-shadow: 0 -2px 10px 0 rgba(0,0,0,0.1) inset; + background:rgba(0,0,0,0.15); border-radius: 15px; color: #eee; outline: none; diff --git a/resources/theme/base.html b/resources/theme/base.html index 997a51aa..d607ac5e 100644 --- a/resources/theme/base.html +++ b/resources/theme/base.html @@ -8,7 +8,6 @@ {% if page.title and not page.is_homepage %}{{ page.title }} - {% endif %}{{ config.site_name }} -