diff --git a/package.json b/package.json index 3c22752..dca0396 100644 --- a/package.json +++ b/package.json @@ -24,12 +24,12 @@ "build": "parcel build src/*.html src/client.ts --experimental-scope-hoisting", "lint": "tslint --project tsconfig.json", "predeploy": "yarn run build && touch dist/.nojekyll && echo 'utteranc.es' > dist/CNAME", - "deploy": "gh-pages --dist dist", - "postinstall": "mv node_modules/github-syntax-light/lib/github-light.css node_modules/github-syntax-light/lib/github-light.scss" + "deploy": "gh-pages --dist dist" }, "devDependencies": { "autoprefixer": "^9.1.5", "gh-pages": "^2.0.0", + "github-syntax-dark": "^0.5.0", "github-syntax-light": "^0.5.0", "node-sass": "^4.9.3", "parcel-bundler": "^1.10.1", diff --git a/src/index.html b/src/index.html index 2adf567..355253a 100644 --- a/src/index.html +++ b/src/index.html @@ -5,7 +5,7 @@ - + diff --git a/src/new-comment-component.ts b/src/new-comment-component.ts index b9fd62f..052ffb1 100644 --- a/src/new-comment-component.ts +++ b/src/new-comment-component.ts @@ -47,7 +47,7 @@ export class NewCommentComponent {
- + diff --git a/src/index.scss b/src/sass/index.scss similarity index 93% rename from src/index.scss rename to src/sass/index.scss index 03fcb84..c4c731d 100644 --- a/src/index.scss +++ b/src/sass/index.scss @@ -4,7 +4,6 @@ @import "primer-forms/lib/form-group"; @import "primer-forms/lib/input-group"; @import "primer-markdown/index"; -@import "github-syntax-light/lib/github-light"; @import "./util"; @import "./timeline"; @import "./timeline-comment"; diff --git a/src/_permalink-code.scss b/src/sass/permalink-code.scss similarity index 100% rename from src/_permalink-code.scss rename to src/sass/permalink-code.scss diff --git a/src/sass/themes/github-dark/button.scss b/src/sass/themes/github-dark/button.scss new file mode 100644 index 0000000..1a57d19 --- /dev/null +++ b/src/sass/themes/github-dark/button.scss @@ -0,0 +1,14 @@ +.btn-primary { + background: linear-gradient(#407045, #305530); + border-color: #083; + color: #e2e2e2; +} + +.btn-primary:hover { + background: linear-gradient(#508055, #407045); +} + +.btn-primary:disabled { + background: linear-gradient(#203522, #152715); + border-color: #041; +} \ No newline at end of file diff --git a/src/sass/themes/github-dark/index.scss b/src/sass/themes/github-dark/index.scss new file mode 100644 index 0000000..dc15007 --- /dev/null +++ b/src/sass/themes/github-dark/index.scss @@ -0,0 +1,4 @@ +@import "./variables"; +@import "../../index"; +@import "./syntax"; +@import "./button.scss"; diff --git a/src/sass/themes/github-dark/syntax.scss b/src/sass/themes/github-dark/syntax.scss new file mode 100644 index 0000000..6fd1d45 --- /dev/null +++ b/src/sass/themes/github-dark/syntax.scss @@ -0,0 +1 @@ +@import "github-syntax-dark/lib/github-dark"; diff --git a/src/sass/themes/github-dark/utterances.scss b/src/sass/themes/github-dark/utterances.scss new file mode 100644 index 0000000..1bd16b0 --- /dev/null +++ b/src/sass/themes/github-dark/utterances.scss @@ -0,0 +1,4 @@ +@import "./variables"; +@import "../../utterances"; +@import "./syntax"; +@import "./button.scss"; diff --git a/src/sass/themes/github-dark/variables.scss b/src/sass/themes/github-dark/variables.scss new file mode 100644 index 0000000..d0b47cd --- /dev/null +++ b/src/sass/themes/github-dark/variables.scss @@ -0,0 +1,13 @@ +$gray-100: #222; +$gray-200: #24292e; +$gray-300: #343434; +$gray-600: #7b7b7b; +$bg-white: #181818; +$bg-gray: #202020; +$bg-gray-light: darken($bg-gray, 5%); +$border-gray: $gray-300; +$border-gray-dark: $border-gray; +$text-gray: #949494; +$text-gray-dark: #c0c0c0; +$text-blue: rgb(65, 131, 196); +$bg-blue-light: #182030; diff --git a/src/sass/themes/github-light/index.scss b/src/sass/themes/github-light/index.scss new file mode 100644 index 0000000..8200960 --- /dev/null +++ b/src/sass/themes/github-light/index.scss @@ -0,0 +1,2 @@ +@import "../../index"; +@import "./syntax"; \ No newline at end of file diff --git a/src/sass/themes/github-light/syntax.scss b/src/sass/themes/github-light/syntax.scss new file mode 100644 index 0000000..39e5448 --- /dev/null +++ b/src/sass/themes/github-light/syntax.scss @@ -0,0 +1,6 @@ +@import "github-syntax-light/lib/github-light"; + +// adjust syntax highlighting to ensure WCAG AAA rating +.pl-ent { + color: #196128; +} diff --git a/src/sass/themes/github-light/utterances.scss b/src/sass/themes/github-light/utterances.scss new file mode 100644 index 0000000..7a98065 --- /dev/null +++ b/src/sass/themes/github-light/utterances.scss @@ -0,0 +1,2 @@ +@import "../../utterances"; +@import "./syntax"; diff --git a/src/_timeline-comment.scss b/src/sass/timeline-comment.scss similarity index 100% rename from src/_timeline-comment.scss rename to src/sass/timeline-comment.scss diff --git a/src/_timeline.scss b/src/sass/timeline.scss similarity index 100% rename from src/_timeline.scss rename to src/sass/timeline.scss diff --git a/src/_util.scss b/src/sass/util.scss similarity index 74% rename from src/_util.scss rename to src/sass/util.scss index 0114a21..986322c 100644 --- a/src/_util.scss +++ b/src/sass/util.scss @@ -12,8 +12,3 @@ .markdown-body .highlight-source-js > pre { -webkit-overflow-scrolling: touch; } - -// adjust syntax highlighting to ensure WCAG AAA rating -.pl-ent { - color: #196128; -} diff --git a/src/utterances.scss b/src/sass/utterances.scss similarity index 82% rename from src/utterances.scss rename to src/sass/utterances.scss index 87d452b..465edef 100644 --- a/src/utterances.scss +++ b/src/sass/utterances.scss @@ -3,7 +3,7 @@ @import "primer-markdown/index"; @import "primer-alerts/index"; @import "primer-navigation/lib/tabnav"; -@import "github-syntax-light/lib/github-light"; +@import "primer-forms/lib/form-control"; @import "./util"; @import "./timeline"; @import "./timeline-comment"; @@ -19,6 +19,10 @@ body { padding-bottom: 20px; } +.form-control { + font-size: $body-font-size; +} + .flash-not-installed { margin-bottom: $spacer-3; } diff --git a/src/utterances.html b/src/utterances.html index 5d62e15..26c0eff 100644 --- a/src/utterances.html +++ b/src/utterances.html @@ -5,7 +5,7 @@ - +