default.go 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  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: #64687E;
  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. font-size: 12px;
  102. list-style: none;
  103. }
  104. .timeline-item {
  105. position: relative;
  106. padding-bottom: 20px;
  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: 2px solid #e4e7ed;
  115. }
  116. .timeline-item-node {
  117. left: -1px;
  118. width: 12px;
  119. height: 12px;
  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. .table {
  136. border: 1px solid #ddd;
  137. width: 100%;
  138. max-width: 100%;
  139. margin-bottom: 20px;
  140. display: table;
  141. border-collapse: separate;
  142. box-sizing: border-box;
  143. text-indent: initial;
  144. border-spacing: 2px;
  145. border-collapse: collapse;
  146. border-spacing: 0;
  147. }
  148. .table-title{
  149. box-sizing: border-box;
  150. border-left: 3px solid #727cf5;
  151. padding: .38rem 0 .38rem .5rem;
  152. margin-bottom: 1rem;
  153. }
  154. .table>thead:first-child>tr:first-child>th {
  155. border-top: 0;
  156. }
  157. .table>thead>tr>th{
  158. vertical-align: bottom;
  159. padding: 8px;
  160. line-height: 1.42857143;
  161. border-bottom-width: 2px;
  162. border: 1px solid #ddd;
  163. text-align: left;
  164. }
  165. .table>tbody>tr>td{
  166. border: 1px solid #ddd;
  167. padding: 8px;
  168. line-height: 1.42857143;
  169. vertical-align: top;
  170. text-align: left;
  171. }
  172. .button {
  173. padding: .8rem 2rem;
  174. color: white;
  175. background-color: #727cf5;
  176. border-radius: .25rem;
  177. }
  178. .invite-code {
  179. font-size: 32px;
  180. letter-spacing: .6rem;
  181. color: #454742;
  182. }
  183. .copyright {
  184. text-align: center;
  185. font-size: .9rem;
  186. color: #8c8c86;
  187. margin: 50px 0 10px 0;
  188. }
  189. .cell {
  190. flex: 1 1 auto !important;
  191. }
  192. </style>
  193. </head>
  194. <body>
  195. <div class="container">
  196. <div class="container-inner">
  197. <article>
  198. {{ if .Page.Head }}<h1>{{ .Page.Head }}</h1>{{ end }}
  199. {{ with .Page.Intros }}
  200. {{ if gt (len .) 0 }}
  201. {{ range $text := . }}
  202. {{ $text }}
  203. {{ end }}
  204. {{ end }}
  205. {{ end }}
  206. {{ with .Page.Actions }}
  207. {{ if gt (len .) 0 }}
  208. {{ range $action := . }}
  209. {{ $action }}
  210. {{ end }}
  211. {{ end }}
  212. {{ end }}
  213. {{ with .Page.Entries }}
  214. {{ if gt (len .) 0 }}
  215. {{ range $entry := . }}
  216. {{ $entry }}
  217. {{ end }}
  218. {{ end }}
  219. {{ end }}
  220. {{ with .Page.Timelines }}
  221. {{ if gt (len .) 0 }}
  222. {{ range $timeline := . }}
  223. {{ $timeline }}
  224. {{ end }}
  225. {{ end }}
  226. {{ end }}
  227. {{ with .Page.Tables }}
  228. {{ if gt (len .) 0 }}
  229. {{ range $table := . }}
  230. {{ $table }}
  231. {{ end }}
  232. {{ end }}
  233. {{ end }}
  234. {{ with .Page.Outros }}
  235. {{ if gt (len .) 0 }}
  236. {{ range $text := . }}
  237. {{ $text }}
  238. {{ end }}
  239. {{ end }}
  240. {{ end }}
  241. {{ if .Page.Copyright }}<div class="copyright">{{ .Page.Copyright }}</div>{{ end }}
  242. </article>
  243. </div>
  244. </div>
  245. </body>
  246. </html>
  247. `
  248. }