This is an automated email from the ASF dual-hosted git repository.

msahyoun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pdfbox-docs.git


The following commit(s) were added to refs/heads/master by this push:
     new 859d03e  PDFBOX-4848: watch sass changes at preview stage; ignore 
generated css
859d03e is described below

commit 859d03ed5ff817430cf1d8fc848e02578dc8a1a0
Author: Maruan Sahyoun <sahy...@fileaffairs.de>
AuthorDate: Thu Jul 9 16:49:51 2020 +0200

    PDFBOX-4848: watch sass changes at preview stage; ignore generated css
---
 .gitignore                                |  1 +
 content/{css/site.css => _sass/site.scss} | 15 +++++++++++++--
 content/css/styles.sass                   |  2 +-
 package.json                              | 10 +++++-----
 4 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/.gitignore b/.gitignore
index bcf42a7..9346ab9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 node/
 node_modules/
+content/css/styles.css*
 staging/
 target/
 package-lock.json
diff --git a/content/css/site.css b/content/_sass/site.scss
similarity index 96%
rename from content/css/site.css
rename to content/_sass/site.scss
index 7234f5b..3936b95 100644
--- a/content/css/site.css
+++ b/content/_sass/site.scss
@@ -16,6 +16,13 @@
 */
 
 /*
+ * Variables
+ */
+
+$primary-text-color: #161616; 
+$secondary-text-color: #393939;
+
+/*
  *  The follwing rules are in addition to the base bootstrap css
  *  Some of the CSS is copied over from bootstrap as markdown, the primary
  *  format used to add content, doesn't allow to classes to the elements
@@ -29,7 +36,7 @@ body {
     font-family: "Open Sans", sans-serif;
     font-size: 16px;
     line-height: 1.5;
-    color: rgb(0,0,0);
+    color: $primary-text-color;
 }
 
 body > .container {
@@ -112,7 +119,11 @@ svg.pdfbox-brand-text, svg.pdfbox-brand-toolbox {
 
 /* headings */
 h1, h2, h3, h4, h5 {
-  color: rgba(0,0,0,0.87);
+  color: $primary-text-color;
+}
+
+h1 small, h2 small, h3 small, h4 small, h5 small, h6 small {
+  color: $secondary-text-color;
 }
 
 h1 {
diff --git a/content/css/styles.sass b/content/css/styles.sass
index 3cd9ff4..9dd69e6 100644
--- a/content/css/styles.sass
+++ b/content/css/styles.sass
@@ -1,3 +1,3 @@
-@import /css/site.css
+@import site.scss
 @import documentation.scss
 @import accordion.scss
diff --git a/package.json b/package.json
index befcd53..d7ce6a8 100644
--- a/package.json
+++ b/package.json
@@ -7,15 +7,15 @@
     "url": "https://gitbox.apache.org/repos/asf/pdfbox-docs.git";
   },
   "scripts": {
-    "build:sass": "sass --style=compressed --load-path=content/_sass 
content/css/styles.sass staging/content/css/styles.css",
-    "build:eleventy": "eleventy",
-    "build": "run-s build:*",
-    "preview": "run-s preview:*",
-    "preview:sass": "sass --style=compressed --load-path=content/_sass 
content/css/styles.sass staging/content/css/styles.css",
+    "sass": "sass --style=compressed --load-path=content/_sass 
content/css/styles.sass content/css/styles.css",
+    "build": "npm run sass & eleventy",
+    "preview": "npm-run-all sass --parallel preview:*",
     "preview:eleventy": "eleventy --serve",
+    "preview:sass": "npm run sass -- --watch",
     "check:html": "html-validate 'staging/content/*/**/*.html'",
     "checks": "run-s check:*"
   },
+
   "devDependencies": {
     "@11ty/eleventy": "^0.11.0",
     "@11ty/eleventy-plugin-syntaxhighlight": "^3.0.1",

Reply via email to