mirror of
https://github.com/zyachel/quetre.git
synced 2025-04-03 21:17:36 +03:00
Add option for direct deployment to heroku and other small fixes
This commit is contained in:
parent
7bcd19d8b0
commit
50b0308f7d
19 changed files with 297 additions and 1541 deletions
|
@ -1,7 +1,7 @@
|
|||
NODE_ENV=production #if set to development, morgan middleware will log every request
|
||||
PORT=3000 # if unset, default back to 3000
|
||||
|
||||
#optional properties. default shown. comment out by removing # to enable them.
|
||||
#optional properties. default shown. enable by removing # in front of them.
|
||||
|
||||
#user agent and accept header that quora will see
|
||||
#AXIOS_USER_AGENT='axios/0.26.1'
|
||||
|
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,4 +1,5 @@
|
|||
.vscode/*
|
||||
node_modules/*
|
||||
.env
|
||||
dev-data/*
|
||||
dev-data/*
|
||||
public/css/*
|
12
README.md
12
README.md
|
@ -41,6 +41,16 @@ It enables you to see answers without ads, trackers, and other such bloat.
|
|||
|
||||
---
|
||||
|
||||
## **Instances**
|
||||
|
||||
[quetre.herokuapp.com](https://quetre.herokuapp.com)
|
||||
|
||||
Centralisation is bad. Deploy your own instance if you can. It's easy and free with heroku. The instance mentioned above is itself using the free tier(of heroku).
|
||||
Click the button below to get started:
|
||||
[](https://heroku.com/deploy?template=https://github.com/zyachel/quetre)
|
||||
|
||||
---
|
||||
|
||||
## **Comparision**
|
||||
|
||||
### Speed
|
||||
|
@ -59,7 +69,7 @@ URL for comparision: https://www.quora.com/How-does-the-Z-boson-decay
|
|||
|
||||
### Usability
|
||||
|
||||
- Quora: You can't even see an answer(except for some hacks) if you're not signed in. They put a big banner in front of answers to sign you up/in forcefully.
|
||||
- Quora: You can't even see an answer(unless you do some hacks) if you're not signed in. They put a big banner in front of answers to sign you up/in forcefully.
|
||||
|
||||
- Quetre: There is no accounts system. Just read whatever you want to read. Zero fuss.
|
||||
|
||||
|
|
8
app.json
Normal file
8
app.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"name": "Quetre",
|
||||
"description": "A libre front-end for Quora.",
|
||||
"keywords": ["front-end", "quora", "privacy", "foss"],
|
||||
"website": "https://quetre.herokuapp.com/",
|
||||
"repository": "https://github.com/zyachel/quetre",
|
||||
"logo": "https://quetre.herokuapp.com/icon.svg"
|
||||
}
|
|
@ -21,7 +21,6 @@ export const unansweredQuestion = catchAsyncErrors(async (req, res, next) => {
|
|||
res.status(200).render('answers', {
|
||||
title: answers.question.text.spans.map(span => span.text).join(''),
|
||||
data: answers,
|
||||
math: answers.hasMath,
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -35,7 +34,6 @@ export const answeredQuestion = catchAsyncErrors(async (req, res, next) => {
|
|||
res.status(200).render('answers', {
|
||||
title: answers.question.text.spans.map(span => span.text).join(''),
|
||||
data: answers,
|
||||
math: answers.hasMath,
|
||||
});
|
||||
});
|
||||
|
||||
|
|
16
package.json
16
package.json
|
@ -28,27 +28,27 @@
|
|||
},
|
||||
"homepage": "https://github.com/zyachel/quetre#readme",
|
||||
"dependencies": {
|
||||
"axios": "^0.26.1",
|
||||
"cheerio": "^1.0.0-rc.10",
|
||||
"axios": "^0.27.2",
|
||||
"cheerio": "1.0.0-rc.10",
|
||||
"compression": "^1.7.4",
|
||||
"dotenv": "^16.0.0",
|
||||
"express": "^4.17.3",
|
||||
"express": "^4.18.1",
|
||||
"helmet": "^5.0.2",
|
||||
"morgan": "^1.10.0",
|
||||
"pug": "^3.0.2",
|
||||
"sass": "^1.50.0"
|
||||
"sass": "^1.51.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/create-config": "^0.1.2",
|
||||
"@types/express": "^4.17.13",
|
||||
"eslint": "^7.32.0",
|
||||
"@eslint/create-config": "^0.2.0",
|
||||
"eslint": "^8.14.0",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"nodemon": "^2.0.15",
|
||||
"nodemon": "^2.0.16",
|
||||
"prettier": "^2.6.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/express": "^4.17.13",
|
||||
"eslint-plugin-import": "^2.25.2",
|
||||
"prettier": "^2.3.0"
|
||||
},
|
||||
|
|
625
pnpm-lock.yaml
generated
625
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
@ -1,9 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square150x150logo src="/mstile-150x150.png"/>
|
||||
<TileColor>#0f0e15</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
File diff suppressed because it is too large
Load diff
|
@ -1 +0,0 @@
|
|||
{"version":3,"sourceRoot":"","sources":["../../views/sass/_mixins.scss","../../views/sass/_base.scss","../../views/sass/_components.scss","../../views/sass/_layouts.scss","../../views/sass/_pages.scss"],"names":[],"mappings":";AAUA;EACE;IACE;IACA;;EAEF;IACE;IACA;;;ACTJ;EACE;EACA;EACA;;AAEF;EACE;EACA;EACA;;AAMF;EACE;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;AAAA;AAAA;EAGE;EACA;EACA;;;AAMF;EDhBI;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAQA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;;ACeF;EDfE;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;;ACsBA;EAFF;IDpBE;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA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AmEI;;;;AAOJ;EACE;EACA;;AAEA;EACE;EACA;;;AAIJ;EACE;EACA;;AAGA;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EAEA;EACA;EAGA;EACA;;AAGA;EACE;EACA;;AAIJ;EACE;EACA;;AAGF;EACE;EACA;EAEA;EACA;EACA;EACA;EACA;EAEA;;AAIF;EACE;;AAIF;EACE;EACA;EAUA;;AAPA;EAEE;;AASJ;EAEE;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAOF;EACE;;AAEF;EACE;;AAEF;EFzTA;EACA,OE0TI;EFnTF;EAIA;;AATF;EACE,OEwTE;;AAKJ;EAEE;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;;AAMF;EACE;EAEA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EAEA;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;EAEA;EACA;;;AAOJ;EACE;EACA;;AAEA;EACE;EACA;EACA;;AAKF;EAEE;;;AAOJ;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;;;ACtcJ;EACE;;AAEA;EACE;EACA;EAEA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AH6EF;EGlFA;IAQI;;;AH0EJ;EGlFA;IAWI;;;AAIJ;EACE;EACA;EACA;EACA;;AH+DF;EGnEA;IAOI;;;AAIJ;EACE;;AAGF;EAEE;;AHkDF;EGpDA;IAKI;;;AAIJ;EACE;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EHrBF;EACA,OGsBuB;EHfrB;;AALF;EACE,OGmByC;;AH8B3C;EGlCA;IAOI;;;AAIJ;EACE;EACA;;AHqBF;EGvBA;IAKI;IACA;;;AAIJ;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AHEF;EGN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J;EJ1IA;EACA,OI0IuB;EJnIrB;;AALF;EACE,OIuI2C;;AAG7C;EAEE;EACA;;AAIF;EACE;;;AAQJ;EAEE;EAEA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EAEA;EACA;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AJzIF;EIwIA;IAII;;;AAIJ;EJrMA;EACA,OIqMuB;EJ9LrB;;AALF;EACE,OIkM2C;;AAG7C;EACE;EACA;;AAEA;EACE;EACA;EACA;;AJ3JJ;EIoJA;IAWI;;EAEA;IACE;;;AJlKN;EIyGF;IA+DI;IACA;;;AJzKF;EIyGF;IAoEI;IACA;;;AJ9KF;EIyGF;IAwEI","file":"styles.css"}
|
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 15 KiB |
19
public/icon.svg
Normal file
19
public/icon.svg
Normal file
|
@ -0,0 +1,19 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" width="36.158752mm" height="36.158726mm"><svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="36.158752mm" height="36.158726mm" viewBox="0 0 36.158751 36.158726" version="1.1" id="SvgjsSvg1006" sodipodi:docname="drawing.svg" inkscape:version="1.0.2 (e86c870879, 2021-01-15)">
|
||||
<sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1600" inkscape:window-height="900" id="SvgjsSodipodi:namedview1005" showgrid="false" fit-margin-top="3.5154" fit-margin-bottom="3.5154" lock-margins="false" fit-margin-left="0" fit-margin-right="0" inkscape:zoom="1.4209209" inkscape:cx="57.207622" inkscape:cy="68.527929" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="0" inkscape:current-layer="svg8"></sodipodi:namedview>
|
||||
<defs id="SvgjsDefs1004">
|
||||
<rect x="47.332867" y="114.49135" width="127.47217" height="96.5373" id="SvgjsRect1003"></rect>
|
||||
</defs>
|
||||
<metadata id="SvgjsMetadata1002">
|
||||
<rdf:rdf>
|
||||
<cc:work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"></dc:type>
|
||||
<dc:title></dc:title>
|
||||
</cc:work>
|
||||
</rdf:rdf>
|
||||
</metadata>
|
||||
<g id="SvgjsG1001" transform="matrix(0.22032234,0,0,0.22032237,-4.7782267,-19.506895)">
|
||||
<text xml:space="preserve" id="SvgjsText1000" style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect12);fill:#34a19b;fill-opacity:1;stroke:none;stroke-width:0.999973;stroke-miterlimit:4;stroke-dasharray:none;" transform="matrix(13.895371,0,0,13.895371,-642.33223,-1518.0354)" svgjs:data="{"leading":"1.3"}"><tspan x="47.332031" y="124.28174" svgjs:data="{"leading":"1.3"}"><tspan style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.5833px;font-family:'Quicksand Medium';-inkscape-font-specification:'Quicksand Medium, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#34a19b;fill-opacity:1;stroke-width:0.999973;stroke-miterlimit:4;stroke-dasharray:none" svgjs:data="{"leading":"1.3"}">Qr</tspan></tspan></text>
|
||||
</g>
|
||||
</svg><style>@media (prefers-color-scheme: light) { :root { filter: none; } }
|
||||
</style></svg>
|
After Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.9 KiB |
|
@ -1,63 +0,0 @@
|
|||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
||||
width="1158.000000pt" height="1158.000000pt" viewBox="0 0 1158.000000 1158.000000"
|
||||
preserveAspectRatio="xMidYMid meet">
|
||||
<metadata>
|
||||
Created by potrace 1.14, written by Peter Selinger 2001-2017
|
||||
</metadata>
|
||||
<g transform="translate(0.000000,1158.000000) scale(0.100000,-0.100000)"
|
||||
fill="#000000" stroke="none">
|
||||
<path d="M3278 10395 c-1 -1 -41 -5 -88 -9 -105 -8 -150 -13 -265 -31 -93 -15
|
||||
-102 -17 -195 -36 -30 -6 -62 -13 -70 -14 -8 -2 -15 -4 -15 -5 0 -1 -11 -4
|
||||
-25 -6 -14 -3 -43 -10 -65 -16 -22 -6 -42 -12 -45 -13 -182 -44 -577 -215
|
||||
-747 -322 -29 -18 -54 -33 -57 -33 -16 0 -336 -225 -404 -284 -15 -13 -49 -43
|
||||
-77 -66 -360 -305 -695 -762 -900 -1230 -144 -329 -255 -736 -290 -1070 -4
|
||||
-36 -9 -74 -11 -84 -11 -62 -19 -243 -19 -466 0 -255 8 -405 30 -555 3 -22 8
|
||||
-58 10 -80 3 -22 7 -51 10 -65 8 -39 13 -64 19 -101 3 -19 12 -65 21 -104 9
|
||||
-38 18 -77 20 -85 6 -31 27 -109 56 -205 314 -1044 1057 -1880 2006 -2258 215
|
||||
-85 484 -165 625 -183 27 -4 50 -10 53 -14 3 -5 -474 -186 -540 -204 -5 -2
|
||||
-17 -6 -25 -9 -16 -7 -41 -15 -200 -71 -58 -20 -114 -41 -125 -46 -11 -5 -58
|
||||
-23 -105 -39 -47 -16 -112 -40 -145 -52 -191 -70 -290 -224 -281 -439 9 -212
|
||||
164 -399 375 -454 55 -14 178 -12 256 4 30 6 58 12 62 12 27 3 161 56 296 117
|
||||
97 44 187 78 230 86 83 17 357 14 447 -4 30 -7 68 -14 85 -17 110 -19 376
|
||||
-140 705 -318 354 -193 742 -344 1005 -391 68 -12 147 -25 195 -31 30 -3 66
|
||||
-8 80 -9 200 -26 795 -26 839 -1 4 2 30 7 60 10 179 21 526 122 762 222 415
|
||||
175 709 394 817 609 92 183 56 380 -95 529 -98 97 -206 139 -338 132 -123 -7
|
||||
-218 -58 -425 -230 -297 -246 -558 -363 -880 -395 -72 -7 -328 -6 -380 2 -14
|
||||
3 -52 8 -85 12 -156 19 -424 104 -680 218 -101 44 -242 111 -475 224 -389 189
|
||||
-482 223 -725 263 -33 5 -64 10 -69 10 -20 0 5 12 100 46 54 20 142 52 194 71
|
||||
52 19 118 42 145 52 28 10 113 41 190 69 77 28 197 65 266 81 437 103 854 302
|
||||
1217 579 87 66 112 87 211 177 423 383 725 837 954 1435 55 141 139 433 153
|
||||
528 3 20 9 51 14 67 5 17 11 48 14 70 42 301 43 314 52 485 11 211 6 562 -10
|
||||
660 -3 14 -7 52 -10 85 -4 33 -8 71 -10 85 -10 64 -20 126 -22 140 -12 108
|
||||
-80 373 -146 575 -117 358 -354 804 -575 1085 -379 482 -880 856 -1443 1078
|
||||
-167 65 -434 142 -580 167 -19 3 -42 8 -50 10 -8 2 -37 6 -65 10 -27 3 -57 8
|
||||
-65 10 -8 2 -46 6 -83 10 -37 3 -78 9 -90 12 -24 5 -573 14 -579 8z m442 -979
|
||||
c47 -4 96 -9 110 -11 14 -2 45 -7 70 -10 37 -6 139 -26 200 -40 308 -73 679
|
||||
-268 950 -501 205 -176 407 -433 555 -706 122 -227 247 -585 285 -820 5 -35
|
||||
12 -72 14 -83 2 -12 7 -48 11 -80 4 -33 9 -69 11 -80 23 -123 22 -592 -1 -765
|
||||
-2 -19 -7 -57 -10 -85 -5 -42 -22 -136 -41 -233 -55 -275 -178 -598 -320 -842
|
||||
-144 -246 -371 -513 -568 -665 -21 -17 -48 -38 -60 -49 -51 -45 -238 -161
|
||||
-354 -219 -214 -107 -461 -187 -662 -213 -30 -3 -66 -8 -80 -10 -183 -28 -571
|
||||
-21 -745 12 -11 2 -33 7 -50 9 -204 36 -458 124 -655 228 -73 38 -256 155
|
||||
-282 180 -7 6 -29 24 -48 38 -97 73 -262 238 -364 364 -275 340 -461 744 -550
|
||||
1191 -23 116 -30 159 -41 244 -21 155 -28 611 -12 760 4 41 10 98 13 125 3 28
|
||||
7 56 9 63 3 7 7 34 11 60 3 26 10 67 16 92 5 25 12 56 14 70 20 108 96 349
|
||||
156 490 41 97 133 281 168 335 11 17 23 37 26 45 15 32 140 209 203 285 157
|
||||
192 366 372 576 500 82 50 316 165 335 165 6 0 18 4 28 10 18 11 185 66 224
|
||||
74 12 3 41 10 63 15 22 6 54 12 70 15 17 3 41 8 55 11 13 2 42 7 65 10 22 3
|
||||
51 8 65 10 14 2 66 7 115 11 50 3 91 7 92 8 5 4 259 -2 333 -8z"/>
|
||||
<path d="M10918 8616 c-1 -2 -52 -6 -113 -10 -119 -6 -143 -10 -250 -32 -38
|
||||
-8 -79 -17 -91 -19 -11 -3 -54 -16 -95 -29 -284 -91 -542 -249 -768 -469 -145
|
||||
-142 -255 -290 -354 -476 l-53 -99 0 286 c0 198 -5 304 -14 342 -31 134 -143
|
||||
274 -262 330 -293 137 -629 -20 -698 -325 -13 -56 -17 -4527 -4 -4611 4 -26
|
||||
17 -73 30 -105 79 -194 235 -290 463 -285 129 3 221 37 312 113 76 64 149 193
|
||||
166 291 3 21 7 649 8 1397 1 748 5 1378 9 1400 3 22 8 54 11 70 3 17 7 48 11
|
||||
70 41 269 188 585 381 825 247 305 627 499 937 477 100 -7 102 -8 272 -58 202
|
||||
-59 249 -68 349 -66 77 2 100 7 156 33 170 80 262 252 255 475 -2 75 -7 96
|
||||
-35 153 -65 132 -256 261 -445 302 -12 3 -50 7 -86 10 -36 3 -70 7 -77 9 -6 2
|
||||
-13 2 -15 1z"/>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 4.1 KiB |
10
server.js
10
server.js
|
@ -13,11 +13,6 @@ process.on('uncaughtException', err => {
|
|||
process.exit(1);
|
||||
});
|
||||
|
||||
process.on('unhandledRejection', err => {
|
||||
log(err, 'error');
|
||||
server.close(() => process.exit(1));
|
||||
});
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
// STARTING SERVER
|
||||
////////////////////////////////////////////////////////
|
||||
|
@ -28,3 +23,8 @@ const server = app.listen(port, () =>
|
|||
'success'
|
||||
)
|
||||
);
|
||||
|
||||
process.on('unhandledRejection', err => {
|
||||
log(err, 'error');
|
||||
server.close(() => process.exit(1));
|
||||
});
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
export const nonSlugRoutes = [
|
||||
'favicon.ico',
|
||||
'apple-touch-icon.png',
|
||||
'favicon-32x32.png',
|
||||
'favicon-16x16.png',
|
||||
'safari-pinned-tab.svg',
|
||||
'site.webmanifest',
|
||||
'icon.svg',
|
||||
];
|
||||
|
|
16
utils/log.js
16
utils/log.js
|
@ -18,16 +18,12 @@ function log(toLog, type = null) {
|
|||
};
|
||||
|
||||
// changing some values according to the type provided
|
||||
switch (type) {
|
||||
case 'success':
|
||||
data.colorCode = 32;
|
||||
data.emoji = '🟢';
|
||||
break;
|
||||
|
||||
case 'error':
|
||||
data.colorCode = 31;
|
||||
data.emoji = '🔴';
|
||||
break;
|
||||
if (type === 'success') {
|
||||
data.colorCode = 32;
|
||||
data.emoji = '🟢';
|
||||
} else if (type === 'error') {
|
||||
data.colorCode = 31;
|
||||
data.emoji = '🔴';
|
||||
}
|
||||
|
||||
// actually logging to the console
|
||||
|
|
|
@ -12,19 +12,12 @@ html(lang='en')
|
|||
link(rel='preload', href='/fonts/WorkSans.woff2', as='font', type='font/woff2', crossorigin)
|
||||
link(rel='preload', href='/fonts/Quicksand.woff2', as='font', type='font/woff2', crossorigin)
|
||||
link(rel='preload stylesheet', href='/css/styles.css', as='style', crossorigin)
|
||||
//- favicons
|
||||
link(rel="shortcut icon", href="/favicon.ico", type="image/x-icon")
|
||||
link(rel="icon", href="/favicon.ico", type="image/x-icon")
|
||||
link(rel="icon", type="image/png", sizes="32x32", href="/favicon-32x32.png")
|
||||
link(rel="apple-touch-icon", sizes="180x180", href="/apple-touch-icon.png")
|
||||
link(rel="mask-icon", href="/safari-pinned-tab.svg", color="#0f0e15")
|
||||
link(rel="manifest", href="/site.webmanifest")
|
||||
meta(name="msapplication-TileColor", content="#0f0e15")
|
||||
//- favicons & theme color
|
||||
meta(name="theme-color", content="#0f0e15")
|
||||
|
||||
|
||||
|
||||
|
||||
link(rel="icon", href="/icon.svg", type="image/svg+xml")
|
||||
link(rel='icon', href='/favicon.ico', sizes='any')
|
||||
link(rel="apple-touch-icon", href="/apple-touch-icon.png")
|
||||
link(rel="manifest", href="/site.webmanifest")
|
||||
//- own script
|
||||
script(src='/js/index.js', defer)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue