mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
replace CardWithColumns with new and improved BaseCard
This commit is contained in:
parent
3c8c9d51e1
commit
60818c5902
@ -40,7 +40,9 @@
|
|||||||
<nuxt-link to="/registration/signup">{{ $t('login.register') }}</nuxt-link>
|
<nuxt-link to="/registration/signup">{{ $t('login.register') }}</nuxt-link>
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
<locale-switch offset="5" />
|
<template v-slot:topMenu>
|
||||||
|
<locale-switch offset="5" />
|
||||||
|
</template>
|
||||||
</base-card>
|
</base-card>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
@ -85,16 +87,6 @@ export default {
|
|||||||
width: 80vw;
|
width: 80vw;
|
||||||
max-width: 620px;
|
max-width: 620px;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
|
||||||
|
|
||||||
.login-form > .base-card {
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.v-popover {
|
|
||||||
position: absolute;
|
|
||||||
top: $space-small;
|
|
||||||
left: $space-small;
|
|
||||||
}
|
|
||||||
|
|
||||||
.base-button {
|
.base-button {
|
||||||
display: block;
|
display: block;
|
||||||
|
|||||||
@ -41,6 +41,22 @@ storiesOf('Generic/BaseCard', module)
|
|||||||
`,
|
`,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
.add('with slot: topMenu', () => ({
|
||||||
|
components: { BaseCard },
|
||||||
|
template: `
|
||||||
|
<base-card style="width: 600px;">
|
||||||
|
<template v-slot:imageColumn>
|
||||||
|
<img class="image" src="/img/sign-up/humanconnection.svg" />
|
||||||
|
</template>
|
||||||
|
<h2 class="title">I am a card heading</h2>
|
||||||
|
<p>And I am a paragraph.</p>
|
||||||
|
<template v-slot:topMenu>
|
||||||
|
<base-button size="small">Menu</base-button>
|
||||||
|
</template>
|
||||||
|
</base-card>
|
||||||
|
`,
|
||||||
|
}))
|
||||||
|
|
||||||
.add('with highlight prop', () => ({
|
.add('with highlight prop', () => ({
|
||||||
components: { BaseCard },
|
components: { BaseCard },
|
||||||
template: `
|
template: `
|
||||||
|
|||||||
@ -17,6 +17,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<slot v-else />
|
<slot v-else />
|
||||||
|
<aside v-if="$slots.topMenu" class="top-menu">
|
||||||
|
<slot name="topMenu" />
|
||||||
|
</aside>
|
||||||
</article>
|
</article>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -48,6 +51,7 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.base-card {
|
.base-card {
|
||||||
|
position: relative;
|
||||||
padding: $space-base;
|
padding: $space-base;
|
||||||
border-radius: $border-radius-x-large;
|
border-radius: $border-radius-x-large;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@ -107,5 +111,11 @@ export default {
|
|||||||
> .content-column {
|
> .content-column {
|
||||||
flex-basis: 50%;
|
flex-basis: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
> .top-menu {
|
||||||
|
position: absolute;
|
||||||
|
top: $space-small;
|
||||||
|
left: $space-small;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1,21 +0,0 @@
|
|||||||
import { storiesOf } from '@storybook/vue'
|
|
||||||
import helpers from '~/storybook/helpers'
|
|
||||||
import CardWithColumns from './CardWithColumns.vue'
|
|
||||||
|
|
||||||
storiesOf('Generic/CardWithColumns', module)
|
|
||||||
.addDecorator(helpers.layout)
|
|
||||||
|
|
||||||
.add('default', () => ({
|
|
||||||
components: { CardWithColumns },
|
|
||||||
template: `
|
|
||||||
<card-with-columns>
|
|
||||||
<template v-slot:left>
|
|
||||||
<img src="/img/sign-up/humanconnection.svg" style="width: 80%; margin: auto;" />
|
|
||||||
</template>
|
|
||||||
<template v-slot:right>
|
|
||||||
<h2 style="margin-bottom: 12px">I am in the right column</h2>
|
|
||||||
<p>And so is this paragraph.</p>
|
|
||||||
</template>
|
|
||||||
</card-with-columns>
|
|
||||||
`,
|
|
||||||
}))
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
<template>
|
|
||||||
<base-card class="card-with-columns">
|
|
||||||
<section class="column --left">
|
|
||||||
<slot name="left" />
|
|
||||||
</section>
|
|
||||||
<section class="column --right">
|
|
||||||
<slot name="right" />
|
|
||||||
</section>
|
|
||||||
</base-card>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.card-with-columns {
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
> .column {
|
|
||||||
flex-basis: 50%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@ -1,24 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<ds-container width="small" class="password-reset">
|
<ds-container width="small" class="password-reset">
|
||||||
<card-with-columns>
|
<base-card>
|
||||||
<template v-slot:left>
|
<template v-slot:imageColumn>
|
||||||
<locale-switch offset="5" />
|
|
||||||
<img alt="Human Connection" src="/icon.png" class="image" />
|
<img alt="Human Connection" src="/icon.png" class="image" />
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:right>
|
<nuxt-child />
|
||||||
<nuxt-child />
|
<template v-slot:topMenu>
|
||||||
|
<locale-switch offset="5" />
|
||||||
</template>
|
</template>
|
||||||
</card-with-columns>
|
</base-card>
|
||||||
</ds-container>
|
</ds-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CardWithColumns from '~/components/_new/generic/CardWithColumns/CardWithColumns'
|
|
||||||
import LocaleSwitch from '~/components/LocaleSwitch/LocaleSwitch'
|
import LocaleSwitch from '~/components/LocaleSwitch/LocaleSwitch'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
CardWithColumns,
|
|
||||||
LocaleSwitch,
|
LocaleSwitch,
|
||||||
},
|
},
|
||||||
layout: 'no-header',
|
layout: 'no-header',
|
||||||
@ -29,17 +27,3 @@ export default {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
|
||||||
.password-reset {
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.v-popover {
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
|
|
||||||
.image {
|
|
||||||
width: 70%;
|
|
||||||
margin: auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
@ -1,24 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<ds-container width="medium">
|
<ds-container width="medium">
|
||||||
<card-with-columns>
|
<base-card>
|
||||||
<template v-slot:left>
|
<template v-slot:imageColumn>
|
||||||
|
<img alt="Human Connection" src="/img/sign-up/nicetomeetyou.svg" />
|
||||||
|
</template>
|
||||||
|
<nuxt-child />
|
||||||
|
<template v-slot:topMenu>
|
||||||
<locale-switch offset="5" />
|
<locale-switch offset="5" />
|
||||||
<img class="signup-image" alt="Human Connection" src="/img/sign-up/nicetomeetyou.svg" />
|
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:right>
|
</base-card>
|
||||||
<nuxt-child />
|
|
||||||
</template>
|
|
||||||
</card-with-columns>
|
|
||||||
</ds-container>
|
</ds-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CardWithColumns from '~/components/_new/generic/CardWithColumns/CardWithColumns'
|
|
||||||
import LocaleSwitch from '~/components/LocaleSwitch/LocaleSwitch'
|
import LocaleSwitch from '~/components/LocaleSwitch/LocaleSwitch'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
CardWithColumns,
|
|
||||||
LocaleSwitch,
|
LocaleSwitch,
|
||||||
},
|
},
|
||||||
layout: 'no-header',
|
layout: 'no-header',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user