base.html 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. {% load static %}
  2. <!DOCTYPE html>
  3. <html lang="fr" class="h-100">
  4. <head>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7. <meta name="keywords" content="{%if page.p_mots_clefs%}{{page.p_mots_clefs}}{% endif %}">
  8. <meta name="description" content="{% if page.p_description %}{{page.p_description}}{% endif %}">
  9. {% block add_meta_description %}{% endblock %}
  10. <title>{{page.c_sitename}}{% if page.p_meta_title %} | {{page.p_meta_title}}{% elif page.p_titre %} | {{page.p_titre}}{% endif %}</title>
  11. <link rel="shortcut icon" href="/static/favicon.ico">
  12. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
  13. <link href="//fonts.googleapis.com/css2?family=Kufam&display=swap" rel="stylesheet">
  14. <script src="https://kit.fontawesome.com/7cf2a101ac.js"></script>
  15. {% if not request.user.is_authenticated %}
  16. <script data-ad-client="ca-pub-0171697375250839" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
  17. {% endif %}
  18. <style type="text/css">
  19. img {
  20. display: block;
  21. max-width: 100%;
  22. height: auto;
  23. }
  24. body {
  25. background-color:black;
  26. background-image: url('{% static page.c_bgimagelogo %}'), url('{% static page.c_bgimage %}') ;
  27. background-position: 96% 95%, center ;
  28. background-size: 20%,cover;
  29. background-repeat: no-repeat;
  30. background-attachment: fixed;
  31. font-size: 15px;
  32. }
  33. </style>
  34. </head>
  35. <body class="d-flex flex-column h-100">
  36. <header style="color: #fff; font-family: Kufam', cursive;">
  37. <nav class="navbar navbar-expand-lg navbar-dark" style="background-color: {{page.c_bgcolor}};">
  38. <div class="container-fluid">
  39. <div class="collapse navbar-collapse" id="navbarSupportedContent">
  40. <a class="navbar-brand" href="{% url 'core_index' %}"><i class="{{page.c_sitelogo}}"></i> {{page.c_sitename}} </a>
  41. {% if page.p_menu_haut %}
  42. <ul class="navbar-nav mr-auto">
  43. {% regroup page.p_menu_haut by p_menu_parent as menu_with_parent %}
  44. {% for p_menu_parent in menu_with_parent%}
  45. {% if p_menu_parent.grouper != none %}
  46. <div class="navbar-nav dropdown">
  47. <a class="nav-link dropdown-toggle mr-5" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fas fa-bars" ></i> {{ p_menu_parent.grouper }}</a>
  48. <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
  49. {% for item in p_menu_parent.list|dictsortreversed:"p_menu_poid" %}
  50. <a class="dropdown-item" {%if item.p_type == "lien_ext" %}target="_blank"{% endif %} href="{{item.p_adresse}}">{% if item.p_icone %}<i class="{{item.p_icone}}" ></i> {% endif %}{{item.p_titre}}</a></li>
  51. {% endfor %}
  52. </div>
  53. </div>
  54. {% else %}
  55. {% for item in p_menu_parent.list %}
  56. <li class="nav-item"><a class="nav-link" {%if item.p_type == "lien_ext" %}target="_blank"{% endif %} href="{{item.p_adresse}}">{% if item.p_icone %}<i class="{{item.p_icone}}" ></i> {% endif %}{{item.p_titre}}</a></li>
  57. {% endfor %}
  58. {% endif %}
  59. {% endfor %}
  60. </ul>
  61. {% endif %}
  62. {% if page.c_menulogin == 'True' %}
  63. <div class="navbar-nav dropdown">
  64. <a class="nav-link dropdown-toggle mr-5" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fas fa-id-badge" ></i> Mon profil</a>
  65. <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
  66. {% if not request.user.is_authenticated %}
  67. <a class="dropdown-item" href="{% url 'core_login' %}" ><i class="fas fa-sign-in-alt"></i> Connexion</a>
  68. {% elif request.user.is_authenticated %}
  69. <a class="dropdown-item" href="{% url 'admin:index' %}" ><i class="fas fa-cog" ></i> Admin</a>
  70. <a class="dropdown-item" href="{% url 'core_logout' %}" ><i class="fas fa-sign-out-alt"></i> Déconnexion</a>
  71. {% endif %}
  72. </div>
  73. </div>
  74. {% endif %}
  75. </div>
  76. <div class="pos-f-t d-lg-none justify-content-end">
  77. <div class="collapse" id="navbarToggleExternalContent">
  78. <div class="p-3" style="background-color: {{page.c_bgcolor}};">
  79. {% if page.p_menu_haut %}
  80. <ul class="navbar-nav">
  81. {% for item in page.p_menu_haut %}
  82. <li class="nav-item"><a class="nav-link" {%if item.p_type == "lien_ext" %}target="_blank"{% endif %} href="{{item.p_adresse}}">{% if item.p_icone %}<i class="{{item.p_icone}}" ></i> {% endif %}{{item.p_titre}}</a></li>
  83. {% endfor %}
  84. {% if page.c_menulogin == 'True' %}
  85. <hr>
  86. {% if not request.user.is_authenticated %}
  87. <li class="nav-item"><a class="nav-link" href="{% url 'core_login' %}" ><i class="fas fa-sign-in-alt"></i> Connexion</a></li>
  88. {% elif request.user.is_authenticated %}
  89. <li class="nav-item"><a class="nav-link" href="{% url 'admin:index' %}" ><i class="fas fa-cog" ></i> Admin</a></li>
  90. <li class="nav-item"><a class="nav-link" href="{% url 'core_logout' %}" ><i class="fas fa-sign-out-alt"></i> Déconnexion</a></li>
  91. {% endif %}
  92. {% endif %}
  93. </ul>
  94. {% endif %}
  95. </div>
  96. </div>
  97. <nav class="navbar navbar-dark" style="background-color: {{page.c_bgcolor}};">
  98. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggleExternalContent" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation">
  99. <span class="navbar-toggler-icon"></span>
  100. </button>
  101. </nav>
  102. </div>
  103. </div>
  104. </nav>
  105. </header>
  106. <main role="main" class="flex-shrink-0">
  107. <div class="container-fluid mw-100">
  108. <div class="row p-2">
  109. {% block left_panel %}
  110. {% endblock %}
  111. <div class="col-lg-9 p-lg-1 p-md-0 mb-sm-1">
  112. {% if messages %}
  113. <div class="card-body messages p-0 mr-3 ml-3">
  114. {% for message in messages %}
  115. <div class="m-2 alert alert-dismissable alert-{{ message.tags }}" data-alert="alert">
  116. <button type="button" class="close" data-dismiss="alert" >&times;</button>
  117. {{ message }}
  118. </div>
  119. {% endfor %}
  120. </div>
  121. {% endif %}
  122. <div class="card" style="background-color: rgba(250,250,250,0.88);" >
  123. {% if page.p_see_title_and_des_in_templates == True %}
  124. <div class="card-header">
  125. <h2>{% block title %}{% if page.p_icone != "" %}<i class="{{page.p_icone}}"></i> {% endif %}{{page.p_titre|safe}}{% endblock %}</h2>
  126. </div>
  127. {% endif %}
  128. {% if page.p_include %}
  129. {% include page.p_include %}
  130. {% else %}
  131. {% block main %}{% endblock %}
  132. {% endif %}
  133. </div>
  134. </div>
  135. <div class="col-lg-3 p-lg-1 p-md-0 mb-sm-1">
  136. <div class="card" style="background-color: rgba(250,250,250,0.88);" >
  137. {% include 'feeds_link.html' %}
  138. {% block right_panel %}
  139. {% endblock %}
  140. {% if not request.user.is_authenticated and page.p_right and not "account/" in request.path %}
  141. <div class="card-body">
  142. <h5 class="card-title"> Une Pub </h5>
  143. <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
  144. <!-- Pub-1 -->
  145. <ins class="adsbygoogle"
  146. style="display:block"
  147. data-ad-client="ca-pub-0171697375250839"
  148. data-ad-slot="9918621322"
  149. data-ad-format="auto"
  150. data-full-width-responsive="true">
  151. </ins>
  152. <script>
  153. (adsbygoogle = window.adsbygoogle || []).push({});
  154. </script>
  155. </div>
  156. {% endif %}
  157. </div>
  158. </div>
  159. </div>
  160. </main>
  161. <footer class="footer mt-auto py-1 text-white" style="background-color: {{page.c_bgcolor}};">
  162. <div class="container">
  163. {{page.c_sitename}} - Jan. 2024
  164. {% if page.p_menu_pied %}
  165. {% for item in page.p_menu_pied %}
  166. <a class="link-light" href="{{item.p_adresse}}">{{item.p_titre}}</a>{% if not forloop.last %}, {% endif %}
  167. {% endfor %}
  168. {% endif %}
  169. </div>
  170. </footer>
  171. {% block modals %}{% endblock %}
  172. <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js" crossorigin="anonymous"></script>
  173. <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
  174. <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.min.js" integrity="sha384-+sLIOodYLS7CIrQpBjl+C7nPvqq+FbNUBDunl/OZv93DB7Ln/533i8e/mZXLi/P+" crossorigin="anonymous"></script>
  175. {% block script %}
  176. {% endblock %}
  177. </body>
  178. </html>