Skip to content

Commit

Permalink
bind imgSrc to .container for bg overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
lovincyrus committed Mar 23, 2020
1 parent 7b8c784 commit 239f053
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 14 deletions.
Binary file added public/goz.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion src/GozCard/GozCard.stories.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import GozCard from "./GozCard"
import { text } from '@storybook/addon-knobs';

export default {
title: "GozCard",
Expand All @@ -7,7 +8,12 @@ export default {

export const normal = () => ({
components: { GozCard },
props: {
imgSrc: {
default: text("Image URL", "/goz.jpg")
},
},
template: `
<goz-card/>
<goz-card v-bind="{ imgSrc }" />
`
})
12 changes: 7 additions & 5 deletions src/GozCard/GozCard.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<div class="wrapper">
<div class="container">
<div class="container" v-bind:style="{'background': `linear-gradient(180deg, rgba(14, 14, 86, 0.9) 0%, rgba(25, 52, 167, 0.9) 100%), url(${imgSrc})`, 'background-size': 'cover', 'background-repeat': 'no-repeat', 'background-position': 'center center'}">
<div class="h1">Join the discussion</div>
<div class="p">Get involved in the Game of Zones chat room.</div>
<div class="footer">
Expand All @@ -26,10 +26,6 @@
font-family: var(--ds-font-family, sans-serif);
padding: 4rem 1rem;
box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.05), 0px 2px 6px rgba(0, 0, 0, 0.05), 0px 1px 0px rgba(0, 0, 0, 0.05);
background: linear-gradient(180deg, rgba(14, 14, 86, 0.9) 0%, rgba(25, 52, 167, 0.9) 100%), url("https://cosmos.network/img/section-gameofzones.bc705fc3.jpg");
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
border-radius: 0.75rem;
max-width: 75rem;
margin-left: auto;
Expand Down Expand Up @@ -100,6 +96,12 @@ export default {
components: {
IconArrowRight,
"text-button": Button
},
props: {
imgSrc: {
type: String,
default: "/goz.jpg"
}
}
}
</script>
8 changes: 7 additions & 1 deletion src/GozNewsletterSignup/GozNewsletterSignup.stories.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import GozNewsletterSignup from "./GozNewsletterSignup"
import { text } from '@storybook/addon-knobs';

export default {
title: "GozNewsletterSignup",
Expand All @@ -7,7 +8,12 @@ export default {

export const normal = () => ({
components: { GozNewsletterSignup },
props: {
imgSrc: {
default: text("Image URL", "/pattern.png")
},
},
template: `
<goz-newsletter-signup/>
<goz-newsletter-signup v-bind="{ imgSrc }" />
`
})
12 changes: 7 additions & 5 deletions src/GozNewsletterSignup/GozNewsletterSignup.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<div class="wrapper">
<div class="container">
<div class="container" v-bind:style="{'background': `linear-gradient(180deg, rgba(14, 14, 86, 0.9) 0%, rgba(25, 52, 167, 0.9) 100%), url(${imgSrc})`, 'background-size': 'cover', 'background-repeat': 'no-repeat', 'background-position': 'center center'}">
<div class="section">
<transition name="fade" mode="out-in">
<div v-if="state === 'success'" key="success">
Expand Down Expand Up @@ -83,10 +83,6 @@
font-family: var(--ds-font-family, sans-serif);
padding: 4rem 1rem;
box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.05), 0px 2px 6px rgba(0, 0, 0, 0.05), 0px 1px 0px rgba(0, 0, 0, 0.05);
background: linear-gradient(180deg, rgba(14, 14, 86, 0.9) 0%, rgba(25, 52, 167, 0.9) 100%), url("https://cosmos.network/img/section-gameofzones.bc705fc3.jpg");
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
border-radius: .75rem;
max-width: 75rem;
margin-left: auto;
Expand Down Expand Up @@ -281,6 +277,12 @@ export default {
IconSpinner,
"text-button": Button
},
props: {
imgSrc: {
type: String,
default: "/goz.jpg"
}
},
data: function() {
return {
email: null,
Expand Down
10 changes: 8 additions & 2 deletions src/GozPage/GozPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</template>
</goz-section>
<goz-milestones class="card__narrow"/>
<goz-newsletter-signup class="card"/>
<goz-newsletter-signup class="card" v-bind="{ imgSrc }" />
<goz-section>
<template v-slot:icon>
<icon-cup/>
Expand Down Expand Up @@ -66,7 +66,7 @@
An example of a server side IBC relayer to be used for Game of Zones and beyond.
</template>
</goz-row>
<goz-card class="card"/>
<goz-card class="card" v-bind="{ imgSrc }" />
</div>
</div>
</template>
Expand Down Expand Up @@ -113,6 +113,12 @@ export default {
IconCalendar,
IconCup,
IconIbc
},
props: {
imgSrc: {
type: String,
default: "/goz.jpg"
}
}
}
</script>

0 comments on commit 239f053

Please sign in to comment.