Skip to content

Commit e4168e9

Browse files
backup
1 parent 3c78385 commit e4168e9

File tree

14 files changed

+3785
-4307
lines changed

14 files changed

+3785
-4307
lines changed

package-lock.json

Lines changed: 3387 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,25 @@
2020
"start": "parcel serve src/*.html src/client.ts src/stylesheets/themes/*/{index,utterances}.scss --no-hmr --port 4000",
2121
"build": "parcel build src/*.html src/client.ts src/stylesheets/themes/*/{index,utterances}.scss --experimental-scope-hoisting",
2222
"lint": "tslint --project tsconfig.json",
23-
"predeploy": "yarn run build && touch dist/.nojekyll && echo 'utteranc.es' > dist/CNAME",
24-
"deploy": "gh-pages --dist dist"
23+
"predeploy": "yarn run build && touch dist/.nojekyll",
24+
"deploy": "gh-pages --dest utterances --dist dist"
2525
},
2626
"devDependencies": {
2727
"@primer/css": "^14.2.0",
2828
"autoprefixer": "^9.7.4",
29+
"cssnano": "^4.1.10",
2930
"gh-pages": "^2.2.0",
3031
"github-syntax-dark": "^0.5.0",
3132
"github-syntax-light": "^0.5.0",
32-
"parcel-bundler": "^1.12.4",
3333
"parcel-plugin-clean-dist": "^0.0.6",
3434
"posthtml-expressions": "^1.2.0",
3535
"posthtml-include": "^1.4.0",
3636
"posthtml-md": "^1.1.0",
3737
"sass": "^1.26.3",
3838
"tslint": "^6.1.0",
3939
"typescript": "^3.8.3"
40+
},
41+
"dependencies": {
42+
"cfworker": "git+https://github.com/cfworker/cfworker.git"
4043
}
4144
}

src/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ let script = document.currentScript as HTMLScriptElement;
1919
if (script === undefined) {
2020
// Internet Explorer :(
2121
// tslint:disable-next-line:max-line-length
22-
script = document.querySelector('script[src^="https://utteranc.es/client.js"],script[src^="http://localhost:4000/client.js"]') as HTMLScriptElement;
22+
script = document.querySelector('script[src^="https://allenfrostline.com/utterances/client.js"],script[src^="http://localhost:4000/client.js"]') as HTMLScriptElement;
2323
}
2424

