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.6KB

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