Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds hugo teminal orange theme #277

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions SITES.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,6 @@
* [Tanel Poder's performance & troubleshooting blog](https://tanelpoder.com)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should not be modified in this "PR".

* [rgoswami.me](https://rgoswami.me)
* [Ceso Adventures](https://ceso.github.io/)
* [Efe Öge's Blog](https://efe.me)
* [garrigos.cat Blog](https://garrigos.cat)
* [ThePeachTimes](https://thepeachtimes.js.org/)
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@
"deploy": "gh-pages --dist dist"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should not be modified in this "PR".

},
"devDependencies": {
"@primer/css": "^14.1.0",
"@primer/css": "^14.2.0",
"autoprefixer": "^9.7.4",
"gh-pages": "^2.2.0",
"github-syntax-dark": "^0.5.0",
"github-syntax-light": "^0.5.0",
"parcel-bundler": "^1.12.4",
"parcel-plugin-clean-dist": "^0.0.6",
"posthtml-expressions": "^1.1.1",
"posthtml-include": "^1.3.3",
"posthtml-expressions": "^1.2.0",
"posthtml-include": "^1.4.0",
"posthtml-md": "^1.1.0",
"sass": "^1.25.0",
"tslint": "^5.20.1",
"typescript": "^3.7.5"
"sass": "^1.26.3",
"tslint": "^6.1.0",
"typescript": "^3.8.3"
}
}
1 change: 1 addition & 0 deletions src/configuration-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ export class ConfigurationComponent {
<option value="github-light">GitHub Light</option>
<option value="github-dark">GitHub Dark</option>
<option value="github-dark-orange">GitHub Dark Orange</option>
<option value="hugo-terminal-orange">Hugo Terminal Orange</option>
<option value="icy-dark">Icy Dark</option>
<option value="dark-blue">Dark Blue</option>
<option value="photon-dark">Photon Dark</option>
Expand Down
13 changes: 0 additions & 13 deletions src/stylesheets/themes/github-dark-orange/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,3 @@
@import "./placeholder.scss";
@import "./combobox.scss";
@import "./code.scss";

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These codes should not be deleted. Because the current theme inherits the content of this theme.

So to set the background-color of body in your theme, you only need to set $bg-page in the variables.scss to the value you want.

body {
background-color: $bg-page;
}

iframe {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
24 changes: 24 additions & 0 deletions src/stylesheets/themes/hugo-terminal-orange/button.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@import "./variables";

.btn-primary {
color: $gray-900;
border-color: $gray-900;
background: $orange;

&:hover, &:active, &:focus {
border-color: $gray-900;
background: $orange;
}

&:disabled {
color: $gray-900;
background: $orange-200;
}
}

button[role=tab] {
color: $gray-600;
.selected {
color: $text-gray-dark;
}
}
6 changes: 6 additions & 0 deletions src/stylesheets/themes/hugo-terminal-orange/code.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@import "./variables";

.bg-gray-light,
.bg-white {
background-color: $bg-gray !important;
}
7 changes: 7 additions & 0 deletions src/stylesheets/themes/hugo-terminal-orange/combobox.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@import "./variables";

.form-control, .form-select {
color: $text-gray-dark;
background-color: $bg-white !important;
border-radius: 3px;
}
11 changes: 11 additions & 0 deletions src/stylesheets/themes/hugo-terminal-orange/comment.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@import "./variables";

.form-select {
background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAUAgMAAAD5DFXkAAAACVBMVEXMzMzMzMzMzMzgWE1NAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfiCwMFBDi4mDGnAAAAR0lEQVQI123JIRUAIQAE0eUEgghEIAV5SEEEIiAQMCnZh74RX+xKr6+bNE3ZBjxBV4KpAlt/NTjKsBRhKED1ePzkZeIwoeoCtokT7bjAVYwAAAAASUVORK5CYII=) no-repeat right 8px center;
background-size: 8px 10px;
}

.markdown-body kbd {
background-color: transparent;
color: $text-gray-dark;
}
18 changes: 18 additions & 0 deletions src/stylesheets/themes/hugo-terminal-orange/glow.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@import "./variables";

*:focus {
outline: none !important;
box-shadow: 0 0 0.2em 0.1em opacify($highlight, 0.1);
border-radius: 1px;
}

.tabnav-tab,
.form-control,
.form-select {
&.focus,
&:focus {
border-color: transparent;
box-shadow: 0 0 0 0.11em opacify($highlight, 0.1) !important;
outline-color: transparent;
}
}
5 changes: 5 additions & 0 deletions src/stylesheets/themes/hugo-terminal-orange/heading.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@import "./variables";

h1, h2, h3, h4, h5, h6 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After running, I think this setting has no effect.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

h1, h2, h3, h4, h5, h6 will not have border

border-color: $line !important;
}
24 changes: 24 additions & 0 deletions src/stylesheets/themes/hugo-terminal-orange/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@import "./variables";
@import "../../index";
@import "./syntax";
@import "./button.scss";
@import "./glow.scss";
@import "./heading.scss";
@import "./comment.scss";
@import "./selection.scss";
@import "./placeholder.scss";
@import "./combobox.scss";
@import "./code.scss";

body {
background-color: $bg-page;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this rule necessary? Thinking setting the $bg-page variable in variables.scss should have the same effect.

Copy link
Author

@fogine fogine Mar 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jdanyow In my attempt to make it as compliant with other themes as possible, I copied github-dark-orange theme as a base and then edited it. So I'm not really sure :) Only thing I edited were variables as described in contribution section and button.scss.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

body {
  background-color: $bg-page;
}

iframe {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

should be deleted from this file


iframe {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this rule for?

Copy link
Author

@fogine fogine Mar 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not know, I copied it from github-dark-orange theme. I deleted it and it seems to work fine without it.
Probably it disables styling on mobile devices.

9 changes: 9 additions & 0 deletions src/stylesheets/themes/hugo-terminal-orange/placeholder.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@import "./variables";

@mixin placeholder {
::placeholder { @content; }
}

@include placeholder {
color: $text-gray-dark;
}
14 changes: 14 additions & 0 deletions src/stylesheets/themes/hugo-terminal-orange/selection.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@import "./variables";

@mixin selection($element) {
#{$element}::selection { @content; }
}

@include selection("") {
background: $highlight;
color: $text-gray-dark !important;
}

@include selection("img") {
background: transparentize($highlight, 0.25);
}
1 change: 1 addition & 0 deletions src/stylesheets/themes/hugo-terminal-orange/syntax.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "github-syntax-dark/lib/github-dark";
11 changes: 11 additions & 0 deletions src/stylesheets/themes/hugo-terminal-orange/utterances.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@import "./variables";
@import "../../utterances";
@import "./syntax";
@import "./button.scss";
@import "./glow.scss";
@import "./heading.scss";
@import "./comment.scss";
@import "./selection.scss";
@import "./placeholder.scss";
@import "./combobox.scss";
@import "./code.scss";
25 changes: 25 additions & 0 deletions src/stylesheets/themes/hugo-terminal-orange/variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
$orange: rgb(255,168,106);
$orange-200: #ffd1ac;
$gray-000: #181818;
$gray-100: #2B303B;/*comment header bg*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a space between the comment character and the comment content, for example:

/* comment header bg */

This is not required, but I recommend it.

$gray-200: #24292e;
$gray-300: #4e4c4b;
$gray-400: #586069;
$gray-600: #bbbbbb;
$gray-700: #959da5;
$gray-900: #24292e;
$bg-white: #222129; /*commnet bg*/
$bg-gray: $gray-100; /*source code bg*/
$bg-gray-light: darken($bg-gray, 5%);
$border-gray: $gray-300; /*comment*/
$border-gray-dark: $border-gray;
$black-fade-15: rgba(#fff, 0.15);
$black-fade-30: rgba(#fff, 0.3);
$text-gray: #c9c9c9;
$text-gray-dark: #f7f7f7;
$text-blue: $orange;
$bg-blue-light: #212021;
$bg-page: #222129;

$highlight: $orange;
$line: #6f6e6e;
3 changes: 1 addition & 2 deletions tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
"no-shadowed-variable": false,
"no-string-literal": false,
"trailing-comma": [false],
"member-ordering": [true, "fields-first"],
"array-type": [true, "array"],
"arrow-parens": false,
"max-classes-per-file": [false],
"max-classes-per-file": false,
"prefer-for-of": false,
"no-implicit-dependencies": false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in this "PR", this file should not be modified. Because, even if it needs to be modified, it has nothing to do with the subject.

}
Expand Down
Loading