This repository was archived by the owner on Sep 23, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +81
-2
lines changed Expand file tree Collapse file tree 4 files changed +81
-2
lines changed Original file line number Diff line number Diff line change @@ -113,8 +113,8 @@ func NewApp() *gin.Engine {
113113 for _ , file := range files {
114114 stash = append (stash , file .Name ())
115115 }
116- c .JSON (200 , gin.H {
117- "data " : stash ,
116+ c .HTML (200 , "stash.tmpl" , gin.H {
117+ "stash " : stash ,
118118 })
119119 })
120120
Original file line number Diff line number Diff line change @@ -38,3 +38,36 @@ body {
3838 width : 100% ;
3939 border : none;
4040}
41+ # stash-pane {
42+ position : fixed;
43+ top : 0 ;
44+ width : 60% ;
45+ height : 100% ;
46+ font-size : 16px ;
47+ }
48+ # stash-pane # controls {
49+ color : # 2e2e2e ;
50+ position : absolute;
51+ right : 0 ;
52+ top : 0 ;
53+ z-index : 1 ;
54+ margin : 5px 5px 0 0 ;
55+ }
56+ # stash-pane # controls a {
57+ font-weight : bold;
58+ text-decoration : none;
59+ color : # 2e2e2e ;
60+ }
61+ th , td {
62+ text-align : left;
63+ padding : 8px ;
64+ border-bottom : 1px solid # ddd ;
65+ font-size : 16px ;
66+ }
67+
68+ tr : nth-child (even){background-color : # f2f2f2 }
69+
70+ th {
71+ background-color : # 2e2e2e ;
72+ color : white;
73+ }
Original file line number Diff line number Diff line change 1414 <body>
1515 <div id="edit-pane">
1616 <div id="controls">
17+ <a href="/stash" target="_blank" onclick="save();"> Stash</a> |
1718 <a href="/published/{{ .pubTo}}" target="_blank" onclick="save();"> Present</a> |
1819 <a href="/published/{{ .pubTo}}?print-pdf" target="_blank" onclick="save();"> Pdf</a>
1920 </div>
Original file line number Diff line number Diff line change 1+ {{ define "stash.tmpl"}}
2+ <!DOCTYPE html>
3+ <html lang="en">
4+
5+ <head>
6+ <meta charset="utf-8">
7+
8+ <title>Hacker Slides</title>
9+
10+ <link rel="stylesheet" href="/static/css/index.css">
11+ </head>
12+
13+ <body>
14+ <div id="stash-pane">
15+ <div id="controls">
16+ <a href="/stash" target="_blank" onclick="save();"> Stash</a> |
17+ <a href="/published/{{ .pubTo}}" target="_blank" onclick="save();"> Present</a> |
18+ <a href="/published/{{ .pubTo}}?print-pdf" target="_blank" onclick="save();"> Pdf</a>
19+ </div>
20+ <div></div>
21+ <div id ="list">
22+ <table>
23+ <tr>
24+ <th>Name</th>
25+ <th>Action</th>
26+ </tr>
27+ {{range .stash}}
28+ <tr>
29+ <td><p>{{.}}</p></td>
30+ <td><a href="/stash/edit/{{.}}" target ="_blank" onclick="save();">Edit</a></td>
31+ </tr>
32+ {{end}}
33+ </table>
34+ </div>
35+ </div>
36+
37+ <script src="/static/revealjs/js/ace-1.1.8/ace.js" type="text/javascript" charset="utf-8"></script>
38+ <script src="/static/revealjs/js/jquery-2.1.3.min.js" type="text/javascript" charset="utf-8"></script>
39+ <script src="/static/revealjs/js/jquery-debounce-1.0.5.js" type="text/javascript" charset="utf-8"></script>
40+ <script src="/static/js/save.js" type="text/javascript" charset="utf-8"></script>
41+ <script src="/static/js/index.js" type="text/javascript" charset="utf-8"></script>
42+ </body>
43+ </html>
44+
45+ {{ end }}
You can’t perform that action at this time.
0 commit comments