product_overview.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  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. .toggle-overflow {
  163. overflow: auto;
  164. /* z-index: 2; */
  165. }
  166. .toggle-zindex {
  167. z-index: -1;
  168. }
  169. .mab-card-face--back {
  170. background: #FFF;
  171. transform: rotateY(180deg);
  172. top: 0;
  173. position: absolute;
  174. left: 0;
  175. -webkit-backface-visibility: hidden;
  176. backface-visibility: hidden;
  177. }
  178. .card {
  179. position: relative;
  180. display: -ms-flexbox;
  181. display: flex;
  182. -ms-flex-direction: column;
  183. flex-direction: column;
  184. min-width: 0;
  185. word-wrap: break-word;
  186. background-color: #fff;
  187. background-clip: border-box;
  188. border: none;
  189. border-radius: 0rem;
  190. }
  191. </style>
  192. {% endblock %}
  193. {% block content %}
  194. <div class="container-fluid tag-container">
  195. <nav class="navbar-expand-sm tag" style="margin-left: 0px">
  196. <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">
  197. <span class="mybtn"></span> Alle Tags anzeigen ⋁
  198. </button>
  199. <div class="row border-dark collapse navbar-collapse tag-line" id="tags">
  200. <div class="container-fluid">
  201. <p>Filtere die Projekte, indem du auf einen der folgenden Tags klickst:</p>
  202. <button class="show-all border-thin mybtn " style="margin-bottom: 2px; ">#Alle anzeigen</button>
  203. {% for elem in frei_list %}
  204. <button id='{{elem.0}}' data-toggler='{{elem.0}}' class="border-thin mybtn btn-toggle elem.0" style="margin-bottom: 2px; ">#{{elem.1}}</button>
  205. {% endfor %}
  206. {% for key, value in raum_agebote_dict.items %}
  207. <button class="border-thin mybtn btn-toggle {{key}}" data-toggler='{{key}}' style="margin-bottom: 2px; ">#{{value}}</button>
  208. {% endfor %}
  209. {% for key, value in ort_dict.items %}
  210. <button class="border-thin mybtn btn-toggle {{key}}" data-toggler='{{key}}' style="margin-bottom: 2px; ">#{{value}}</button>
  211. {% endfor %}
  212. {% for elem in altneu_list %}
  213. <button class="border-thin mybtn btn-toggle {{elem.0}}" data-toggler='{{elem.0}}' style="margin-bottom: 2px; ">#{{elem.1}}</button>
  214. {% endfor %}
  215. <button class="border-thin mybtn btn-toggle begleitet_true" data-toggler='begleitet_true' style="margin-bottom: 2px; " style="">#Begleitet von realitylab</button>
  216. {% if urbanem %}
  217. <button class="border-thin mybtn btn-toggle urbanem_true" data-toggler='urbanem_true' style="margin-bottom: 2px; " style="">#Urbane Mischung</button>
  218. {% endif %}
  219. <button class="border-thin mybtn" style="margin-bottom: 2px;">{% include "marktplatz/modal-sa.html" %}</button>
  220. <button class="border-thin mybtn" style="margin-bottom: 2px;" onclick="window.location='{% url 'only-newsletter-anmeldung' newsletter_slug='gemeinschaffen-newsletter' %}'" style=""><i class="fas fa-envelope"></i> Newsletter </button>
  221. </div>
  222. </div>
  223. <div class="row border-dark " id="search_bar">
  224. <div class="container-fluid">
  225. <div class="row">
  226. <div class="col-sm-6">
  227. <form method="post" action="{% url 'generic-search-products' type=type %}">
  228. {% csrf_token %}
  229. <!-- Left here in case we need to debug -->
  230. {% if signup_errors %}
  231. <div class='invalid-feedback' style="display: none;">{{ signup_errors }}</div>
  232. {% endif %}
  233. {% if contact_errors %}
  234. <div class='invalid-feedback' style="display: none;">{{ contact_errors }}</div>
  235. {% endif %}
  236. <!-- end of debug -->
  237. {% crispy textSearchForm %}
  238. </form>
  239. </div>
  240. <div class="col-sm-6">
  241. </div>
  242. </div>
  243. </div>
  244. </div>
  245. </nav>
  246. </div>
  247. <hr class="division-color" >
  248. <div id="how" style="margin-top: 5px;text-align: center;vertical-align: middle; max-height: 40px;" class="container-fluid">
  249. <p style="color: black"> There are no Products matching your selection, as you have selected multiple tags.
  250. Click <button class="show-all border-thin mybtn" style="margin-bottom: 2px; margin-top: 15px">#Alle anzeigen</button> to deselect all tags.
  251. </p>
  252. </div>
  253. <!-- Start Cards -->
  254. <!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
  255. <div class="card-columns" style="margin-top: 7px; orphans: 1;">
  256. {{main_card|safe}}
  257. <hr class="division-color" style="margin: 35px 0px 35px 0px">
  258. {% for product in object_list %}
  259. <!-- rounded-0 border-0 -->
  260. <div
  261. 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 %} ">
  262. <div id="product_{{product.pk}}_card" class="flipcard">
  263. <div class="mab-card-face mab-card-face--front toggle-overflow">
  264. <!-- -->
  265. <div class="mab-card {{product.ort}} {{product.status}} {{product.frei}} {{product.altneu}} {% if product.frei == 'JAJA' %} mab-card-highlight {% endif %}" style="">
  266. <a href="{% url 'product-detail-type' type=product.type pk=product.pk %}">
  267. <div style="position:relative; text-align:center; min-height: 200px;">
  268. <img class="{% for category in product.category.all %} {{category.short_name}} {% endfor %} card-img-top" data-otherclass="rounded-0"
  269. src="{{product.media_set.first.image_norm.url}}?v={{ product.media_set.first.pk }}" alt="image" loading="lazy">
  270. <div class="mab-product-title" style=""><span>{{product.name }}</span></div>
  271. {% if product.frei == 'JAJA' %} <div class="mab-product-button" style="">
  272. <div class="mab-product-button-text">
  273. Wohnung Frei!
  274. </div>
  275. </div>
  276. {% endif %}
  277. </div>
  278. </a>
  279. <div class="card-body mab-card-body " style="">
  280. <p class="mab-card-text card-text" style="">
  281. {% if request.user_agent.browser.family != 'Safari' %}
  282. <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>
  283. {% endif %}
  284. <!-- <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> -->
  285. <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>
  286. <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>
  287. <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>
  288. {% if product.altneu %}
  289. <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>
  290. {% endif %}
  291. {% for key in product.raumangebot %}
  292. <button class="border-thin mybtn btn-toggle {{key}}" data-toggler='{{key}}' style="margin-bottom: 2px; ">#{{ product.raumangebot.choices|get_item:key}}</button>
  293. {% endfor %}
  294. {% for key, value in product.raumangebot.field.choices %}
  295. <button class="border-thin mybtn btn-toggle {{key}}" data-toggler='{{key}}' style="margin-bottom: 2px; ">#{{value}}</button>
  296. {% endfor %}
  297. {% if product.realitylab %}
  298. <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>
  299. {% endif %}
  300. {% if product.urbanem %}
  301. <button id='product_{{product.pk}}_urbanem_{{product.urbanem}}' data-toggler='urbanem_true' class="border-thin mybtn btn-toggle urbanem_true" style="">#Urbane Mischung</button>
  302. {% endif %}
  303. <!-- <button class="show-all border-thin mybtn " style="margin-bottom: 2px; ">#Alle anzeigen</button> -->
  304. <!-- <span id="ShareButton" class="cursor-pointer" > Teilen</span> -->
  305. </p>
  306. </div>
  307. </div>
  308. </div>
  309. <!-- BACKFACE BACKFACE BACKFACE BACKFACE BACKFACE BACKFACE BACKFACE -->
  310. {% if request.user_agent.browser.family != 'Safari' %}
  311. <div class="mab-card-face mab-card-face--back toggle-zindex">
  312. <div class="mab-card {% if product.frei == 'JAJA' %} {% endif %}">
  313. <div class="container flipper-wrapper" data-flip-card="product_{{product.pk}}_card">
  314. <div class="row">
  315. <div class="col-sm-12">
  316. <br>
  317. <div class="" style="">
  318. <h3> {{ product.name }}</h3>
  319. </div>
  320. <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>
  321. <div class="" style=""><span>{{ product.beschreibung | safe }}</span></div>
  322. <div class="" style=""><strong>Wohnungen:</strong> <span>{{ product.awohnungen }}</span></div>
  323. <div class="" style=""><span>{% if product.gemeinschaftr %}<strong>{% field_name product 'gemeinschaftr' %}:</strong> {{ product.gemeinschaftr }}{% endif %}</span></div>
  324. <div class="" style=""><span>{% if product.kgemeinschaftr %}<strong>{% field_name product 'kgemeinschaftr' %}:</strong> {{ product.kgemeinschaftr }}{% endif %}</span></div>
  325. <div class="" style=""><span>{% if product.claim %}<strong>{% field_name product 'claim' %}:</strong> {{ product.claim }}{% endif %}</span></div>
  326. <span></span>
  327. </div>
  328. </div>
  329. </div>
  330. <a href="{% url 'product-detail-type' type=product.type pk=product.pk %}">
  331. <div style="position: relative;text-align: center;">
  332. &nbsp;
  333. </div>
  334. </a>
  335. <div class="card-body mab-card-body " style="">
  336. &nbsp;
  337. </div>
  338. </div>
  339. </div> <!-- BACKFACE -->
  340. {% endif %}
  341. </div>
  342. </div>
  343. {% endfor %}
  344. {{sponsor_cards|safe}}
  345. {% if request.user_agent.browser.family != 'Safari' %}
  346. {% compress js inline %}
  347. <script>
  348. $(".flipper").click (function(elem){
  349. let toggler = this.getAttribute("data-flip-card");
  350. $("#" + toggler ).toggleClass('is-flipped');
  351. $("#" + toggler + " .mab-card-face" ).toggleClass('toggle-overflow');
  352. $("#" + toggler + " .mab-card-face" ).toggleClass('toggle-zindex');
  353. });
  354. $(".flipper-wrapper").click (function(elem){
  355. let toggler = this.getAttribute("data-flip-card");
  356. $("#" + toggler ).toggleClass('is-flipped');
  357. $("#" + toggler + " .mab-card-face" ).toggleClass('toggle-overflow');
  358. $("#" + toggler + " .mab-card-face" ).toggleClass('toggle-zindex');
  359. });
  360. </script>
  361. {% endcompress %}
  362. {% endif %}
  363. </div>
  364. <!-- End Cards -->
  365. <!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
  366. {% endblock %}