You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

contentSection.vue 7.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <template>
  2. <section>
  3. <div class="container pb-5">
  4. <div class="row" id="resort-profile">
  5. <div class="col-md-4">
  6. <div class="resPortfolioSection">
  7. <iframe
  8. width="100%"
  9. src="https://www.youtube.com/embed/watch_popup?v=qKgHJYzWtVA"
  10. frameborder="0"
  11. allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
  12. allowfullscreen
  13. style="margin-bottom:-6px"
  14. ></iframe>
  15. <div v-for="(image, i) in propertyImages" @click="index = i" :key="i">
  16. <div v-if="i < 3">
  17. <img v-if="i === 0" style="width:100%" :src="image" />
  18. <div v-else-if="i !== 0">
  19. <img
  20. v-if="i % 2 === 0"
  21. style="width:50%; height:140px; float:right;"
  22. :src="image"
  23. />
  24. <img v-else style="width:50%; height:140px; float:left" :src="image" />
  25. </div>
  26. </div>
  27. </div>
  28. <gallery :images="propertyImages" :index="index" @close="index = null"></gallery>
  29. </div>
  30. <div class="panel-left p-5" style="margin-top:130px">
  31. <h2>Property Detial</h2>
  32. <!-- TODO: Make it dynamic -->
  33. <h4 style="color:white">{{ property.price | toCurrency }}</h4>
  34. <p>#{{ property.propertyRef }}</p>
  35. <p v-if="property.showAddress">{{ property.addressOther }}</p>
  36. <p v-if="property.showAddress">{{ property.streetNumber }} {{ property.streetName }}</p>
  37. <p>{{ property.city }}, {{ property.suburb }}</p>
  38. <div v-for="(data, i) in property.displayData" :key="i">
  39. <div v-for="field in data.values" :key="field.id">
  40. <p v-if="field.name === 'Floor Size'">{{ field.value }}M<sup>2</sup></p>
  41. <p v-if="field.name === 'Bedrooms'">Bedrooms {{ field.value }}</p>
  42. <p v-if="field.name === 'Bathrooms'">Bathrooms {{ field.value }}</p>
  43. </div>
  44. </div>
  45. <div class="btn-white-border"><i class="fa fa-search"></i>BOOK A VIEWING</div>
  46. </div>
  47. <div class="panel-left px-5 pb-5 text-center">
  48. <h4 class="text-white">Share this Property</h4>
  49. <a id="fb_share" href="#" target="_blank"
  50. ><img src="img/icon-facebook.svg" alt="Share on Facebook" class="col-3 p-1 mx-1"
  51. /></a>
  52. <a
  53. href="mailto:?Subject=Simple Share Buttons&amp;Body=I%20saw%20this%20and%20thought%20of%20you!%20 https://www.univateproperties.co.za/"
  54. ><img src="/img/icon-email.svg" alt="Share on email" class="col-3 p-1 mx-1"
  55. /></a>
  56. <a
  57. href="whatsapp://send?text=Check out this property!"
  58. data-action="share/whatsapp/share"
  59. target="_blank"
  60. >
  61. <img src="img/icon-whatsapp.svg" alt="Share on whatsapp" class="col-3 p-1 mx-1"
  62. /></a>
  63. </div>
  64. </div>
  65. <div class="col-md-8 p-5 resort-profile">
  66. <h2 v-if="property.showAddress">
  67. <div style="display:inline" v-if="property.propertyName !== null">
  68. {{ property.propertyName }} /
  69. </div>
  70. {{ property.streetNumber }} {{ property.streetName }}
  71. </h2>
  72. <h2 v-else>{{ property.propertyName }}</h2>
  73. <div class="container">
  74. <div class="row">
  75. <div class="col">
  76. <p v-html="property.description"></p>
  77. </div>
  78. </div>
  79. </div>
  80. <div>
  81. <h4>Property Features</h4>
  82. <div v-for="(data, i) in property.displayData" :key="i" class="row my-3">
  83. <div v-for="(field, j) in data.values" :key="j" class="col-md-6">
  84. <div v-if="field.value.toUpperCase() != 'YES'">
  85. <i class="fa fa-check-circle"></i> {{ field.value }} {{ field.name }}
  86. </div>
  87. <div v-else><i class="fa fa-check-circle"></i> {{ field.name }}</div>
  88. </div>
  89. </div>
  90. </div>
  91. <h4 class="mt-5">Video Tour</h4>
  92. <iframe
  93. width="100%"
  94. src="https://www.youtube.com/embed/watch_popup?v=qKgHJYzWtVA"
  95. frameborder="0"
  96. allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
  97. allowfullscreen
  98. style="margin-bottom:-6px"
  99. class="mt-3"
  100. ></iframe>
  101. <p></p>
  102. <div class="d-flex mt-3">
  103. <iframe
  104. width="100%"
  105. height="200"
  106. id="gmap_canvas"
  107. :src="propertyMap"
  108. frameborder="0"
  109. scrolling="no"
  110. marginheight="0"
  111. marginwidth="0"
  112. ></iframe>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. </section>
  118. </template>
  119. <script>
  120. /* eslint-disable */
  121. import { mapState, mapActions } from "vuex";
  122. import gallery from "../../../shared/gallerySlideShow";
  123. import { ShareFacebook } from "vue-share-social";
  124. export default {
  125. components: {
  126. gallery,
  127. ShareFacebook
  128. },
  129. props: {
  130. property: {},
  131. propertyImages: {}
  132. },
  133. created() {
  134. //this.getListsForPropertyEdit(this.property.id);
  135. console.log(this.property.displayData);
  136. },
  137. mounted() {
  138. // var facebookShare = document.getElementById("fb_share");
  139. // facebookShare.href = "http://www.facebook.com/share.php?u=" + encodeURIComponent(location.href);
  140. },
  141. data() {
  142. return {
  143. index: null,
  144. date: new Date()
  145. };
  146. },
  147. methods: {
  148. //...mapActions("searchTab", ["getListsForPropertyEdit"])
  149. },
  150. computed: {
  151. //...mapState("searchTab", ["provinces", "cities", "suburbs"]),
  152. propertyMap() {
  153. if (this.property.propertCoords) {
  154. var lat = this.property.propertCoords.split(",")[0];
  155. var lng = this.property.propertCoords.split(",")[1];
  156. // var url =
  157. // "https://maps.google.com/maps?q=" +
  158. // lat.replace(".", ",") +
  159. // "," +
  160. // lng.replace(".", ",") +
  161. // "&hl=es&z=14&amp;output=embed";
  162. var url = "";
  163. return url;
  164. }
  165. return "";
  166. }
  167. }
  168. };
  169. </script>
  170. <style lang="scss" scoped>
  171. /* Extra small devices (phones, 600px and down) */
  172. @media only screen and (max-width: 575px) {
  173. .resPortfolioSection {
  174. margin-bottom: 100px;
  175. }
  176. }
  177. /* Small devices (portrait tablets and large phones, 600px and up) */
  178. @media only screen and (min-width: 576px) {
  179. .resPortfolioSection {
  180. margin-bottom: 140px;
  181. }
  182. }
  183. /* Medium devices (landscape tablets, 768px and up) */
  184. @media only screen and (min-width: 768px) {
  185. .resPortfolioSection {
  186. margin-bottom: 50px;
  187. }
  188. }
  189. /* Large devices (laptops/desktops, 992px and up) */
  190. @media only screen and (min-width: 992px) {
  191. .resPortfolioSection {
  192. margin-bottom: 60px;
  193. }
  194. }
  195. /* Extra large devices (large laptops and desktops, 1200px and up) */
  196. @media only screen and (min-width: 1200px) {
  197. .resPortfolioSection {
  198. margin-bottom: 80px;
  199. }
  200. }
  201. </style>