default.go 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. package theme
  2. type Default struct {
  3. }
  4. func (theme *Default) Template() string {
  5. return `
  6. <!DOCTYPE html>
  7. <html lang="en">
  8. <head>
  9. <meta charset="UTF-8">
  10. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  11. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  12. <title>{{ .Page.Title }}</title>
  13. <style>
  14. html {
  15. height: 100%;
  16. }
  17. body {
  18. width: 100% !important;
  19. height: 100%;
  20. margin: 0;
  21. font-size: .96rem;
  22. line-height: 1.4;
  23. background-color: #F2F4F6;
  24. color: #44485E;
  25. -webkit-text-size-adjust: none;
  26. font-family: Helvetica Neue, Tahoma, Arial, PingFangSC-Regular, Hiragino Sans GB, Microsoft Yahei, sans-serif;
  27. -webkit-font-smoothing: antialiased;
  28. touch-action: manipulation;
  29. text-size-adjust: none;
  30. }
  31. .container {
  32. max-width: 560px;
  33. min-height: 100%;
  34. margin: 0 auto;
  35. background-color: white;
  36. }
  37. .container-inner {
  38. padding: 1rem;
  39. }
  40. .action-block{
  41. margin: 30px 0 20px 0;
  42. text-align: center;
  43. }
  44. .table-wrapper{
  45. margin-bottom: 1.5rem;
  46. }
  47. .text-success {
  48. color: #20c55c;
  49. }
  50. .text-danger {
  51. color: #ff0476;
  52. }
  53. .text-center {
  54. text-align: center;
  55. }
  56. article {
  57. line-height: 1.6rem
  58. }
  59. article h1,
  60. article h2,
  61. article h3,
  62. article h4 {
  63. color: #232323;
  64. margin-bottom: 1.28rem;
  65. }
  66. a {
  67. font-style: none;
  68. text-decoration: none;
  69. }
  70. article p {
  71. margin-bottom: 1rem;
  72. }
  73. .preview-label {
  74. min-width: 4em;
  75. text-align: justify;
  76. text-align-last: justify;
  77. }
  78. .preview-value {
  79. text-align: right;
  80. display: block;
  81. overflow: hidden;
  82. word-break: normal;
  83. word-wrap: break-word;
  84. color: rgba(0, 0, 0, 0.9);
  85. flex: 1 1 auto !important;
  86. }
  87. .grid {
  88. padding: 1rem 0;
  89. }
  90. .grid h4 {
  91. margin-top: 0;
  92. margin-bottom: .68rem;
  93. }
  94. .row {
  95. display: flex;
  96. justify-content: flex-start;
  97. line-height: 2;
  98. }
  99. .timeline {
  100. margin: 0;
  101. list-style: none;
  102. padding-left: 1rem;
  103. }
  104. .timeline-item {
  105. position: relative;
  106. padding-bottom: 1rem;
  107. box-sizing: border-box;
  108. }
  109. .timeline-item-tail {
  110. top: 0;
  111. position: absolute;
  112. left: 4px;
  113. height: 100%;
  114. border-left: 3px solid #e4e7ed;
  115. }
  116. .timeline-item-node {
  117. left: -1px;
  118. width: 13px;
  119. height: 13px;
  120. position: absolute;
  121. background-color: #e4e7ed;
  122. border-color: #e4e7ed;
  123. border-radius: 50%;
  124. box-sizing: border-box;
  125. display: flex;
  126. justify-content: center;
  127. align-items: center;
  128. }
  129. .timeline-item-wrapper {
  130. width: 100%;
  131. position: relative;
  132. padding-left: 28px;
  133. top: -3px;
  134. }
  135. .timeline-item-timestamp{
  136. font-size: .86rem;
  137. color: #64686E;
  138. }
  139. .timeline-item-content{
  140. width:100%;
  141. }
  142. .table {
  143. border: 1px solid #ddd;
  144. width: 100%;
  145. max-width: 100%;
  146. margin-bottom: 20px;
  147. display: table;
  148. border-collapse: separate;
  149. box-sizing: border-box;
  150. text-indent: initial;
  151. border-spacing: 2px;
  152. border-collapse: collapse;
  153. border-spacing: 0;
  154. }
  155. .table-title{
  156. box-sizing: border-box;
  157. margin-bottom: 1rem;
  158. }
  159. .table>thead:first-child>tr:first-child>th {
  160. border-top: 0;
  161. }
  162. .table>thead>tr>th{
  163. vertical-align: bottom;
  164. padding: 8px;
  165. line-height: 1.42857143;
  166. border-bottom-width: 2px;
  167. border: 1px solid #ddd;
  168. text-align: left;
  169. }
  170. .table>tbody>tr>td{
  171. border: 1px solid #ddd;
  172. padding: 8px;
  173. line-height: 1.42857143;
  174. vertical-align: top;
  175. text-align: left;
  176. }
  177. .button {
  178. padding: .8rem 2rem;
  179. color: white;
  180. background-color: #727cf5;
  181. border-radius: .25rem;
  182. }
  183. .invite-code {
  184. font-size: 32px;
  185. letter-spacing: .6rem;
  186. color: #35742;
  187. }
  188. .copyright {
  189. text-align: center;
  190. font-size: .86rem;
  191. color: #8c8c86;
  192. margin: 50px 0 10px 0;
  193. }
  194. .cell {
  195. flex: 1 1 auto !important;
  196. }
  197. </style>
  198. </head>
  199. <body>
  200. <div class="container">
  201. <div class="container-inner">
  202. <article>
  203. {{ if .Page.Head }}<h1>{{ .Page.Head }}</h1>{{ end }}
  204. {{ with .Page.Intros }}
  205. {{ if gt (len .) 0 }}
  206. {{ range $text := . }}
  207. {{ $text }}
  208. {{ end }}
  209. {{ end }}
  210. {{ end }}
  211. {{ with .Page.Actions }}
  212. {{ if gt (len .) 0 }}
  213. {{ range $action := . }}
  214. {{ $action }}
  215. {{ end }}
  216. {{ end }}
  217. {{ end }}
  218. {{ with .Page.Entries }}
  219. {{ if gt (len .) 0 }}
  220. {{ range $entry := . }}
  221. {{ $entry }}
  222. {{ end }}
  223. {{ end }}
  224. {{ end }}
  225. {{ with .Page.Timelines }}
  226. {{ if gt (len .) 0 }}
  227. {{ range $timeline := . }}
  228. {{ $timeline }}
  229. {{ end }}
  230. {{ end }}
  231. {{ end }}
  232. {{ with .Page.Tables }}
  233. {{ if gt (len .) 0 }}
  234. {{ range $table := . }}
  235. {{ $table }}
  236. {{ end }}
  237. {{ end }}
  238. {{ end }}
  239. {{ with .Page.Outros }}
  240. {{ if gt (len .) 0 }}
  241. {{ range $text := . }}
  242. {{ $text }}
  243. {{ end }}
  244. {{ end }}
  245. {{ end }}
  246. {{ if .Page.Copyright }}<div class="copyright">{{ .Page.Copyright }}</div>{{ end }}
  247. </article>
  248. </div>
  249. </div>
  250. </body>
  251. </html>
  252. `
  253. }