Skip to content

Commit c9a2c93

Browse files
authored
Merge pull request #91 from Jorgeural/feat/88
Feat/88
2 parents c5c03fd + 28f0f9d commit c9a2c93

File tree

8 files changed

+2011
-1947
lines changed

8 files changed

+2011
-1947
lines changed

src/assets/style/base/base.styl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,14 @@ html
1313

1414
body
1515
box-sizing: border-box;
16+
17+
&::-webkit-scrollbar
18+
width: 10px;
19+
20+
&::-webkit-scrollbar-track
21+
background: rgba(0, 0, 0, 0.2)
22+
23+
&::-webkit-scrollbar-thumb
24+
border-radius: 10px
25+
background: rgba(0, 0, 0, 0.5)
26+
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<template>
2+
<div
3+
v-show="!cookiesConsent"
4+
class="cookie-consent">
5+
<div class="cookie-consent__text-box">
6+
<span>This website uses cookies to ensure you get the best experience on our website.
7+
<a
8+
class="cookie-consent__link"
9+
href="https://cookiesandyou.com/"
10+
target="_blank">Learn More
11+
</a>
12+
</span>
13+
</div>
14+
<div class="cookie-consent__btn-box">
15+
<button
16+
class="cookie-consent__btn"
17+
@click="consentCookies()">Got It
18+
</button>
19+
</div>
20+
</div>
21+
</template>
22+
23+
<script>
24+
export default {
25+
data() {
26+
return {
27+
cookiesConsent: true
28+
};
29+
},
30+
created () {
31+
// Este if previene que se ejecute en server render para poder tener acceso al objeto window del browser
32+
if (process.browser) {
33+
this.checkLogalStorage()
34+
}
35+
},
36+
methods: {
37+
consentCookies() {
38+
localStorage.setItem("cookiesConsent", true);
39+
this.checkLogalStorage()
40+
},
41+
checkLogalStorage() {
42+
this.cookiesConsent = localStorage.cookiesConsent ? true : false
43+
}
44+
}
45+
};
46+
</script>
47+
48+
<style lang="stylus" scoped>
49+
.cookie-consent
50+
position: fixed;
51+
width: 100%;
52+
height: 10%;
53+
top: 90%;
54+
color: #fff;
55+
background-color: #003ea5;
56+
z-index: 90;
57+
display: flex;
58+
align-items: center;
59+
justify-content: space-around;
60+
61+
&__link
62+
text-decoration none
63+
color #fff
64+
font-weight 600
65+
66+
&:hover
67+
text-decoration underline
68+
69+
&__btn
70+
padding: 10px 25px
71+
font-size 16px
72+
border: 1px solid #fff
73+
transition all 0.5s
74+
75+
&:hover
76+
cursor pointer
77+
</style>

src/components/HomeGuilds/HomeGuildsCard.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99

1010
<v-card-title primary-title>
1111
<div>
12-
<h3 class="headline mb-0">{{ title }}</h3>
12+
<h3 class="headline mb-0 text-sm-center">{{ title }}</h3>
13+
<hr class="mb-2">
1314
<div> {{ description }}</div>
1415
</div>
1516
</v-card-title>
@@ -55,6 +56,7 @@ export default {
5556

5657

5758
<style lang="stylus" scoped>
59+
5860
.guilds-card
5961
height 95%
6062
background-color rgba(#fff, 0.75)
@@ -68,5 +70,6 @@ export default {
6870
6971
&__img
7072
min-height 200px
73+
box-shadow 0px 5px 15px rgba(0,0,0, .25)
7174
7275
</style>

src/components/HomeTeam/HomeTeamCard.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111
<a
1212
v-if="github"
1313
:href="github"
14+
title="github"
1415
target="_blank"> <i class="fab fa-github team-card__icon" /></a>
1516
<a
1617
v-if="twitter"
1718
:href="twitter"
19+
title="twitter"
1820
target="_blank"><i class="fab fa-twitter team-card__icon" /></a>
1921
</div>
2022
</div>

src/layouts/default.vue

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<template>
22
<v-app id="app">
3+
<cookie-consent />
34
<v-navigation-drawer
45
:clipped="clipped"
56
v-model="drawer"
@@ -73,11 +74,13 @@
7374
<script>
7475
import HomeHeader from "~/components/HomeHeader/Index.vue";
7576
import HomeFooter from "~/components/HomeFooter/Index.vue";
77+
import CookieConsent from "~/components/CookieConsent/Index.vue";
7678
7779
export default {
7880
components: {
7981
HomeHeader,
80-
HomeFooter
82+
HomeFooter,
83+
CookieConsent
8184
},
8285
data() {
8386
return {
@@ -97,32 +100,8 @@ export default {
97100
}
98101
},
99102
created() {
100-
this.cookies();
101103
},
102104
methods: {
103-
cookies() {
104-
// Este if previene que se ejecute en server render para poder tener acceso al objeto window del browser
105-
if (process.browser) {
106-
window.cookieconsent.initialise({
107-
container: document.getElementById("app"),
108-
palette: {
109-
popup: { background: "#003ea5" },
110-
button: { background: "transparent", border: "#fff", text: "#fff", padding: '5px 40px' }
111-
},
112-
revokable: true,
113-
onStatusChange: function(status) {
114-
console.log(
115-
this.hasConsented() ? "enable cookies" : "disable cookies"
116-
);
117-
},
118-
law: {
119-
regionalLaw: false
120-
},
121-
location: true
122-
});
123-
}
124-
125-
}
126105
}
127106
};
128107
</script>

src/nuxt.config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@ module.exports = {
1717
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
1818
{ rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons' },
1919
{ rel: 'stylesheet', href: "https://use.fontawesome.com/releases/v5.4.1/css/all.css", integrity: "sha384-5sAR7xN1Nv6T6+dT2mhtzEpVJvfS3NScPQTrOxhwjIuvcA67KV2R5Jz6kr4abQsz", crossorigin: "anonymous" },
20-
{ rel: 'stylesheet', href: "https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.css" }
2120
],
2221
script: [
23-
{ src: 'https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.js', async: true }
2422
]
2523
},
2624

0 commit comments

Comments
 (0)