123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290 |
- package theme
- type Default struct {
- }
- func (theme *Default) Template() string {
- return `
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>{{ .Page.Title }}</title>
- <style>
- html {
- height: 100%;
- }
- body {
- width: 100% !important;
- height: 100%;
- margin: 0;
- font-size: .96rem;
- line-height: 1.4;
- background-color: #F2F4F6;
- color: #44485E;
- -webkit-text-size-adjust: none;
- font-family: Helvetica Neue, Tahoma, Arial, PingFangSC-Regular, Hiragino Sans GB, Microsoft Yahei, sans-serif;
- -webkit-font-smoothing: antialiased;
- touch-action: manipulation;
- text-size-adjust: none;
- }
- .container {
- max-width: 560px;
- min-height: 100%;
- margin: 0 auto;
- background-color: white;
- }
- .container-inner {
- padding: 1rem;
- }
- .action-block{
- margin: 30px 0 20px 0;
- text-align: center;
- }
-
- .table-wrapper{
- margin-bottom: 1.5rem;
- }
- .text-success {
- color: #20c55c;
- }
- .text-danger {
- color: #ff0476;
- }
- .text-center {
- text-align: center;
- }
- article {
- line-height: 1.6rem
- }
- article h1,
- article h2,
- article h3,
- article h4 {
- color: #232323;
- margin-bottom: 1.28rem;
- }
- a {
- font-style: none;
- text-decoration: none;
- }
- article p {
- margin-bottom: 1rem;
- }
- .preview-label {
- min-width: 4em;
- text-align: justify;
- text-align-last: justify;
- }
- .preview-value {
- text-align: right;
- display: block;
- overflow: hidden;
- word-break: normal;
- word-wrap: break-word;
- color: rgba(0, 0, 0, 0.9);
- flex: 1 1 auto !important;
- }
- .grid {
- padding: 1rem 0;
- }
-
- .grid h4 {
- margin-top: 0;
- margin-bottom: .68rem;
- }
- .row {
- display: flex;
- justify-content: flex-start;
- line-height: 2;
- }
-
- .timeline {
- margin: 0;
- list-style: none;
- padding-left: 1rem;
- }
- .timeline-item {
- position: relative;
- padding-bottom: 1rem;
- box-sizing: border-box;
- }
- .timeline-item-tail {
- top: 0;
- position: absolute;
- left: 4px;
- height: 100%;
- border-left: 3px solid #e4e7ed;
- }
-
- .timeline-item-node {
- left: -1px;
- width: 13px;
- height: 13px;
- position: absolute;
- background-color: #e4e7ed;
- border-color: #e4e7ed;
- border-radius: 50%;
- box-sizing: border-box;
- display: flex;
- justify-content: center;
- align-items: center;
- }
-
- .timeline-item-wrapper {
- width: 100%;
- position: relative;
- padding-left: 28px;
- top: -3px;
- }
- .timeline-item-timestamp{
- font-size: .86rem;
- color: #64686E;
- }
- .timeline-item-content{
- width:100%;
- }
-
- .table {
- border: 1px solid #ddd;
- width: 100%;
- max-width: 100%;
- margin-bottom: 20px;
- display: table;
- border-collapse: separate;
- box-sizing: border-box;
- text-indent: initial;
- border-spacing: 2px;
- border-collapse: collapse;
- border-spacing: 0;
- }
- .table-title{
- box-sizing: border-box;
- margin-bottom: 1rem;
- }
-
- .table>thead:first-child>tr:first-child>th {
- border-top: 0;
- }
-
- .table>thead>tr>th{
- vertical-align: bottom;
- padding: 8px;
- line-height: 1.42857143;
- border-bottom-width: 2px;
- border: 1px solid #ddd;
- text-align: left;
- }
- .table>tbody>tr>td{
- border: 1px solid #ddd;
- padding: 8px;
- line-height: 1.42857143;
- vertical-align: top;
- text-align: left;
- }
- .button {
- padding: .8rem 2rem;
- color: white;
- background-color: #727cf5;
- border-radius: .25rem;
- }
- .invite-code {
- font-size: 32px;
- letter-spacing: .6rem;
- color: #35742;
- }
-
- .copyright {
- text-align: center;
- font-size: .86rem;
- color: #8c8c86;
- margin: 50px 0 10px 0;
- }
-
- .cell {
- flex: 1 1 auto !important;
- }
- </style>
- </head>
- <body>
- <div class="container">
- <div class="container-inner">
- <article>
- {{ if .Page.Head }}<h1>{{ .Page.Head }}</h1>{{ end }}
- {{ with .Page.Intros }}
- {{ if gt (len .) 0 }}
- {{ range $text := . }}
- {{ $text }}
- {{ end }}
- {{ end }}
- {{ end }}
- {{ with .Page.Actions }}
- {{ if gt (len .) 0 }}
- {{ range $action := . }}
- {{ $action }}
- {{ end }}
- {{ end }}
- {{ end }}
- {{ with .Page.Entries }}
- {{ if gt (len .) 0 }}
- {{ range $entry := . }}
- {{ $entry }}
- {{ end }}
- {{ end }}
- {{ end }}
- {{ with .Page.Timelines }}
- {{ if gt (len .) 0 }}
- {{ range $timeline := . }}
- {{ $timeline }}
- {{ end }}
- {{ end }}
- {{ end }}
- {{ with .Page.Tables }}
- {{ if gt (len .) 0 }}
- {{ range $table := . }}
- {{ $table }}
- {{ end }}
- {{ end }}
- {{ end }}
- {{ with .Page.Outros }}
- {{ if gt (len .) 0 }}
- {{ range $text := . }}
- {{ $text }}
- {{ end }}
- {{ end }}
- {{ end }}
- {{ if .Page.Copyright }}<div class="copyright">{{ .Page.Copyright }}</div>{{ end }}
- </article>
- </div>
- </div>
- </body>
- </html>
- `
- }
|