2525
// gather script element's attributes
@@ -76,7 +76,7 @@ document.head.insertAdjacentHTML(
7676
</style>`);
7777

7878
// create the comments iframe and it's responsive container
79-
const utterancesOrigin = script.src.match(/^https:\/\/utteranc\.es|http:\/\/localhost:\d+/)![0];
79+
const utterancesOrigin = script.src.match(/^https:\/\/allenfrostline.com\/utterances|http:\/\/localhost:\d+/)![0];
8080
const url = `${utterancesOrigin}/utterances.html`;
8181
script.insertAdjacentHTML(
8282
'afterend',

src/configuration-component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ export class ConfigurationComponent {
137137
<option value="dark-blue">Dark Blue</option>
138138
<option value="photon-dark">Photon Dark</option>
139139
<option value="boxy-light">Boxy Light</option>
140+
<option value="nella-red">Nella Red</option>
140141
</select>
141142
142143
<h3 id="heading-enable">Enable Utterances</h3>
@@ -212,7 +213,7 @@ export class ConfigurationComponent {
212213

213214
private makeConfigScript(attrs: string) {
214215
// tslint:disable-next-line:max-line-length
215-
return `<pre><span class="pl-s1">&lt;<span class="pl-ent">script</span> <span class="pl-e">src</span>=<span class="pl-s"><span class="pl-pds">"</span>https://utteranc.es/client.js<span class="pl-pds">"</span></span></span>\n${attrs}\n<span class="pl-s1"> <span class="pl-e">async</span>&gt;</span>\n<span class="pl-s1">&lt;/<span class="pl-ent">script</span>&gt;</span></pre>`;
216+
return `<pre><span class="pl-s1">&lt;<span class="pl-ent">script</span> <span class="pl-e">src</span>=<span class="pl-s"><span class="pl-pds">"</span>https://allenfrostline.com/utterances/client.js<span class="pl-pds">"</span></span></span>\n${attrs}\n<span class="pl-s1"> <span class="pl-e">async</span>&gt;</span>\n<span class="pl-s1">&lt;/<span class="pl-ent">script</span>&gt;</span></pre>`;
216217
}
217218

218219
private copyTextToClipboard(text: string) {

src/index.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
<link rel="preconnect" href="https://api.github.com">
99
<link rel="preconnect" href="https://avatars3.githubusercontent.com">
1010
<if condition="NODE_ENV === 'production'">
11-
<link id="theme-stylesheet" rel="stylesheet" href="https://utteranc.es/stylesheets/themes/github-light/index.css">
11+
<link id="theme-stylesheet" rel="stylesheet" href="https://allenfrostline.com/utterances/stylesheets/themes/nella-red/index.css">
1212
</if>
1313
<else>
14-
<link id="theme-stylesheet" rel="stylesheet" href="http://localhost:4000/stylesheets/themes/github-light/index.css">
14+
<link id="theme-stylesheet" rel="stylesheet" href="http://localhost:4000/stylesheets/themes/nella-red/index.css">
1515
</else>
1616
<link rel="apple-touch-icon" sizes="180x180" href="./icons/apple-touch-icon.png">
1717
<link rel="icon" type="image/png" sizes="32x32" href="./icons/favicon-32x32.png">
@@ -20,7 +20,7 @@
2020
<link rel="mask-icon" href="./icons/safari-pinned-tab.svg" color="#4c2889">
2121
<link rel="shortcut icon" href="./icons/favicon.ico">
2222
<if condition="NODE_ENV === 'production'">
23-
<link rel="canonical" href="https://utteranc.es">
23+
<link rel="canonical" href="https://allenfrostline.com/utterances">
2424
</if>
2525
<else>
2626
<link rel="canonical" href="http://localhost:4000/index.html">
@@ -67,11 +67,11 @@
6767
<script src="./index.ts"></script>
6868

6969
<if condition="NODE_ENV === 'production'">
70-
<script src="https://utteranc.es/client.js"
71-
repo="utterance/utterances"
72-
issue-term="homepage"
70+
<script src="https://allenfrostline.com/utterances/client.js"
71+
repo="allenfrostline/allenfrostline.github.io"
72+
issue-term="pathname"
7373
crossorigin="anonymous"
74-
theme="github-light"
74+
theme="nella-red"
7575
async>
7676
</script>
7777
</if>
@@ -81,7 +81,7 @@
8181
issue-term="pathname"
8282
label="💬 comment"
8383
crossorigin="anonymous"
84-
theme="github-light"
84+
theme="nella-red"
8585
async>
8686
</script>
8787
</else>
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
.btn-primary {
2+
display: inline-block;
3+
padding: 5px 8px;
4+
background: $red-normal;
5+
border-bottom: 4px solid $red-dark;
6+
border-right: 4px solid $red-dark;
7+
border-top-right-radius: 5px;
8+
border-bottom-left-radius: 5px;
9+
border-top-left-radius: 5px;
10+
border-bottom-right-radius: 5px;
11+
font-weight: 600;
12+
font-size: 16px;
13+
position: relative;
14+
height: 34px;
15+
line-height: 20px;
16+
outline-width: 0px;
17+
vertical-align: middle;
18+
color: $white;
19+
}
20+
21+
.btn-primary:hover {
22+
background: $red-light;
23+
}
24+
25+
.btn-primary:active {
26+
background: $red-dark2;
27+
}
28+
29+
.btn-primary:disabled {
30+
background: $red-normal;
31+
opacity: 0.4;
32+
}
33+
34+
.btn-outline {
35+
color: $gray-dark;
36+
background: none;
37+
vertical-align: middle;
38+
border-width: 0px;
39+
padding: 8px 6px!important;
40+
}
41+
42+
.btn-outline:hover {
43+
color: $white;
44+
background: $red-normal;
45+
border-width: 0px;
46+
}
47+
48+
.btn-outline:disabled {
49+
color: $white;
50+
background: none;
51+
border-width: 0px;
52+
}
53+
54+
.reactions-popover summary {
55+
padding: 8px 10px!important;
56+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
body, .markdown-body, .textarea {
2+
font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Source Han Sans CN', 'Source Han Serif', 'Songti SC', serif;
3+
font-size: 16px!important;
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@import "./variables";
2+
@import "../../index";
3+
@import "./syntax";
4+
@import "./button.scss";
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
.timeline summary:hover {
2+
color: $red-light;
3+
}
4+
5+
.timeline a {
6+
text-decoration: none;
7+
}
8+
9+
.markdown-body a {
10+
color: $red-light;
11+
}
12+
13+
.markdown-body pre, code {
14+
font-size: 75%!important;
15+
}
16+
17+
.markdown-info svg {
18+
vertical-align: -4px!important;
19+
padding-left: 2px;
20+
}
21+
22+
.timeline-comment button {
23+
font-size: 14px;
24+
}
25+
26+
.timeline-comment textarea {
27+
font-size: 16px;
28+
line-height: 24px;
29+
}
30+
31+
.comment-footer {
32+
border-width: 0;
33+
line-height: 25px;
34+
height: 40px!important;
35+
}
36+
37+
.timeline-header em {
38+
display: none;
39+
}
40+
41+
.timeline-header .text-link {
42+
font-style: italic;
43+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import "github-syntax-light/lib/github-light";

0 commit comments

Comments
 (0)