product_overview.html 16 KB

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