-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from adidas/feature/forms
Forms: fixes and example page
- Loading branch information
Showing
53 changed files
with
3,324 additions
and
1,177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
dist | ||
docs | ||
node_modules | ||
test/results | ||
|
||
# Untracked application files and directories: | ||
.nuxt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<template> | ||
<ul class="nav nav-pills"> | ||
<li class="nav-tab" | ||
v-for="{ id, to, active } in tabs" | ||
:key="id" | ||
:class="{ active: active }"> | ||
<nuxt-link class="nav-link" :to="to"> | ||
{{ $t(`tabs.${ id }`) }} | ||
</nuxt-link> | ||
</li> | ||
</ul> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'nav-tabs', | ||
props: [ 'tabs' ] | ||
}; | ||
</script> | ||
|
||
<style lang="less"> | ||
.nav.nav-pills { | ||
margin-bottom: 0; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<template> | ||
<div class="jumbotron"> | ||
<div class="row"> | ||
<div class="col-xs-12 col-sm-8 col-sm-offset-2"> | ||
<slot></slot> | ||
</div> | ||
</div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<template> | ||
<div class="container"> | ||
<page-title> | ||
<slot name="header"></slot> | ||
</page-title> | ||
<div class="row"> | ||
<div class="col-xs-12 col-sm-8 col-sm-offset-2"> | ||
<markdown-renderer type="url" :src="src"/> | ||
</div> | ||
</div> | ||
<slot name="content"></slot> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import MarkdownRenderer from '~/components/markdown/renderer'; | ||
export default { | ||
props: [ 'src' ], | ||
components: { | ||
MarkdownRenderer | ||
} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<template> | ||
<div class="container"> | ||
<div class="row"> | ||
<nav-tabs class="col-xs-12" :tabs="tabs"/> | ||
</div> | ||
<page-title> | ||
<slot name="header"></slot> | ||
</page-title> | ||
<slot name="content"></slot> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import NavTabs from '~/components/nav-tabs/default.vue'; | ||
import { getFormTabs } from '~/services/forms'; | ||
export default { | ||
props: [ 'page' ], | ||
computed: { | ||
tabs() { | ||
return getFormTabs(this.page); | ||
} | ||
}, | ||
components: { | ||
NavTabs | ||
} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<template> | ||
<tabs-container page="checkbox"> | ||
<template slot="header"> | ||
<p>{{ $t('views.components-forms.name') }}</p> | ||
<h2>{{ $t('views.components-form-checkbox.name') }}</h2> | ||
</template> | ||
<template slot="content"> | ||
<div class="container"> | ||
<section class="section row"> | ||
<form @submit.prevent> | ||
<div class="col-xs-12 col-sm-6"> | ||
<label class="control control--checkbox"> | ||
<input class="control__input" type="checkbox"/> | ||
<span class="control__indicator yarn-icon yarn-icon yarn-icon--checkbox"></span> | ||
<span class="control__label">{{ $t('common.unchecked') }}</span> | ||
</label> | ||
<label class="control control--checkbox"> | ||
<input class="control__input" type="checkbox" checked="checked"/> | ||
<div class="control__indicator yarn-icon yarn-icon yarn-icon--checkbox"></div> | ||
<span class="control__label">{{ $t('common.checked') }}</span> | ||
</label> | ||
</div> | ||
<div class="col-xs-12 col-sm-6"> | ||
<label class="control control--checkbox disabled"> | ||
<input class="control__input" type="checkbox" disabled="disabled"/> | ||
<span class="control__indicator yarn-icon yarn-icon yarn-icon--checkbox"></span> | ||
<span class="control__label">{{ $t('common.unchecked') }} ({{ $t('common.disabled') }})</span> | ||
</label> | ||
<label class="control control--checkbox disabled"> | ||
<input class="control__input" type="checkbox" disabled="disabled" checked="checked"/> | ||
<span class="control__indicator yarn-icon yarn-icon yarn-icon--checkbox"></span> | ||
<span class="control__label">{{ $t('common.checked') }} ({{ $t('common.disabled') }})</span> | ||
</label> | ||
</div> | ||
</form> | ||
</section> | ||
<section class="section row"> | ||
<form @submit.prevent> | ||
<div class="col-xs-12 row"> | ||
<div class="col-xs-12 col-sm-6"> | ||
<label class="control control--checkmark background-color--yellow-20"> | ||
<input class="control__input" type="checkbox"/> | ||
<span class="control__indicator control__indicator--checkmark"> | ||
<span class="yarn-icon yarn-icon--checkmark"></span> | ||
</span> | ||
<span class="control__label">{{ $t('common.unchecked') }}</span> | ||
</label> | ||
<label class="control control--checkmark background-color--orange-20"> | ||
<input class="control__input" type="checkbox" checked="checked"/> | ||
<span class="control__indicator control__indicator--checkmark"> | ||
<span class="yarn-icon yarn-icon--checkmark"></span> | ||
</span> | ||
<span class="control__label">{{ $t('common.checked') }}</span> | ||
</label> | ||
</div> | ||
<div class="col-xs-12 col-sm-6"> | ||
<label class="control control--checkmark disabled background-color--yellow-20"> | ||
<input class="control__input" type="checkbox" disabled="disabled"/> | ||
<span class="control__indicator control__indicator--checkmark"> | ||
<span class="yarn-icon yarn-icon--checkmark"></span> | ||
</span> | ||
<span class="control__label">{{ $t('common.unchecked') }} ({{ $t('common.disabled') }})</span> | ||
</label> | ||
<label class="control control--checkmark disabled background-color--orange-20"> | ||
<input class="control__input" type="checkbox" disabled="disabled" checked="checked"/> | ||
<span class="control__indicator control__indicator--checkmark"> | ||
<span class="yarn-icon yarn-icon--checkmark"></span> | ||
</span> | ||
<span class="control__label">{{ $t('common.checked') }} ({{ $t('common.disabled') }})</span> | ||
</label> | ||
</div> | ||
</div> | ||
</form> | ||
</section> | ||
</div> | ||
</template> | ||
</tabs-container> | ||
</template> |
Oops, something went wrong.