summaryrefslogtreecommitdiff
path: root/public/css/style.css
blob: c68c01c7c433bd6f974707df3be13b6d6e6bb9a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
/* Dark mode */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #393E41;
        color: white;
    }

    blockquote {
      background: #393E41;
    }

    a {
      color: #EBC3DB;
    }

    header {
      background: #393E41;
      border-bottom: 2px dotted #EBC3DB;

    }

    .article-meta, .menu a {
      background: #393E41;
      color: white;
    }

    table {
      margin: auto;
      border-top: 1px solid #666;
      border-bottom: 1px solid #666;
    }
    table thead th { border-bottom: 1px solid #666; }
    th, td { padding: 5px; }
    tr:nth-child(even) { background: #666 }

}


/* Light mode */
@media (prefers-color-scheme: light) {
    blockquote {
      background: #f9f9f9;
    }

    a {
      color: #613DC1;
    }

    header {
      background: #613DC1;
    }

    .article-meta, .menu a {
      background: #E8DBC5;
      color: #000;
    }

    table {
      margin: auto;
      border-top: 1px solid #666;
      border-bottom: 1px solid #666;
    }
    table thead th { border-bottom: 1px solid #ddd; }
    th, td { padding: 5px; }
    tr:nth-child(even) { background: #eee }

}


body {
  max-width: 800px;
  margin: auto;
  padding: .2em;
  line-height: 1.5em;
}

h1 {
  line-height: 1.5em;
}

/* Table of Contents, if wanted

Add to yaml:

output:
  blogdown::html_page:
    toc: true

    */

#TableOfContents, #TOC {
  border: 1px solid #eee;
  border-radius: 5px;
}

/* Header and Footer */
.menu li { display: inline-block; }
.article-meta, .menu a {
  text-decoration: none;
  padding: 5px;
  border-radius: 5px;
  border-style: dotted;
  border-width: 1px;
  margin: 20px 0px 20px 0px;
}

.terms { font-size: .9em; }
.menu, .article-meta, footer { text-align: center; }
.title { font-size: 1.1em; }
footer a { text-decoration: none; }

.pull-left {
    float: left
}
.pull-right {
    float: right
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Adjust background at your leisure! */
header {
    position: relative;
    width: 100%;
    height: 1.75rem;
    font-size: 1rem;
}

header ul,
header ol {
    margin: 0;
    padding: 0;
    list-style: none
}
header nav {
    padding: 0 0.5rem
}

header a {
    color: #fff;
    line-height: 1.75rem;
    padding: 0 0.5rem
}
header a:hover,
header .current a {
    color: #fff
}

/* Code Boxes */
pre {
  border: 2px solid #EBC3DB;
  padding: 1em;
  overflow-x: auto;
}
pre code { background: none; }

code {
  background-color: light-dark(#D6D6D6, #888);
  border-radius: 3px;
  padding: 0.2em;
  overflow-x: auto;
}

/* Images, tables, misc. */
img, iframe, video {
  max-width: 100%;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

main {
  hyphens: auto;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7em;
  hyphens: auto;
  display: block;
  font-size: 1.1em;
}
main a {
  font-weight: bold;
}

blockquote {

  border-left: 5px solid #ccc;
  padding: 3px 1em 3px;
}

.content-wrapper {
  padding: 0px 12px 0px 12px;
}
#foxy {
  min-width: 40px;
  float: right;
  padding: 10px;
  display: block;
}


#table-of-contents {
}

/* Small devices, phones */
@media only screen and (min-width : 480px) {
  #foxy {
    min-width: 40px;
    float: center;
    padding: 10px 10px 10px 20px;
    display: block;
  }

}

/* 在大屏幕上应用特定样式 */
@media screen and (min-width: 768px) {
    #table-of-contents {
        position: fixed; /* 固定定位,使其悬浮在页面上 */
        top: 50%; /* 上边距为50% */
        right: 15px; /* 右边距为0,将其放在右侧 */
        transform: translateY(-50%); /* 使用transform来垂直居中 */
        background-color: #f0f0f0; /* 设置背景颜色 */
        padding: 10px; /* 添加一些内边距以增加可读性 */
        box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); /* 添加阴影效果 */
        width: 250px; /* 设置宽度 */
        max-height: 70vh; /* 设置最大高度为视口的70% */
        overflow-y: auto; /* 添加垂直滚动条 */
    }
}