Skip to content

Commit 60bc217

Browse files
committed
Merge branch 'new-website' of github.com:OSWeekends/osweekends.github.io into new-website
2 parents 2f30e92 + d18f2b8 commit 60bc217

File tree

6 files changed

+2066
-2078
lines changed

6 files changed

+2066
-2078
lines changed

package-lock.json

Lines changed: 1 addition & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/HomeGuilds.1/Index.vue

Lines changed: 0 additions & 82 deletions
This file was deleted.

src/components/HomeGuilds.2/Index.vue

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
<template>
2+
<v-container class="home-guilds">
3+
<v-layout
4+
row
5+
wrap
6+
class="home-guilds__title-row text-xs-center text-md-left">
7+
<v-flex
8+
sm12
9+
md1
10+
class="home-guilds__icon-wrapper" >
11+
<i class="home-guilds__icon material-icons"> group </i>
12+
</v-flex>
13+
<v-flex
14+
sm12
15+
md11
16+
class="home-guilds__title-wrapper ">
17+
<h2 class="home-guilds__title">Guilds</h2>
18+
<h3 class="home-guilds__subtitle">Equipos de trabajo de la comunidad: </h3>
19+
</v-flex>
20+
</v-layout>
21+
<v-carousel
22+
light
23+
hide-delimiters
24+
class="carousel">
25+
<v-carousel-item
26+
v-for="(guild, index) in allGuilds"
27+
:key="index">
28+
<v-layout
29+
row
30+
wrap>
31+
<v-flex
32+
sm12
33+
md4>
34+
<home-guilds-card
35+
:title="guild.name"
36+
:description="guild.description"
37+
:img="guild.avatar"
38+
:github="guild.github"
39+
class="home-guilds__card" />
40+
</v-flex>
41+
<v-flex
42+
v-if="index + 1 < allGuilds.length"
43+
sm12
44+
md4
45+
class="search_and_share">
46+
<home-guilds-card
47+
:title="allGuilds[index + 1].name"
48+
:description="allGuilds[index + 1].description"
49+
:img="allGuilds[index + 1].avatar"
50+
:github="allGuilds[index + 1].github"
51+
class="home-guilds__card" />
52+
</v-flex>
53+
<v-flex
54+
v-if="index + 2 < allGuilds.length"
55+
sm12
56+
md4
57+
class="search_and_share">
58+
<home-guilds-card
59+
:title="allGuilds[index + 2].name"
60+
:description="allGuilds[index + 2].description"
61+
:img="allGuilds[index + 2].avatar"
62+
:github="allGuilds[index + 2].github"
63+
class="home-guilds__card" />
64+
</v-flex>
65+
</v-layout>
66+
</v-carousel-item>
67+
</v-carousel>
68+
</v-container>
69+
</template>
70+
71+
72+
<script>
73+
import HomeGuildsCard from '~/components/HomeGuilds/HomeGuildsCard.vue'
74+
import { mapGetters } from 'vuex'
75+
76+
77+
export default {
78+
components: {
79+
HomeGuildsCard
80+
},
81+
data () {
82+
83+
return {
84+
}
85+
},
86+
computed: {
87+
...mapGetters( [ 'allGuilds' ] ),
88+
}
89+
}
90+
</script>
91+
92+
<style lang="stylus" scoped>
93+
94+
@media handheld, only screen and (max-width: 768px)
95+
.search_and_share
96+
display:none
97+
98+
.home-guilds
99+
&__title-row
100+
padding-left 20px
101+
margin-bottom 40px
102+
color #f7f7f7
103+
104+
&__icon-wrapper
105+
display flex
106+
align-items center
107+
justify-content center
108+
109+
&__icon
110+
font-size 72px
111+
112+
&__title-wrapper
113+
padding 0 15px
114+
115+
&__title
116+
font-size 40px
117+
118+
.carousel
119+
box-shadow none
120+
121+
</style>

src/components/HomeGuilds/Index.vue

Lines changed: 31 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -18,53 +18,22 @@
1818
<h3 class="home-guilds__subtitle">Equipos de trabajo de la comunidad: </h3>
1919
</v-flex>
2020
</v-layout>
21-
<v-carousel
22-
light
23-
hide-delimiters
24-
class="carousel">
25-
<v-carousel-item
26-
v-for="(guild, index) in allGuilds"
27-
:key="index">
28-
<v-layout
29-
row
30-
wrap>
31-
<v-flex
32-
sm12
33-
md4>
34-
<home-guilds-card
35-
:title="guild.name"
36-
:description="guild.description"
37-
:img="guild.avatar"
38-
:github="guild.github"
39-
class="home-guilds__card" />
40-
</v-flex>
41-
<v-flex
42-
v-if="index + 1 < allGuilds.length"
43-
sm12
44-
md4
45-
class="search_and_share">
46-
<home-guilds-card
47-
:title="allGuilds[index + 1].name"
48-
:description="allGuilds[index + 1].description"
49-
:img="allGuilds[index + 1].avatar"
50-
:github="allGuilds[index + 1].github"
51-
class="home-guilds__card" />
52-
</v-flex>
53-
<v-flex
54-
v-if="index + 2 < allGuilds.length"
55-
sm12
56-
md4
57-
class="search_and_share">
58-
<home-guilds-card
59-
:title="allGuilds[index + 2].name"
60-
:description="allGuilds[index + 2].description"
61-
:img="allGuilds[index + 2].avatar"
62-
:github="allGuilds[index + 2].github"
63-
class="home-guilds__card" />
64-
</v-flex>
65-
</v-layout>
66-
</v-carousel-item>
67-
</v-carousel>
21+
<v-layout
22+
row
23+
wrap>
24+
<v-flex
25+
v-for="(guild, index) in getGuilds"
26+
:key="index"
27+
sm12
28+
md4>
29+
<home-guilds-card
30+
:title="guild.name"
31+
:description="guild.description"
32+
:img="guild.avatar"
33+
:github="guild.github"
34+
class="home-guilds__card" />
35+
</v-flex>
36+
</v-layout>
6837
</v-container>
6938
</template>
7039

@@ -79,22 +48,30 @@ import { mapGetters } from 'vuex'
7948
HomeGuildsCard
8049
},
8150
data () {
82-
8351
return {
52+
8453
}
8554
},
8655
computed: {
8756
...mapGetters( [ 'allGuilds' ] ),
88-
}
57+
58+
getGuilds(){
59+
let guilds= []
60+
61+
for(let x=0; x<= 2;x++){
62+
let i = Math.random() * (0 - (this.allGuilds.length -1))
63+
i = Math.round(i)
64+
i = Math.abs(i)
65+
guilds.push(this.allGuilds[i])
66+
}
67+
return guilds
68+
}
69+
},
8970
}
71+
9072
</script>
9173

9274
<style lang="stylus" scoped>
93-
94-
@media handheld, only screen and (max-width: 768px)
95-
.search_and_share
96-
display:none
97-
9875
.home-guilds
9976
&__title-row
10077
padding-left 20px
@@ -115,7 +92,4 @@ import { mapGetters } from 'vuex'
11592
&__title
11693
font-size 40px
11794
118-
.carousel
119-
box-shadow none
120-
12195
</style>

0 commit comments

Comments
 (0)