You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

form.html 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"/>
  5. <title>Contact me</title>
  6. <style type="text/css">
  7. .page {
  8. width: 640px;
  9. margin: auto;
  10. }
  11. .form {
  12. position: relative;
  13. z-index: 1;
  14. background: #FFFFFF;
  15. max-width: 640px;
  16. margin: 0 auto;
  17. padding: 25px 45px 35px 45px;
  18. text-align: center;
  19. }
  20. .form input, .form textarea {
  21. outline: 0;
  22. background: #f2f2f2;
  23. width: 100%;
  24. border: 0;
  25. margin: 0 0 15px;
  26. padding: 15px;
  27. box-sizing: border-box;
  28. font-size: 14px;
  29. }
  30. .form textarea {
  31. resize: vertical;
  32. min-height: 100px;
  33. }
  34. .form button {
  35. text-transform: uppercase;
  36. outline: 0;
  37. background: #4CAF50;
  38. width: 100%;
  39. border: 0;
  40. padding: 15px;
  41. color: #FFFFFF;
  42. font-size: 14px;
  43. transition: all 0.3 ease;
  44. cursor: pointer;
  45. }
  46. .form button:hover, .form button:active, .form button:focus {
  47. background: #43A047;
  48. }
  49. </style>
  50. </head>
  51. <body>
  52. <div class="page">
  53. <div class="form">
  54. <form action="submit" method="post">
  55. {{ .csrfField }}
  56. {{- range $k, $v := .params }}
  57. <input type="hidden" name="{{ $k | html }}" value="{{ $v | html }}">
  58. {{- end }}
  59. <input type="text" name="name" placeholder="Your name" required>
  60. <input type="email" name="from" placeholder="Your e-mail address" required>
  61. <textarea name="message" placeholder="Your message" required></textarea>
  62. <button>SEND</button>
  63. </form>
  64. </div>
  65. </div>
  66. </body>
  67. </html>