tpl.go 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. package mail
  2. var (
  3. mailTPL = `<!DOCTYPE html>
  4. <html>
  5. <head>
  6. <meta charset="UTF-8">
  7. <title>saga page</title>
  8. </head>
  9. <body>
  10. <form action="" method="post" class="basic-grey" style="margin-left:auto;
  11. margin-right:auto;
  12. max-width: 500px;
  13. background: #F7F7F7;
  14. padding: 25px 15px 25px 10px;
  15. font: 12px Georgia, 'Times New Roman', Times, serif;
  16. color: #888;
  17. text-shadow: 1px 1px 1px #FFF;
  18. border:1px solid #E4E4E4;">
  19. <h1 style="font-size: 25px;
  20. padding: 0px 0px 10px 40px;
  21. display: block;
  22. border-bottom:1px solid #E4E4E4;
  23. margin: -10px -15px 30px -10px;;
  24. color: #888;">
  25. Saga
  26. <span style="display: block;font-size: 11px;">
  27. Merge Request 事件通知</span>
  28. </h1>
  29. <label style="display: block;margin: 0px;">
  30. <span style="float: left;
  31. width:100%;
  32. text-align: left;
  33. padding-right: 10px;
  34. padding-left: 30px;
  35. margin-top: 10px;
  36. color: #888;">
  37. 申请人 : {{.UserName}}
  38. <br />
  39. 来源分支 : {{.SourceBranch}}
  40. <br />
  41. 目标分支 : {{.TargetBranch}}
  42. <br />
  43. 修改标题 : {{.Title}}
  44. <br />
  45. 修改说明 : {{.Description}}
  46. <br />
  47. <a href="{{.URL}}">点击查看..</a>
  48. <br />
  49. <br />
  50. <br />
  51. <h3>额外信息: </h3>
  52. {{.Info}}
  53. <br />
  54. <br />
  55. <br />
  56. </span>
  57. </label>
  58. </form>
  59. </body>
  60. </html>`
  61. mailTPL3 = `<!DOCTYPE html>
  62. <html>
  63. <head>
  64. <meta charset="UTF-8">
  65. <title>saga page</title>
  66. </head>
  67. <body>
  68. <form action="" method="post" class="basic-grey" style="
  69. margin-right:auto;
  70. max-width: 500px;
  71. font: 12px Georgia, 'Times New Roman', Times, serif;
  72. color: #888;
  73. text-shadow: 1px 1px 1px #FFF;">
  74. <h1 style="font-size: 25px;
  75. padding: 10px 0px 10px 40px;
  76. display: block;
  77. border-bottom:1px solid #E4E4E4;
  78. margin: -10px -15px 5px -10px;;
  79. color: #03A9F4;">
  80. Saga
  81. <span style="display: block;font-size: 11px;">
  82. 事件通知</span>
  83. </h1>
  84. </form>
  85. <label style="display: block;margin: 0px;">
  86. <span style="float: left;
  87. width:100%;
  88. text-align: left;
  89. padding-right: 10px;
  90. padding-left: 30px;
  91. margin-top: 10px;
  92. color: #888;">
  93. 执行状态 :
  94. <font class="{{.PipelineStatus}}" >
  95. {{.PipeStatus}}
  96. </font>
  97. <br />
  98. Pipeline信息:
  99. <font class="{{.PipelineStatus}}" >
  100. <a href="{{.URL}}">{{.URL}}</a>
  101. </font>
  102. <br />
  103. 来源分支 : {{.SourceBranch}}
  104. <br />
  105. 修改说明 : {{.Description}}
  106. <br />
  107. 额外信息: {{.Info}}
  108. <br />
  109. <br />
  110. <br />
  111. </span>
  112. </label>
  113. </body>
  114. <style type="text/css">
  115. .failed {
  116. color: #f21303;
  117. }
  118. .failed a{
  119. color: #f21303;
  120. }
  121. .success {
  122. color: #1aaa55;
  123. }
  124. .success a{
  125. color: #1aaa55;
  126. }
  127. </style>
  128. </html>`
  129. )