Blame view
src/components/outro.vue
10.6 KB
921970bb2
|
1 2 |
<template> <main class="landing-page"> |
c65b51996
|
3 |
<div class="container-fluid episode-intro"> |
2b91d45ce
|
4 |
<Header></Header> |
921970bb2
|
5 |
<!-- menu wrapper --> |
c65b51996
|
6 7 8 9 10 |
<div class="intro-startup"> <div class="thanks-wrapper"> <div class="thanks-l-wrp"> <div class="thanks-pay-wrp"> <!-- <img src="../assets/images/thanks.svg" class="thanks-img" /> --> |
d0186c77a
|
11 12 13 14 |
<img :src="currentSlideData.payload.metaData.authorImage[0]" class="thanks-img" /> |
c65b51996
|
15 16 17 18 |
<div class="blacktext-wrp"> CHeck out other case studies here <img src="../assets/images/arrow-bottom.svg" /> </div> |
d0186c77a
|
19 |
<ul class=""> |
6b14d08e4
|
20 |
<!-- <li v-for="(study, i) in caseStudies" :key="i"> |
f2328546d
|
21 |
<a href=""> |
c65b51996
|
22 23 |
<img :src="study.intro.logoURL" /> <span |
d0186c77a
|
24 |
><img src="../assets/images/p-eye.svg" /> 0 Views</span |
c65b51996
|
25 26 |
> </a> |
6b14d08e4
|
27 |
</li> --> |
d0186c77a
|
28 |
|
c65b51996
|
29 |
<!-- <li class="payments-spc-57"> |
f2328546d
|
30 |
<a href=""> |
c65b51996
|
31 32 33 34 35 36 37 |
<img src="../assets/images/g-pay.svg" /> <span ><img src="../assets/images/p-eye.svg" /> 19.4k Views</span > </a> </li> |
921970bb2
|
38 |
<li> |
f2328546d
|
39 |
<a href=""> |
c65b51996
|
40 41 42 43 44 45 46 47 48 49 50 |
<img src="../assets/images/bb.svg" /> <span ><img src="../assets/images/p-eye.svg" /> 19.4k Views</span > </a> </li> --> </ul> <!-- payments options --> <!-- <ul class=""> <li> |
f2328546d
|
51 |
<a href=""> |
c65b51996
|
52 53 54 55 56 57 58 59 |
<img src="../assets/images/payment.svg" /> <span ><img src="../assets/images/p-eye.svg" /> 19.4k Views</span > </a> </li> <li class="payments-spc-57"> |
f2328546d
|
60 |
<a href=""> |
c65b51996
|
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
<img src="../assets/images/uc.svg" /> <span ><img src="../assets/images/p-eye.svg" /> 19.4k Views</span > </a> </li> </ul> --> <!-- payments options --> </div> <!-- thanks pay wrp --> <img src="../assets/images/spot-light-bt.svg" class="payment-spot-light-bt" /> </div> <!-- thanks left wrp --> <div class="thanks-r-section"> <div class="logo-common-wrp"> |
f2328546d
|
80 |
<a href="" |
c65b51996
|
81 82 83 84 85 |
><img src="../assets/images/ps-growth.svg" /> <span>Product Growth</span> </a> </div> <!-- logo wrp --> |
921970bb2
|
86 |
<div class="clearfix"></div> |
c65b51996
|
87 88 89 90 91 |
<p> Don’t forget to <strong> join the discussion </strong> by scrolling back and adding your comments! </p> <div class="clearfix"></div> |
f2328546d
|
92 |
<a href="" class="back-bt" @click="goHome"> |
c65b51996
|
93 94 95 96 97 98 99 100 101 102 103 104 |
<span class="s1"></span> <span class="s2"></span> <span class="s3"></span> <span class="s4"></span> <img src="../assets/images/refresh.svg" /> Back to home </a> <ul class="rating-section"> <li> <p> Excited to <strong> create case studies</strong> or help build Product Growth? </p> |
f2328546d
|
105 |
<a href="" class="publish" @click="open()">Publish</a> |
c65b51996
|
106 107 108 109 |
</li> <li> <p class="wdth">How would you rate this case study?</p> <span class="rating-list"> |
d0186c77a
|
110 111 |
<star-rating @rating-selected ="updateRating" v-bind:star-size="30" v-model="rating" active-color="#514da6"> </star-rating> |
f2328546d
|
112 |
<!-- <a href="" |
c65b51996
|
113 114 |
><img src="../assets/images/f-review.svg" /></a> |
f2328546d
|
115 |
<a href="" |
c65b51996
|
116 117 |
><img src="../assets/images/f-review.svg" /></a> |
f2328546d
|
118 |
<a href="" |
c65b51996
|
119 |
><img src="../assets/images/e-review.svg" |
d0186c77a
|
120 |
/></a> --> |
c65b51996
|
121 122 123 124 125 126 127 |
</span> </li> </ul> <div class="follow-us-py"> <span>Follow us at</span> <ul class="p-follows"> <li> |
f2328546d
|
128 |
<a href=""> |
c65b51996
|
129 130 131 132 |
<img src="../assets/images/p-rss.svg" /> </a> </li> <li> |
f2328546d
|
133 |
<a href=""> |
c65b51996
|
134 135 136 137 |
<img src="../assets/images/p-linkedin.svg" /> </a> </li> <li> |
f2328546d
|
138 |
<a href=""> |
c65b51996
|
139 140 141 142 143 |
<img src="../assets/images/p-twitter.svg" /> </a> </li> </ul> </div> |
d0186c77a
|
144 |
<!-- <star-rating v-model="rating"></star-rating> --> |
c65b51996
|
145 146 147 |
<!-- follow us --> <div class="p-users"> <span>Author</span> |
d0186c77a
|
148 |
<h1>{{ currentSlideData.payload.metaData.authors[0] }}</h1> |
c65b51996
|
149 150 151 152 |
<!-- <span>Author</span> <h1>Pramod</h1> <span>Author</span> <h1>Sarthak</h1> --> |
d0186c77a
|
153 154 155 156 157 158 159 160 |
<span v-if="currentSlideData.payload.metaData.designer" >Designer</span > <h1>{{ currentSlideData.payload.metaData.designer }}</h1> <span v-if="currentSlideData.payload.metaData.illustrations" >Illustrations</span > <h1>{{ currentSlideData.payload.metaData.illustrations }}</h1> |
c65b51996
|
161 162 163 164 165 166 167 168 169 170 |
</div> <!-- users --> </div> <!-- thanks payment right section --> </div> <!--- thanks wrapper --> <div class="footer-nav"> <div class="footer-top"> <ul class="top-intro-bt ps_right"> <li> |
f2328546d
|
171 |
<a href="" @click="goBack" |
c65b51996
|
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
><img src="../assets/images/skip-prev.svg" /> Prev</a > </li> </ul> </div> <!-- footer top --> <div class="footer-bottom"> <ul> <li class="active"></li> <li class="active"></li> </ul> </div> <!-- footer top --> </div> <!-- footer --> </div> |
921970bb2
|
188 189 190 191 192 193 194 195 196 |
<!-- body wrapper --> </div> <!-- main wrapper --> </main> </template> <script> import Vue from "vue"; import router from "../router"; |
c65b51996
|
197 |
import axios from "axios"; |
2b91d45ce
|
198 |
import Header from "./Header"; |
921970bb2
|
199 200 |
export default { |
2b91d45ce
|
201 202 203 |
components: { Header: Header, }, |
921970bb2
|
204 205 206 |
name: "Outro", data() { |
c65b51996
|
207 208 209 210 211 |
return { caseStudies: [], allSlide: [], currentSlideIndex: null, currentSlideData: null, |
d0186c77a
|
212 |
rating: 0, |
c65b51996
|
213 214 215 216 217 218 219 220 221 222 |
}; }, mounted() { var allSlideData = localStorage.getItem( "spotlight_slide" + this.$route.params.caseStudyId ); if (allSlideData) { this.allSlide = JSON.parse(allSlideData); this.getCurrentSlideData(); this.getCaseStudies(); |
d0186c77a
|
223 |
this.getRating(); |
6b14d08e4
|
224 225 226 |
}else{ this.$router.push("/login"); |
c65b51996
|
227 |
} |
921970bb2
|
228 |
}, |
921970bb2
|
229 |
methods: { |
c65b51996
|
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 |
getCurrentSlideData() { var i = this.allSlide.findIndex( (slide_) => slide_.slideId == this.$route.params.slideId ); this.currentSlideIndex = i; this.currentSlideData = this.allSlide[i]; console.log("currentSlideData", this.currentSlideData); }, goNext() { this.currentSlideIndex++; this.$router.push({ name: this.allSlide[this.currentSlideIndex].ur, params: { caseStudyId: this.allSlide[this.currentSlideIndex].caseStudyId, slideId: this.allSlide[this.currentSlideIndex].slideId, }, }); }, goBack() { this.currentSlideIndex--; this.$router.push({ name: this.allSlide[this.currentSlideIndex].ur, params: { caseStudyId: this.allSlide[this.currentSlideIndex].caseStudyId, slideId: this.allSlide[this.currentSlideIndex].slideId, }, }); }, |
5c9c1581c
|
258 259 260 261 262 263 264 265 266 267 |
goHome() { this.currentSlideIndex--; this.$router.push({ name: this.allSlide[0].ur, params: { caseStudyId: this.allSlide[0].caseStudyId, slideId: this.allSlide[0].slideId, }, }); }, |
c65b51996
|
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 |
getCaseStudies() { var userdata = localStorage.getItem("spotlight_usertoken"); if (userdata) { userdata = JSON.parse(userdata); axios .get("/caseStudy/all", { headers: { Authorization: "Bearer " + userdata.token, }, }) .then((response) => { console.log(response.data.data.caseStudies); this.caseStudies = response.data.data.caseStudies; }) .catch((error) => console.log(error)); } }, |
d0186c77a
|
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
getRating() { var userdata = localStorage.getItem("spotlight_usertoken"); if (userdata) { userdata = JSON.parse(userdata); axios .get("/caseStudy/rating?caseStudyId="+this.$route.params.caseStudyId, { headers: { Authorization: "Bearer " + userdata.token, }, }) .then((response) => { this.rating = response.data.data.Avgrating; }) .catch((error) => console.log(error)); } }, |
f2328546d
|
303 304 305 |
open(){ window.open('https://www.productgrowth.org/spotlight#typeform-spotlight'); }, |
d0186c77a
|
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
updateRating() { var userdata = localStorage.getItem("spotlight_usertoken"); if (userdata) { userdata = JSON.parse(userdata); var obj = { "caseStudyId":this.$route.params.caseStudyId, "rating":this.rating } axios .post("/caseStudy/rating",obj, { headers: { Authorization: "Bearer " + userdata.token, }, }) .then((response) => { console.log("response",response) // this.rating = response.data.data.Avgrating; }) .catch((error) => console.log(error)); } }, |
921970bb2
|
327 |
goToLogin() { |
56f4b7548
|
328 |
this.$router.push("/login"); |
921970bb2
|
329 330 |
}, goToSignUp() { |
56f4b7548
|
331 |
this.$router.push("/"); |
921970bb2
|
332 |
}, |
c65b51996
|
333 334 335 |
goToProfile() { this.$router.push("/profile"); }, |
921970bb2
|
336 337 338 |
}, }; </script> |
d0186c77a
|
339 340 341 342 343 344 |
<style> .vue-star-rating-rating-text[data-v-fde73a0c] { margin-left: 7px; display: none; } </style> |