menu.html 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <style>
  2. .menu-a li a {
  3. font-family: Forum;
  4. text-decoration: none;
  5. color: black;
  6. font-size: 18px;
  7. }
  8. .menu-a li a:hover {
  9. text-shadow: 0.5px 0.5px black;
  10. }
  11. </style>
  12. <div class="container">
  13. <hr>
  14. <h2 style="font-family: Forum; ">УСЛУГИ</h2>
  15. <hr>
  16. <ul class="menu-a" style="
  17. list-style: none;
  18. margin-left: -30px;
  19. line-height: 25px;">
  20. {% for item in menu %}
  21. {% comment %} {% url item.slug %} {% endcomment %}
  22. <li><a href="#"><h5>{{ item.title }}</h5></a></li>
  23. {% endfor %}
  24. </ul>
  25. <hr>
  26. <h2 style="font-family: Forum; ">ОТЗЫВЫ О НАС</h2>
  27. <hr>
  28. <figure class="text-end">
  29. <blockquote class="blockquote">
  30. <p style="
  31. text-align: left;
  32. font-family: Forum;
  33. font-size: 15px;">Lorem ipsum dolor sit amet consectetur adipisicing elit. A quis non autem eveniet consectetur quibusdam.</p>
  34. </blockquote>
  35. <figcaption class="blockquote-footer" style="font-family: Forum; font-size: 14px;">
  36. Автор
  37. </figcaption>
  38. </figure>
  39. <figure class="text-end">
  40. <blockquote class="blockquote">
  41. <p style="
  42. font-family: Forum;
  43. text-align: left;
  44. font-size: 15px;">Lorem, ipsum dolor sit amet consectetur adipisicing elit. Sequi doloremque, atque aliquam dignissimos aperiam hic.</p>
  45. </blockquote>
  46. <figcaption class="blockquote-footer" style="font-family: Forum; font-size: 14px;">
  47. Автор
  48. </figcaption>
  49. </figure>
  50. <hr>
  51. <form method="post" style="font-family: Forum;" class="row g-2">
  52. {% csrf_token %}
  53. {{ form.name }}
  54. {{ form.email }}
  55. {{ form.message }}
  56. {{ form.captcha}}
  57. {% if form.captcha.errors %}
  58. <div class="alert alert-danger" role="alert">
  59. Неверный ответ на CAPTCHA
  60. </div>
  61. {% endif %}
  62. <button class="btn btn-light my-1" id="btnsend" type="submit"
  63. style="color: #060936;
  64. box-shadow: 1px 1px 2px gray;">Отправить</button>
  65. </form>
  66. <script>
  67. //Скрипт для отображения капчи после заполнения всех полей
  68. var captchaImage = document.getElementsByClassName('captcha')[0]
  69. var captcha = document.getElementById('id_captcha_1')
  70. var name = document.getElementById('sendemailname')
  71. var email = document.getElementById('sendemailemail')
  72. var message = document.getElementById('sendemailmessage')
  73. var btnsend = document.getElementById('btnsend')
  74. function checkFields(){
  75. if(name.value != "" && email.value != "" && message.value != ""){
  76. captcha.style.display = "initial"
  77. captchaImage.style.display = "initial"
  78. }else{
  79. captcha.style.display = "none"
  80. captchaImage.style.display = "none"
  81. }
  82. }
  83. checkFields()
  84. btnsend.addEventListener("mouseenter", (event) => {
  85. checkFields()
  86. });
  87. captcha.className += " form-control";
  88. captcha.placeholder = "Ответ на капчу";
  89. </script>
  90. </div>