Skip to content

Commit 42229a8

Browse files
authored
Merge pull request #1101 from wherelse/update-cdn
chore: use local katex, remixicon and font
2 parents 55bff47 + 0374add commit 42229a8

File tree

6 files changed

+27
-8
lines changed

6 files changed

+27
-8
lines changed

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"lint": "vue-cli-service lint"
2323
},
2424
"dependencies": {
25+
"@fontsource/noto-serif": "^4.5.9",
2526
"@iktakahiro/markdown-it-katex": "^3.1.0",
2627
"@sentry/electron": "^1.2.0",
2728
"ant-design-vue": "^1.3.5",
@@ -36,6 +37,7 @@
3637
"hpagent": "^1.0.0",
3738
"isomorphic-git": "1.17.1",
3839
"junk": "^3.1.0",
40+
"katex": "0.12.0",
3941
"less": "^3.9.0",
4042
"lowdb": "^1.0.0",
4143
"macaddress": "^0.2.9",
@@ -55,6 +57,7 @@
5557
"node-ssh": "^6.0.0",
5658
"normalize-path": "^3.0.0",
5759
"prismjs": "^1.16.0",
60+
"remixicon": "2.3.0",
5861
"shortid": "^2.2.14",
5962
"simple-get": "^4.0.1",
6063
"slug": "^0.9.3",

public/default-files/themes/notes/assets/styles/components/post.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
.post-content {
4848
width: 100%;
4949
flex-shrink: 0;
50-
font-family: "Droid Serif","PingFang SC","Hiragino Sans GB","Droid Sans Fallback","Microsoft YaHei",sans-serif;
50+
font-family: "Noto Serif","PingFang SC","Hiragino Sans GB","Droid Sans Fallback","Microsoft YaHei",sans-serif;
5151

5252
a {
5353
color: rgba(0,0,0,.98);

public/index.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,6 @@
232232
}
233233

234234
</style>
235-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.2/dist/katex.min.css" integrity="sha384-yFRtMMDnQtDRO8rLpMIKrtPCD5jdktao2TV19YiZYWMDkUR5GQZR/NOVTdquEx1j" crossorigin="anonymous">
236-
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.2/dist/katex.min.js" integrity="sha384-9Nhn55MVVN0/4OFx7EE5kpFBPsEMZxKTCnA+4fqDmg12eCTqGi6+BB2LjY8brQxJ" crossorigin="anonymous"></script>
237-
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Droid+Serif:400,700">
238-
<link href="https://cdn.jsdelivr.net/npm/remixicon@2.3.0/fonts/remixicon.css" rel="stylesheet">
239235
<script src="https://cdn.headwayapp.co/widget.js"></script>
240236
</head>
241237
<body>

src/main.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import Vue from 'vue'
22
import moment from 'moment'
33
import Antd from 'ant-design-vue'
4+
import 'remixicon/fonts/remixicon.css'
5+
import 'katex/dist/katex.min.css'
6+
import '@fontsource/noto-serif/index.css'
47
import '@/assets/styles/tailwind.css'
58
import '@/assets/styles/main.less'
69
import VueI18n from 'vue-i18n'

src/views/article/ArticleUpdate.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ export default class ArticleUpdate extends Vue {
905905
.preview-container {
906906
width: 100%;
907907
flex-shrink: 0;
908-
font-family: "Droid Serif","PingFang SC","Hiragino Sans GB","Droid Sans Fallback","Microsoft YaHei",sans-serif;
908+
font-family: "Noto Serif","PingFang SC","Hiragino Sans GB","Droid Sans Fallback","Microsoft YaHei",sans-serif;
909909
font-size: 15px;
910910
911911
/deep/ a {
@@ -1141,7 +1141,7 @@ export default class ArticleUpdate extends Vue {
11411141
.preview-title {
11421142
font-size: 24px;
11431143
font-weight: bold;
1144-
font-family: "Droid Serif","PingFang SC","Hiragino Sans GB","Droid Sans Fallback","Microsoft YaHei",sans-serif;
1144+
font-family: "Noto Serif","PingFang SC","Hiragino Sans GB","Droid Sans Fallback","Microsoft YaHei",sans-serif;
11451145
}
11461146
11471147
.preview-date {
@@ -1211,7 +1211,7 @@ export default class ArticleUpdate extends Vue {
12111211
}
12121212
.number {
12131213
font-size: 18px;
1214-
font-family: 'Droid Serif';
1214+
font-family: 'Noto Serif';
12151215
}
12161216
}
12171217
}

yarn.lock

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,11 @@
715715
global-agent "^3.0.0"
716716
global-tunnel-ng "^2.7.1"
717717

718+
"@fontsource/noto-serif@^4.5.9":
719+
version "4.5.9"
720+
resolved "https://registry.npmjs.org/@fontsource/noto-serif/-/noto-serif-4.5.9.tgz#dae24fe204a8bfaaf98121efbc3adf0b0682af43"
721+
integrity sha512-qvVrkuEwAKGKswmaETS9RVzrGTqlvQRHK60TJ9ncH1RA7ujqb8+o8lLgU3dK3KcggQWWfTa/ozNU8sNc1hXH4g==
722+
718723
"@hapi/address@2.x.x":
719724
version "2.1.4"
720725
resolved "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz"
@@ -6716,6 +6721,13 @@ junk@^3.1.0:
67166721
resolved "https://registry.npmjs.org/junk/-/junk-3.1.0.tgz"
67176722
integrity sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ==
67186723

6724+
katex@0.12.0:
6725+
version "0.12.0"
6726+
resolved "https://registry.yarnpkg.com/katex/-/katex-0.12.0.tgz#2fb1c665dbd2b043edcf8a1f5c555f46beaa0cb9"
6727+
integrity sha512-y+8btoc/CK70XqcHqjxiGWBOeIL8upbS0peTPXTvgrh21n1RiWWcIpSWM+4uXq+IAgNh9YYQWdc7LVDPDAEEAg==
6728+
dependencies:
6729+
commander "^2.19.0"
6730+
67196731
katex@^0.10.0:
67206732
version "0.10.1"
67216733
resolved "https://registry.npmjs.org/katex/-/katex-0.10.1.tgz"
@@ -9526,6 +9538,11 @@ relateurl@0.2.x:
95269538
version "0.2.7"
95279539
resolved "http://registry.npm.taobao.org/relateurl/download/relateurl-0.2.7.tgz"
95289540

9541+
remixicon@2.3.0:
9542+
version "2.3.0"
9543+
resolved "https://registry.yarnpkg.com/remixicon/-/remixicon-2.3.0.tgz#6425224ca646ee447d2fcff882c2ff27384b0820"
9544+
integrity sha512-qm6B+EZBMV/2U1q0dF/qVChaj08HxRHZ3h2XUcpR9EsLhRS4Y4r+edP14CPvY/h0sgTE7Uo+XWJx1eIR5ejptA==
9545+
95299546
remove-trailing-separator@^1.0.1:
95309547
version "1.1.0"
95319548
resolved "http://registry.npm.taobao.org/remove-trailing-separator/download/remove-trailing-separator-1.1.0.tgz"

0 commit comments

Comments
 (0)