Skip to content

Commit 231885c

Browse files
committed
把 extra.css 的样式直接写入主题头部,去掉extra.css
1 parent f2b83f4 commit 231885c

3 files changed

Lines changed: 41 additions & 69 deletions

File tree

docs/stylesheets/extra.css

Lines changed: 0 additions & 65 deletions
This file was deleted.

mkdocs.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,6 @@ plugins:
202202
js_files:
203203
- javascripts/mathjax.js
204204
#- javascripts/embed.js
205-
css_files:
206-
- stylesheets/extra.css
207205
- rss:
208206
abstract_chars_count: -1 # -1 for full content
209207
#categories:
@@ -283,5 +281,3 @@ extra_javascript:
283281
- javascripts/adsense.js # AdSense广告脚本
284282
- javascripts/test-adsense.js # AdSense测试脚本(开发时使用)
285283

286-
extra_css:
287-
- stylesheets/extra.css

overrides/main.html

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,45 @@
33
{% block extrahead %}
44
{{ super() }}
55
<link rel="preload" href="{{ 'stylesheets/NotoSansSC-UI-subset.woff' | url }}" as="font" type="font/woff" crossorigin>
6+
<style>
7+
::selection {
8+
background: aquamarine;
9+
color: black;
10+
}
11+
12+
html {
13+
scroll-behavior: smooth;
14+
}
15+
16+
.md-content img:not([alt="badge"]) {
17+
max-width: min(100%, 1280px);
18+
width: auto;
19+
height: auto;
20+
border: 3px solid #000;
21+
background: #fff;
22+
}
23+
24+
.md-content img[alt="logo"] {
25+
border: none;
26+
}
27+
28+
.altium-iframe-viewer {
29+
height: 400px;
30+
max-width: 1280px;
31+
max-height: 700px;
32+
}
33+
34+
@font-face {
35+
font-family: "Noto Sans SC - local";
36+
src: url("{{ 'stylesheets/NotoSansSC-UI-subset.woff' | url }}") format("woff");
37+
font-display: swap;
38+
font-style: normal;
39+
font-weight: 400;
40+
unicode-range: U+0000-00FF, U+2013, U+2014, U+2018, U+2019, U+201C, U+201D, U+2022, U+3001, U+3002, U+300A, U+300B;
41+
}
42+
43+
:root {
44+
--md-text-font: "Noto Sans SC - local", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
45+
}
46+
</style>
647
{% endblock %}

0 commit comments

Comments
 (0)