File tree Expand file tree Collapse file tree 4 files changed +21
-6
lines changed Expand file tree Collapse file tree 4 files changed +21
-6
lines changed Original file line number Diff line number Diff line change 4
4
* Add support for ` h1_title ` setting.
5
5
* Add breadcrumbs navigation
6
6
* Embed CSS in Smeagol, so no internet connection is required to run [ #9 ] ( https://github.com/AustinWise/smeagol/issues/9 )
7
+ * Add "home" button to go to the top of the site.
7
8
8
9
0.1.0 (2022-01-04)
9
10
=====
Original file line number Diff line number Diff line change
1
+ Currently the only purpose of this folder it is enable downloading the
2
+ [ Primer CSS] ( https://primer.style/css/ )
3
+ file so that it can be commited to this repo.
Original file line number Diff line number Diff line change @@ -129,11 +129,11 @@ async fn process_file_request(
129
129
130
130
fn process_smeagol_request ( file_path : & str ) -> Result < Response < Body > , MyError > {
131
131
if file_path == "/_smeagol/primer.css" {
132
- let css_bytes : & [ u8 ] = include_bytes ! ( "primer.css" ) ;
132
+ let primer_css = include_str ! ( "primer.css" ) ;
133
133
return Ok ( Response :: builder ( )
134
134
. status ( StatusCode :: OK )
135
135
. header ( header:: CONTENT_TYPE , "text/css; charset=UTF-8" )
136
- . body ( Body :: from ( css_bytes ) ) ?) ;
136
+ . body ( Body :: from ( primer_css ) ) ?) ;
137
137
}
138
138
return Ok ( Response :: builder ( )
139
139
. status ( StatusCode :: NOT_FOUND )
Original file line number Diff line number Diff line change 3
3
4
4
< head >
5
5
< title > {{title}}</ title >
6
- <!-- TODO: embed css file into the program -->
7
6
< link href ="/_smeagol/primer.css " rel ="stylesheet " />
7
+ < style >
8
+ .markdown-body {
9
+ padding : 1em 1em 1em 0 ;
10
+ }
11
+ </ style >
8
12
</ head >
9
13
10
14
< body class ="container-lg ">
11
15
< header >
12
16
13
17
</ header >
14
18
< main >
15
- < h1 > {{title}}</ h1 >
19
+ < div class ="TableObject pt-4 px-2 px-lg-0 overflow-x-scroll ">
20
+ < div class ="TableObject-item ">
21
+ < a class ="btn btn-sm " id ="minibutton-home " href ="/ ">
22
+ Home
23
+ </ a >
24
+ </ div >
25
+ </ div >
26
+ < h1 class ="pt-4 "> {{title}}</ h1 >
16
27
< nav aria-label ="Breadcrumb ">
17
28
< ol >
18
29
{% for crumb in breadcrumbs %}
@@ -22,9 +33,9 @@ <h1>{{title}}</h1>
22
33
{% endfor %}
23
34
</ ol >
24
35
</ nav >
25
- < dic class ="markdown-body ">
36
+ < div class ="markdown-body ">
26
37
{{content}}
27
- </ dic >
38
+ </ div >
28
39
</ main >
29
40
30
41
</ body >
You can’t perform that action at this time.
0 commit comments