1
+ <?php if (!defined ('__TYPECHO_ROOT_DIR__ ' )) exit ; ?>
2
+ <!DOCTYPE HTML>
3
+ <html>
4
+ <head>
5
+ <meta charset="<?php $ this ->options ->charset (); ?> ">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+ <title><?php $ this ->archiveTitle (['category ' => _t ('%s ' ),'search ' => _t ('搜索结果:%s ' ),'tag ' => _t ('标签:%s ' ),'author ' => _t ('作者:%s ' )], '' , ' - ' ); ?> <?php $ this ->options ->title (); ?> </title>
8
+ <style>
9
+ :root {
10
+ --width: 600px;
11
+ --font-scale: 1em;
12
+ --background-color: #fff;
13
+ --heading-color: #222;
14
+ --nav-color:#777;
15
+ --text-color: #333;
16
+ --code-background-color: #f2f2f2;
17
+ --code-color: #222;
18
+ --blockquote-color: #222;
19
+ --gray-color: #aaa;
20
+ }
21
+ @media (prefers-color-scheme: dark) {
22
+ :root {
23
+ --background-color: #111;
24
+ --heading-color: #d9c48f;
25
+ --nav-color: #8f8873;
26
+ --text-color: #d9c48f;
27
+ --code-background-color: #000;
28
+ --code-color: #ddd;
29
+ --blockquote-color: #ccc;
30
+ --gray-color: #756a56;
31
+ }
32
+ }
33
+ body {
34
+ font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Ubuntu,"Helvetica Neue",Helvetica,Arial,"PingFangSC-Regular","Hiragino Sans GB","Lantinghei SC","Microsoft Yahei","Source Han Sans CN","WenQuanYi Micro Hei",SimSun,sans-serif;
35
+ font-size: var(--font-scale);
36
+ margin: auto;
37
+ padding: 20px;
38
+ max-width: var(--width);
39
+ text-align: center;
40
+ background-color: var(--background-color);
41
+ word-wrap: break-word;
42
+ overflow-wrap: break-word;
43
+ line-height: 1.8;
44
+ color: var(--text-color);
45
+ }
46
+ html{scroll-behavior:smooth;}
47
+ h1,h2,h3,h4,h5,h6{color:var(--heading-color);}
48
+ a{color:var(--text-color);cursor:pointer;text-decoration:none}
49
+ a:hover{opacity:0.5;}
50
+ nav a{margin:0 5px;}
51
+ strong,b{color:var(--heading-color)}
52
+ button{margin:0;cursor:pointer}
53
+ time,.commentmetadata a{color:var(--gray-color);font-size:0.8em;}
54
+ table{width:100%}
55
+ hr{border:0;border-top:1px dashed}
56
+ img{max-width:100%;height:auto}
57
+ code{font-family:monospace;padding:2px;background-color:var(--code-background-color);color:var(--code-color);border-radius:3px}
58
+ blockquote{border-left:1px solid var(--gray-color);color:var(--code-color);padding-left:20px;font-style:italic}
59
+ header,footer{margin: 10px 0;color:var(--gray-color);}
60
+ footer{padding-top:40px;}
61
+ header a,footer a{color:var(--nav-color)}
62
+ article{margin-bottom:30px;}
63
+ h1.title,h2.title {margin:50px 0 0;line-height:1.6;}
64
+ .intro{color:var(--gray-color);margin-bottom:50px;}
65
+ .home.intro:after{content:"✍";display: block;font-size:2em;margin-top: 40px;}
66
+ .content,.comlist,.respond{text-align:left;padding-top:40px;}
67
+ .content a,.comment-reply a,.respond a{border-bottom:1px solid var(--text-color);}
68
+ .content a:has(img){border:none}
69
+ .pages a{font-size:20px;padding:5px;}
70
+ .tags,.tags a{color:var(--gray-color);margin-right:10px;}
71
+ .comlist{max-width:450px;margin:0 auto;}
72
+ .comment-list,.comment-list .comment-children{list-style: none;padding:0;margin-bottom:40px;}
73
+ .comment-body{margin:30px 0;list-style: none;}
74
+ .comment-body .comment-children{margin-left:35px;}
75
+ .comment-author cite{font-weight:bold;font-style:normal;}
76
+ input,textarea{border-radius:4px;border:1px solid var(--gray-color);display:block;font-size:0.9em;margin:0 0 10px;padding:10px;width:calc(100% - 25px);background:var(--background-color);color:var(--heading-color)}
77
+ input:focus,textarea:focus{border:1px solid var(--text-color);outline:0}
78
+ button[type="submit"]{border:none;border-radius:4px;padding:10px 16px;width:initial;background:var(--heading-color);color:var(--background-color);font-size:0.9em}
79
+ button[type="submit"]:hover{cursor:pointer;opacity:.7;}
80
+ #search input{margin:20px auto;width: initial;display:inline-block;}
81
+ </style>
82
+ <?php $ this ->header (); ?>
83
+ </head>
84
+ <body>
85
+ <header>
86
+ <nav><?php if ($ this ->is ('single ' ) || $ this ->is ('category ' ) || $ this ->is ('search ' ) || $ this ->is ('tag ' )) { ?>
87
+ <a href="<?php $ this ->options ->siteUrl (); ?> ">← 首页</a> | <?php } ?>
88
+ <?php if ($ this ->is ('post ' )) { ?> <?php $ this ->category (', ' ); ?> <?php } ?>
89
+ <?php if ($ this ->is ('page ' ) || $ this ->is ('index ' ) || $ this ->is ('category ' ) || $ this ->is ('search ' ) || $ this ->is ('tag ' )) { ?>
90
+ <?php $ this ->widget ('Widget_Metas_Category_List ' )->to ($ category ); ?>
91
+ <?php while ($ category ->next ()): ?>
92
+ <a<?php if ($ this ->is ('category ' , $ category ->slug )): ?> class="current"<?php endif ; ?> href="<?php $ category ->permalink (); ?> " title="<?php $ category ->name (); ?> "><?php $ category ->name (); ?> </a>
93
+ <?php endwhile ; ?>
94
+ <?php $ this ->widget ('Widget_Contents_Page_List ' )->to ($ pages ); ?>
95
+ <?php while ($ pages ->next ()): ?>
96
+ <a<?php if ($ this ->is ('page ' , $ pages ->slug )): ?> class="current"<?php endif ; ?> href="<?php $ pages ->permalink (); ?> " title="<?php $ pages ->title (); ?> "><?php $ pages ->title (); ?> </a>
97
+ <?php endwhile ; ?>
98
+ <?php } ?> </nav>
99
+ </header>
100
+ <main>
0 commit comments