Skip to content

Commit

Permalink
Merge pull request #1101 from wherelse/update-cdn
Browse files Browse the repository at this point in the history
chore: use local katex, remixicon and font
  • Loading branch information
EryouHao authored Feb 5, 2023
2 parents 55bff47 + 0374add commit 42229a8
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 8 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@fontsource/noto-serif": "^4.5.9",
"@iktakahiro/markdown-it-katex": "^3.1.0",
"@sentry/electron": "^1.2.0",
"ant-design-vue": "^1.3.5",
Expand All @@ -36,6 +37,7 @@
"hpagent": "^1.0.0",
"isomorphic-git": "1.17.1",
"junk": "^3.1.0",
"katex": "0.12.0",
"less": "^3.9.0",
"lowdb": "^1.0.0",
"macaddress": "^0.2.9",
Expand All @@ -55,6 +57,7 @@
"node-ssh": "^6.0.0",
"normalize-path": "^3.0.0",
"prismjs": "^1.16.0",
"remixicon": "2.3.0",
"shortid": "^2.2.14",
"simple-get": "^4.0.1",
"slug": "^0.9.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
.post-content {
width: 100%;
flex-shrink: 0;
font-family: "Droid Serif","PingFang SC","Hiragino Sans GB","Droid Sans Fallback","Microsoft YaHei",sans-serif;
font-family: "Noto Serif","PingFang SC","Hiragino Sans GB","Droid Sans Fallback","Microsoft YaHei",sans-serif;

a {
color: rgba(0,0,0,.98);
Expand Down
4 changes: 0 additions & 4 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,6 @@
}

</style>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-yFRtMMDnQtDRO8rLpMIKrtPCD5jdktao2TV19YiZYWMDkUR5GQZR/NOVTdquEx1j" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-9Nhn55MVVN0/4OFx7EE5kpFBPsEMZxKTCnA+4fqDmg12eCTqGi6+BB2LjY8brQxJ" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Droid+Serif:400,700">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/fonts/remixicon.css" rel="stylesheet">
<script src="https://cdn.headwayapp.co/widget.js"></script>
</head>
<body>
Expand Down
3 changes: 3 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import Vue from 'vue'
import moment from 'moment'
import Antd from 'ant-design-vue'
import 'remixicon/fonts/remixicon.css'
import 'katex/dist/katex.min.css'
import '@fontsource/noto-serif/index.css'
import '@/assets/styles/tailwind.css'
import '@/assets/styles/main.less'
import VueI18n from 'vue-i18n'
Expand Down
6 changes: 3 additions & 3 deletions src/views/article/ArticleUpdate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ export default class ArticleUpdate extends Vue {
.preview-container {
width: 100%;
flex-shrink: 0;
font-family: "Droid Serif","PingFang SC","Hiragino Sans GB","Droid Sans Fallback","Microsoft YaHei",sans-serif;
font-family: "Noto Serif","PingFang SC","Hiragino Sans GB","Droid Sans Fallback","Microsoft YaHei",sans-serif;
font-size: 15px;
/deep/ a {
Expand Down Expand Up @@ -1141,7 +1141,7 @@ export default class ArticleUpdate extends Vue {
.preview-title {
font-size: 24px;
font-weight: bold;
font-family: "Droid Serif","PingFang SC","Hiragino Sans GB","Droid Sans Fallback","Microsoft YaHei",sans-serif;
font-family: "Noto Serif","PingFang SC","Hiragino Sans GB","Droid Sans Fallback","Microsoft YaHei",sans-serif;
}
.preview-date {
Expand Down Expand Up @@ -1211,7 +1211,7 @@ export default class ArticleUpdate extends Vue {
}
.number {
font-size: 18px;
font-family: 'Droid Serif';
font-family: 'Noto Serif';
}
}
}
Expand Down
17 changes: 17 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,11 @@
global-agent "^3.0.0"
global-tunnel-ng "^2.7.1"

"@fontsource/noto-serif@^4.5.9":
version "4.5.9"
resolved "https://registry.npmjs.org/@fontsource/noto-serif/-/noto-serif-4.5.9.tgz#dae24fe204a8bfaaf98121efbc3adf0b0682af43"
integrity sha512-qvVrkuEwAKGKswmaETS9RVzrGTqlvQRHK60TJ9ncH1RA7ujqb8+o8lLgU3dK3KcggQWWfTa/ozNU8sNc1hXH4g==

"@hapi/[email protected]":
version "2.1.4"
resolved "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz"
Expand Down Expand Up @@ -6716,6 +6721,13 @@ junk@^3.1.0:
resolved "https://registry.npmjs.org/junk/-/junk-3.1.0.tgz"
integrity sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ==

[email protected]:
version "0.12.0"
resolved "https://registry.yarnpkg.com/katex/-/katex-0.12.0.tgz#2fb1c665dbd2b043edcf8a1f5c555f46beaa0cb9"
integrity sha512-y+8btoc/CK70XqcHqjxiGWBOeIL8upbS0peTPXTvgrh21n1RiWWcIpSWM+4uXq+IAgNh9YYQWdc7LVDPDAEEAg==
dependencies:
commander "^2.19.0"

katex@^0.10.0:
version "0.10.1"
resolved "https://registry.npmjs.org/katex/-/katex-0.10.1.tgz"
Expand Down Expand Up @@ -9526,6 +9538,11 @@ [email protected]:
version "0.2.7"
resolved "http://registry.npm.taobao.org/relateurl/download/relateurl-0.2.7.tgz"

[email protected]:
version "2.3.0"
resolved "https://registry.yarnpkg.com/remixicon/-/remixicon-2.3.0.tgz#6425224ca646ee447d2fcff882c2ff27384b0820"
integrity sha512-qm6B+EZBMV/2U1q0dF/qVChaj08HxRHZ3h2XUcpR9EsLhRS4Y4r+edP14CPvY/h0sgTE7Uo+XWJx1eIR5ejptA==

remove-trailing-separator@^1.0.1:
version "1.1.0"
resolved "http://registry.npm.taobao.org/remove-trailing-separator/download/remove-trailing-separator-1.1.0.tgz"
Expand Down

0 comments on commit 42229a8

Please sign in to comment.