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.

residentialCarouselSection.vue 9.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  1. <template>
  2. <div>
  3. <section id="intro">
  4. <div class="container">
  5. <div class="row">
  6. <div align="left" class="col-sm-12 col-md-8">
  7. <div class="intro-content">
  8. <h2>Find your Home</h2>
  9. <ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
  10. <li class="nav-item">
  11. <a
  12. class="nav-link btn-white-border"
  13. id="buy-tab"
  14. data-toggle="pill"
  15. href="#buy"
  16. role="tab"
  17. aria-controls="buy"
  18. aria-selected="true"
  19. @click="SetSalesType('Sale')"
  20. >Buy</a
  21. >
  22. </li>
  23. <li class="nav-item">
  24. <a
  25. class="nav-link btn-white-border"
  26. id="rent-tab"
  27. data-toggle="pill"
  28. href="#rent"
  29. role="tab"
  30. aria-controls="rent"
  31. aria-selected="false"
  32. @click="SetSalesType('Rent')"
  33. >Rent</a
  34. >
  35. </li>
  36. </ul>
  37. <div class="tab-content" id="pills-tabContent">
  38. <div
  39. class="tab-pane fade show active"
  40. id="start"
  41. role="tabpanel"
  42. aria-labelledby="start-tab"
  43. >
  44. <p></p>
  45. </div>
  46. <div class="tab-pane fade show" id="buy" role="tabpanel" aria-labelledby="buy-tab">
  47. <h4>PROPERTIES FOR SALE</h4>
  48. <div class="row">
  49. <div align="left" class="form-group col-md-12">
  50. <autoComplete
  51. align="left"
  52. class="col-md-11 offset-1"
  53. :items="suburbList"
  54. @selection="SelectedFilter"
  55. style="width:100%; margin-left:-15px"
  56. />
  57. </div>
  58. <!-- <div class="form-group col-md-6">
  59. <input
  60. data-toggle="dropdown"
  61. name="region"
  62. class="form-control my-2"
  63. id="name"
  64. placeholder="Region"
  65. aria-haspopup="true"
  66. aria-expanded="false"
  67. />
  68. <input
  69. data-toggle="dropdown"
  70. name="town"
  71. class="form-control my-2"
  72. id="name"
  73. placeholder="Town"
  74. aria-haspopup="true"
  75. aria-expanded="false"
  76. />
  77. </div>
  78. <div class="form-group col-md-6">
  79. <input
  80. data-toggle="dropdown"
  81. name="suburb"
  82. class="form-control my-2"
  83. id="name"
  84. placeholder="Suburb"
  85. aria-haspopup="true"
  86. aria-expanded="false"
  87. />
  88. <input
  89. data-toggle="dropdown"
  90. name="type"
  91. class="form-control my-2"
  92. id="name"
  93. placeholder="Property Type"
  94. aria-haspopup="true"
  95. aria-expanded="false"
  96. /> -->
  97. <!-- </div> -->
  98. </div>
  99. <a v-on:click="SearchClick" class="btn-solid-blue"
  100. ><i class="fa fa-search"></i> SEARCH</a
  101. >
  102. </div>
  103. <div class="tab-pane fade" id="rent" role="tabpanel" aria-labelledby="rent-tab">
  104. <h4>RENTAL PROPERTIES</h4>
  105. <div class="row">
  106. <div align="left" class="form-group col">
  107. <autoComplete
  108. align="left"
  109. class="col-md-11 offset-1"
  110. :items="suburbList"
  111. @selection="SelectedFilter"
  112. style="width:100%; margin-left:-15px"
  113. />
  114. </div>
  115. <!-- <div class="form-group col-md-6">
  116. <input
  117. data-toggle="dropdown"
  118. name="region"
  119. class="form-control my-2"
  120. id="name"
  121. placeholder="Region"
  122. aria-haspopup="true"
  123. aria-expanded="false"
  124. />
  125. <input
  126. data-toggle="dropdown"
  127. name="town"
  128. class="form-control my-2"
  129. id="name"
  130. placeholder="Town"
  131. aria-haspopup="true"
  132. aria-expanded="false"
  133. />
  134. </div>
  135. <div class="form-group col-md-6">
  136. <input
  137. data-toggle="dropdown"
  138. name="suburb"
  139. class="form-control my-2"
  140. id="name"
  141. placeholder="Suburb"
  142. aria-haspopup="true"
  143. aria-expanded="false"
  144. />
  145. <input
  146. data-toggle="dropdown"
  147. name="type"
  148. class="form-control my-2"
  149. id="name"
  150. placeholder="Property Type"
  151. aria-haspopup="true"
  152. aria-expanded="false"
  153. />
  154. </div> -->
  155. </div>
  156. <a v-on:click="SearchClick" class="btn-solid-blue"
  157. ><i class="fa fa-search"></i> FIND</a
  158. >
  159. </div>
  160. </div>
  161. </div>
  162. </div>
  163. </div>
  164. </div>
  165. <carousel
  166. :nav="false"
  167. :dots="false"
  168. :items="1"
  169. :autoplay="true"
  170. :loop="true"
  171. id="intro-carousel"
  172. style="margin-top:-50px"
  173. :responsive="{ 0: { items: 1, nav: false }, 600: { items: 1, nav: false } }"
  174. >
  175. <img
  176. class="item"
  177. src="img/intro-carousel/residential-1.jpg"
  178. style="object-fit: cover"
  179. alt=""
  180. />
  181. <img
  182. class="item"
  183. src="img/intro-carousel/residential-2.jpg"
  184. style="object-fit: cover"
  185. alt=""
  186. />
  187. <img
  188. class="item"
  189. src="img/intro-carousel/residential-3.jpg"
  190. style="object-fit: cover"
  191. alt=""
  192. />
  193. <img
  194. class="item"
  195. src="img/intro-carousel/residential-4.jpg"
  196. style="object-fit: cover"
  197. alt=""
  198. />
  199. <img
  200. class="item"
  201. src="img/intro-carousel/residential-5.jpg"
  202. style="object-fit: cover"
  203. alt=""
  204. />
  205. <img
  206. class="item"
  207. src="img/intro-carousel/residential-6.jpg"
  208. style="object-fit: cover"
  209. alt=""
  210. />
  211. </carousel>
  212. </section>
  213. <main id="main" style="margin-top:-20px">
  214. <div class="container-fluid">
  215. <div class="row">
  216. <div
  217. ref="searchRes"
  218. :class="{ 'searchRes--clicked': clicked }"
  219. class="col-sm-12 searchRes"
  220. >
  221. <searchResult
  222. :class="{ 'searchComponent--clicked ': clicked }"
  223. class="searchComponent"
  224. />
  225. </div>
  226. </div>
  227. </div>
  228. </main>
  229. </div>
  230. </template>
  231. <script>
  232. /* eslint-disable */
  233. import { mapState, mapActions } from "vuex";
  234. import autoComplete from "../../shared/autoComplete";
  235. import carousel from "vue-owl-carousel";
  236. import searchResult from "../propertySearchResults";
  237. export default {
  238. components: {
  239. carousel,
  240. autoComplete,
  241. searchResult
  242. },
  243. data() {
  244. return {
  245. propertyUsageType: "Residential",
  246. salesType: "Sale",
  247. searchText: "",
  248. clicked: false
  249. };
  250. },
  251. computed: {
  252. ...mapState("propertySearch", ["suburbs", "suburbList", "propertySearch"])
  253. },
  254. methods: {
  255. ...mapActions("propertySearch", ["getSuburbs", "applyFilter"]),
  256. SetSalesType(value) {
  257. this.salesType = value;
  258. },
  259. SearchClick() {
  260. const item = this.suburbs.find(s => s.display === this.searchText);
  261. this.propertySearch.province = item.province;
  262. this.propertySearch.city = item.city;
  263. this.propertySearch.suburb = item.suburb;
  264. this.propertySearch.propertyUsageType = this.propertyUsageType;
  265. this.propertySearch.salesType = this.salesType;
  266. //this.clicked = true;
  267. this.$router.push("/property/residential/searchResult");
  268. },
  269. SelectedFilter(item) {
  270. this.searchText = item;
  271. }
  272. },
  273. mounted() {
  274. this.getSuburbs();
  275. }
  276. };
  277. </script>
  278. <style lang="scss" scoped>
  279. .searchRes {
  280. will-change: transform;
  281. transition: height 500ms;
  282. height: 0px;
  283. }
  284. .searchRes--clicked {
  285. height: 75vh;
  286. }
  287. @media only screen and (max-width: 575px) {
  288. .searchRes--clicked {
  289. height: 100vh;
  290. }
  291. }
  292. @media only screen and (min-width: 576px) {
  293. .searchRes--clicked {
  294. height: 60vh;
  295. }
  296. }
  297. @media only screen and (min-width: 768px) {
  298. .searchRes--clicked {
  299. height: 75vh;
  300. }
  301. }
  302. @media only screen and (min-width: 992px) {
  303. .searchRes--clicked {
  304. height: 60vh;
  305. }
  306. }
  307. @media only screen and (min-width: 1200px) {
  308. .searchRes--clicked {
  309. height: 70vh;
  310. }
  311. }
  312. .searchComponent {
  313. will-change: transform;
  314. transition: opacity 0.2s ease-in-out;
  315. transition-delay: 0.5s;
  316. margin-bottom: 80px;
  317. position: absolute;
  318. width: 100%;
  319. left: 0;
  320. opacity: 0;
  321. }
  322. .searchComponent--clicked {
  323. opacity: 1;
  324. }
  325. </style>