product_overview.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  1. {% extends "base_generic.html" %}
  2. {% load tags %}
  3. {% load static %}
  4. {% load compress %}
  5. {% load crispy_forms_tags %}
  6. {% block script %}
  7. {% compress js inline %}
  8. <script>
  9. $(document).ready(function(){
  10. $("#how").fadeOut(0);
  11. $("#how").click(function(){
  12. $("#how").fadeOut(200);
  13. });
  14. $(".show-all").click(function(){
  15. $(".card").show();
  16. $("button").removeClass("mark");
  17. $("#how").fadeOut(40);
  18. });
  19. $(".btn-toggle").click (function(elem){
  20. let toggler = this.getAttribute("data-toggler");
  21. $(".card").show();
  22. $("button").removeClass("mark");
  23. $(".card").not("." + toggler).hide();
  24. $("button").filter( "." + toggler ).addClass("mark");
  25. // $("button ." + toggler ).addClass("mark");
  26. if($(".card").filter(":visible").length < 1){
  27. $("#how").fadeIn(200)
  28. } else{
  29. $("#how").fadeOut(10)
  30. }
  31. });
  32. });
  33. </script>
  34. {% endcompress %}
  35. <style media="screen">
  36. .card-columns .mab-card {
  37. width: 97%;
  38. height: 95%;
  39. display: block;
  40. margin-top: 4px;
  41. max-width: 100%;
  42. border-color: #469CA8;
  43. border-radius: 20px;
  44. margin-left: auto;
  45. margin-right: auto;
  46. }
  47. .mab-card-body {
  48. padding: 10px 10px 10px 10px;
  49. }
  50. .mab-card img {
  51. border-radius: 20px 20px 0 0;
  52. }
  53. .mab-product-title {
  54. padding: .15em .75em .15em 0.75em;
  55. border-style: solid;
  56. border-width: 0px;
  57. border-color: #469CA8;
  58. color: #469CA8;
  59. background-color: #FFFD;
  60. border-radius: 150px;
  61. font-size: 1.5em;
  62. font-weight: bold;
  63. font-family: NeuzeitGro-Reg;
  64. text-align: center;
  65. position: absolute;
  66. bottom: 16px;
  67. left: 16px;
  68. }
  69. .mab-product-button-text {
  70. color: #EA4814;
  71. font-size: initial;
  72. font-weight: bold;
  73. text-align: center;
  74. top: 25%;
  75. /* left: 50%; */
  76. /* transform: translate(-50%, -50%); */
  77. position: inherit;
  78. }
  79. .mab-product-button {
  80. position: absolute;
  81. top: 16px;
  82. right: 16px;
  83. background-color: #EDBBA8;
  84. border: 0px solid #EA4814;
  85. border-radius: 50%;
  86. width: 5.2em;
  87. height: 5.2em;
  88. text-align: center;
  89. transform: rotate(15deg);
  90. }
  91. .mab-product-vote {
  92. position: absolute;
  93. top: 8px;
  94. right: 16px;
  95. color: white;
  96. font-size: large
  97. }
  98. .mab-card-text {
  99. color: black;
  100. margin-top: 0px;
  101. line-height: 2.25em;
  102. }
  103. .card-columns .mab-card-highlight {
  104. box-shadow: 0 4px 8px 0 rgba(70, 156, 168, 0.2), 0 6px 20px 0 rgba(70, 156, 168, 0.19);
  105. margin-bottom: 40px;
  106. }
  107. .card-columns .mab-card-container-highlight {
  108. margin-bottom: 40px;
  109. }
  110. .tag-line {
  111. line-height: 2.25em;
  112. }
  113. .tag-container {}
  114. .mab-search-bar {
  115. padding-top: 4px;
  116. }
  117. /* ------------------------------------------------------------------------------- */
  118. .scene {
  119. width: 200px;
  120. height: 260px;
  121. border: 1px solid #CCC;
  122. margin: 40px 0;
  123. perspective: 600px;
  124. }
  125. .flipcard {
  126. position: relative;
  127. transform-style: preserve-3d;
  128. /* transform-origin: center right; */
  129. transition: transform 1s;
  130. }
  131. .flipcard.is-flipped {
  132. /* transform: translateX(-100%) rotateY(-180deg); */
  133. transform: rotateY(180deg);
  134. }
  135. .mab-card-face {
  136. position: absolute;
  137. width: 100%;
  138. height: 100%;
  139. /* overflow: auto; */
  140. overflow: hidden;
  141. -webkit-backface-visibility: hidden;
  142. backface-visibility: hidden;
  143. }
  144. .mab-card-face--front {
  145. position: relative;
  146. background-color: #FFF;
  147. -webkit-backface-visibility: hidden;
  148. backface-visibility: hidden;
  149. }
  150. .card-columns .mab-card-face--front .mab-card {
  151. background-color: #fafafa;
  152. }
  153. .mab-card-face--front .mab-card,
  154. .mab-card-face--back .mab-card,
  155. .mab-card-face--front .mab-card div,
  156. .mab-card-face--back .mab-card div,
  157. .mab-card-face--front .mab-card a,
  158. .mab-card-face--back .mab-card a {
  159. -webkit-backface-visibility: hidden;
  160. backface-visibility: hidden;
  161. }
  162. .toogle-overflow {
  163. overflow: auto;
  164. }
  165. .mab-card-face--back {
  166. background: #FFF;
  167. transform: rotateY(180deg);
  168. top: 0;
  169. position: absolute;
  170. left: 0;
  171. -webkit-backface-visibility: hidden;
  172. backface-visibility: hidden;
  173. }
  174. .card {
  175. position: relative;
  176. display: -ms-flexbox;
  177. display: flex;
  178. -ms-flex-direction: column;
  179. flex-direction: column;
  180. min-width: 0;
  181. word-wrap: break-word;
  182. background-color: #fff;
  183. background-clip: border-box;
  184. border: none;
  185. border-radius: 0rem;
  186. }
  187. </style>
  188. {% endblock %}
  189. {% block content %}
  190. <div class="container-fluid tag-container">
  191. <nav class="navbar-expand-sm tag" style="margin-left: 0px">
  192. <button class="navbar-toggler border-thin mybtn rounded-0 tag navbar-expand-sm " type="button" data-toggle="collapse" data-target="#tags" aria-expanded="false" aria-label="Toggle tags" style="font-size: 15px">
  193. <span class="mybtn"></span> Alle Tags anzeigen ⋁
  194. </button>
  195. <div class="row border-dark collapse navbar-collapse tag-line" id="tags">
  196. <div class="container-fluid">
  197. <p>Filtere die Projekte, indem du auf einen der folgenden Tags klickst:</p>
  198. <button class="show-all border-thin mybtn " style="margin-bottom: 2px; ">#Alle anzeigen</button>
  199. {% for elem in frei_list %}
  200. <button id='{{elem.0}}' data-toggler='{{elem.0}}' class="border-thin mybtn btn-toggle elem.0" style="margin-bottom: 2px; ">#{{elem.1}}</button>
  201. {% endfor %}
  202. {% for key, value in raum_agebote_dict.items %}
  203. <button class="border-thin mybtn btn-toggle {{key}}" data-toggler='{{key}}' style="margin-bottom: 2px; ">#{{value}}</button>
  204. {% endfor %}
  205. {% for key, value in ort_dict.items %}
  206. <button class="border-thin mybtn btn-toggle {{key}}" data-toggler='{{key}}' style="margin-bottom: 2px; ">#{{value}}</button>
  207. {% endfor %}
  208. {% for elem in altneu_list %}
  209. <button class="border-thin mybtn btn-toggle {{elem.0}}" data-toggler='{{elem.0}}' style="margin-bottom: 2px; ">#{{elem.1}}</button>
  210. {% endfor %}
  211. <button class="border-thin mybtn btn-toggle begleitet_true" data-toggler='begleitet_true' style="margin-bottom: 2px; " style="">#Begleitet von realitylab</button>
  212. {% if urbanem %}
  213. <button class="border-thin mybtn btn-toggle urbanem_true" data-toggler='urbanem_true' style="margin-bottom: 2px; " style="">#Urbane Mischung</button>
  214. {% endif %}
  215. <button class="border-thin mybtn" style="margin-bottom: 2px;">{% include "marktplatz/modal-sa.html" %}</button>
  216. <button class="border-thin mybtn" style="margin-bottom: 2px;" onclick="window.location='{% url 'newsletter-anmeldung' newsletter_slug='gemeinschaffen-newsletter' %}'" style=""><i class="fas fa-envelope"></i> Newsletter </button>
  217. </div>
  218. </div>
  219. <div class="row border-dark " id="search_bar">
  220. <div class="container-fluid">
  221. <div class="row">
  222. <div class="col-sm-6">
  223. <form method="post" action="{% url 'generic-search-products' type=type %}">
  224. {% csrf_token %}
  225. <!-- Left here in case we need to debug -->
  226. {% if signup_errors %}
  227. <div class='invalid-feedback' style="display: none;">{{ signup_errors }}</div>
  228. {% endif %}
  229. {% if contact_errors %}
  230. <div class='invalid-feedback' style="display: none;">{{ contact_errors }}</div>
  231. {% endif %}
  232. <!-- end of debug -->
  233. {% crispy textSearchForm %}
  234. </form>
  235. </div>
  236. <div class="col-sm-6">
  237. </div>
  238. </div>
  239. </div>
  240. </div>
  241. </nav>
  242. </div>
  243. <hr class="division-color" >
  244. <div id="how" style="margin-top: 5px;text-align: center;vertical-align: middle; max-height: 40px;" class="container-fluid">
  245. <p style="color: black"> There are no Products matching your selection, as you have selected multiple tags.
  246. Click <button class="show-all border-thin mybtn" style="margin-bottom: 2px; margin-top: 15px">#Alle anzeigen</button> to deselect all tags.
  247. </p>
  248. </div>
  249. <!-- Start Cards -->
  250. <!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
  251. <div class="card-columns" style="margin-top: 7px; orphans: 1;">
  252. {{main_card|safe}}
  253. <hr class="division-color" style="margin: 35px 0px 35px 0px">
  254. {% for product in object_list %}
  255. <!-- rounded-0 border-0 -->
  256. <div
  257. class="card {{product.ort}} {{product.status}} {{product.frei}} {{product.altneu}} {% for key in product.raumangebot %}{{key}} {% endfor %} {% if product.realitylab %}begleitet_true{% endif %} {% if product.urbanem %}urbanem_true{% endif %} {% if product.frei == 'JAJA' %} mab-card-container-highlight {% endif %} ">
  258. <div id="product_{{product.pk}}_card" class="flipcard">
  259. <div class="mab-card-face mab-card-face--front toogle-overflow">
  260. <!-- -->
  261. <div class="mab-card {{product.ort}} {{product.status}} {{product.frei}} {{product.altneu}} {% if product.frei == 'JAJA' %} mab-card-highlight {% endif %}" style="">
  262. <a href="{% url 'product-detail-type' type=product.type pk=product.pk %}">
  263. <div style="position: relative;text-align: center;">
  264. <img class="{% for category in product.category.all %} {{category.short_name}} {% endfor %} card-img-top" data-otherclass="rounded-0"
  265. src="{{product.media_set.first.image_norm.url}}?v={{ product.media_set.first.pk }}" alt="image" loading="lazy">
  266. <div class="mab-product-title" style=""><span>{{product.name }}</span></div>
  267. {% if product.frei == 'JAJA' %} <div class="mab-product-button" style="">
  268. <div class="mab-product-button-text">
  269. Wohnung Frei!
  270. </div>
  271. </div>
  272. {% endif %}
  273. </div>
  274. </a>
  275. <div class="card-body mab-card-body " style="">
  276. <p class="mab-card-text card-text" style="">
  277. {% if request.user_agent.browser.family != 'Safari' %}
  278. <button id='product_{{product.pk}}_flipper' onclick="" class="border-thin mybtn flipper" data-flip-card="product_{{product.pk}}_card" style=""><i class="fas fa-sync-alt"></i> Steckbrief</button>
  279. {% endif %}
  280. <!-- <button id='product_{{product.pk}}_teilen' onclick="location.href = '{% url 'projekt-card-embed' pk=product.pk %}'" class="border-thin mybtn" style=""><i class="fas fa-share"></i> Teilen</button> -->
  281. <button id='product_{{product.pk}}_{{product.frei}}' data-toggler='{{product.frei}}' class="border-thin mybtn btn-toggle {{product.frei}}" style="">#{{product.get_frei_display}}</button>
  282. <button id='product_{{product.pk}}_{{product.status}}' data-toggler='{{product.status}}' class="border-thin mybtn btn-toggle {{product.status}}" style="">#{{product.get_status_display}}</button>
  283. <button id='product_{{product.pk}}_{{product.ort}}' data-toggler='{{product.ort}}' class="border-thin mybtn btn-toggle {{product.ort}}" style="">#{{product.get_ort_display}}</button>
  284. {% if product.altneu %}
  285. <button id='product_{{product.pk}}_{{product.altneu}}' data-toggler='{{product.altneu}}' class="border-thin mybtn btn-toggle {{product.altneu}}" style="">#{{product.get_altneu_display}}</button>
  286. {% endif %}
  287. {% for key in product.raumangebot %}
  288. <button class="border-thin mybtn btn-toggle {{key}}" data-toggler='{{key}}' style="margin-bottom: 2px; ">#{{ product.raumangebot.choices|get_item:key}}</button>
  289. {% endfor %}
  290. {% for key, value in product.raumangebot.field.choices %}
  291. <button class="border-thin mybtn btn-toggle {{key}}" data-toggler='{{key}}' style="margin-bottom: 2px; ">#{{value}}</button>
  292. {% endfor %}
  293. {% if product.realitylab %}
  294. <button id='product_{{product.pk}}_realitylab_{{product.realitylab}}' data-toggler='begleitet_true' class="border-thin mybtn btn-toggle begleitet_true" style="">#Begleitet von RealityLab</button>
  295. {% endif %}
  296. {% if product.urbanem %}
  297. <button id='product_{{product.pk}}_urbanem_{{product.urbanem}}' data-toggler='urbanem_true' class="border-thin mybtn btn-toggle urbanem_true" style="">#Urbane Mischung</button>
  298. {% endif %}
  299. <!-- <button class="show-all border-thin mybtn " style="margin-bottom: 2px; ">#Alle anzeigen</button> -->
  300. <!-- <span id="ShareButton" class="cursor-pointer" > Teilen</span> -->
  301. </p>
  302. </div>
  303. </div>
  304. </div>
  305. <!-- BACKFACE BACKFACE BACKFACE BACKFACE BACKFACE BACKFACE BACKFACE -->
  306. {% if request.user_agent.browser.family != 'Safari' %}
  307. <div class="mab-card-face mab-card-face--back">
  308. <div class="mab-card {% if product.frei == 'JAJA' %} {% endif %}">
  309. <div class="container flipper-wrapper" data-flip-card="product_{{product.pk}}_card">
  310. <div class="row">
  311. <div class="col-sm-12">
  312. <br>
  313. <div class="" style="">
  314. <h3> {{ product.name }}</h3>
  315. </div>
  316. <button id='product_{{product.pk}}_flipper_back' onclick="" class="border-thin mybtn " data-flip-card="product_{{product.pk}}_card" style=""><i class="fas fa-sync-alt"></i> Steckbrief</button>
  317. <div class="" style=""><span>{{ product.beschreibung | safe }}</span></div>
  318. <div class="" style=""><strong>Wohnungen:</strong> <span>{{ product.awohnungen }}</span></div>
  319. <div class="" style=""><span>{% if product.gemeinschaftr %}<strong>{% field_name product 'gemeinschaftr' %}:</strong> {{ product.gemeinschaftr }}{% endif %}</span></div>
  320. <div class="" style=""><span>{% if product.kgemeinschaftr %}<strong>{% field_name product 'kgemeinschaftr' %}:</strong> {{ product.kgemeinschaftr }}{% endif %}</span></div>
  321. <div class="" style=""><span>{% if product.claim %}<strong>{% field_name product 'claim' %}:</strong> {{ product.claim }}{% endif %}</span></div>
  322. <span></span>
  323. </div>
  324. </div>
  325. </div>
  326. <a href="{% url 'product-detail-type' type=product.type pk=product.pk %}">
  327. <div style="position: relative;text-align: center;">
  328. &nbsp;
  329. </div>
  330. </a>
  331. <div class="card-body mab-card-body " style="">
  332. &nbsp;
  333. </div>
  334. </div>
  335. </div> <!-- BACKFACE -->
  336. {% endif %}
  337. </div>
  338. </div>
  339. {% endfor %}
  340. {{sponsor_cards|safe}}
  341. {% if request.user_agent.browser.family != 'Safari' %}
  342. {% compress js inline %}
  343. <script>
  344. $(".flipper").click (function(elem){
  345. let toggler = this.getAttribute("data-flip-card");
  346. $("#" + toggler ).toggleClass('is-flipped');
  347. $("#" + toggler + " .mab-card-face" ).toggleClass('toogle-overflow');
  348. });
  349. $(".flipper-wrapper").click (function(elem){
  350. let toggler = this.getAttribute("data-flip-card");
  351. $("#" + toggler ).toggleClass('is-flipped');
  352. $("#" + toggler + " .mab-card-face" ).toggleClass('toogle-overflow');
  353. });
  354. </script>
  355. {% endcompress %}
  356. {% endif %}
  357. </div>
  358. <!-- End Cards -->
  359. <!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
  360. {% endblock %}