diff options
Diffstat (limited to '')
| -rw-r--r-- | doc/docs/.vuepress/theme/components/Home.vue | 175 |
1 files changed, 175 insertions, 0 deletions
diff --git a/doc/docs/.vuepress/theme/components/Home.vue b/doc/docs/.vuepress/theme/components/Home.vue new file mode 100644 index 0000000..acd8744 --- /dev/null +++ b/doc/docs/.vuepress/theme/components/Home.vue | |||
| @@ -0,0 +1,175 @@ | |||
| 1 | <template> | ||
| 2 | <main | ||
| 3 | class="home" | ||
| 4 | :aria-labelledby="data.heroText !== null ? 'main-title' : null" | ||
| 5 | > | ||
| 6 | <header class="hero"> | ||
| 7 | <img | ||
| 8 | v-if="data.heroImage" | ||
| 9 | :src="$withBase(data.heroImage)" | ||
| 10 | :alt="data.heroAlt || 'hero'" | ||
| 11 | > | ||
| 12 | |||
| 13 | <h1 | ||
| 14 | v-if="data.heroText !== null" | ||
| 15 | id="main-title" | ||
| 16 | > | ||
| 17 | {{ data.heroText || $title || 'Hello' }} | ||
| 18 | </h1> | ||
| 19 | |||
| 20 | <p | ||
| 21 | v-if="data.tagline !== null" | ||
| 22 | class="description" | ||
| 23 | > | ||
| 24 | {{ data.tagline || $description || 'Welcome to your VuePress site' }} | ||
| 25 | </p> | ||
| 26 | |||
| 27 | <p | ||
| 28 | v-if="data.actionText && data.actionLink" | ||
| 29 | class="action" | ||
| 30 | > | ||
| 31 | <NavLink | ||
| 32 | class="action-button" | ||
| 33 | :item="actionLink" | ||
| 34 | /> | ||
| 35 | </p> | ||
| 36 | </header> | ||
| 37 | |||
| 38 | <div | ||
| 39 | v-if="data.features && data.features.length" | ||
| 40 | class="features" | ||
| 41 | > | ||
| 42 | <div | ||
| 43 | v-for="(feature, index) in data.features" | ||
| 44 | :key="index" | ||
| 45 | class="feature" | ||
| 46 | > | ||
| 47 | <h2>{{ feature.title }}</h2> | ||
| 48 | <p>{{ feature.details }}</p> | ||
| 49 | </div> | ||
| 50 | </div> | ||
| 51 | |||
| 52 | <Content class="theme-default-content custom" /> | ||
| 53 | |||
| 54 | <div | ||
| 55 | v-if="data.footer" | ||
| 56 | class="footer" | ||
| 57 | > | ||
| 58 | {{ data.footer }} | ||
| 59 | </div> | ||
| 60 | </main> | ||
| 61 | </template> | ||
| 62 | |||
| 63 | <script> | ||
| 64 | import NavLink from '@theme/components/NavLink.vue' | ||
| 65 | |||
| 66 | export default { | ||
| 67 | name: 'Home', | ||
| 68 | |||
| 69 | components: { NavLink }, | ||
| 70 | |||
| 71 | computed: { | ||
| 72 | data () { | ||
| 73 | return this.$page.frontmatter | ||
| 74 | }, | ||
| 75 | |||
| 76 | actionLink () { | ||
| 77 | return { | ||
| 78 | link: this.data.actionLink, | ||
| 79 | text: this.data.actionText | ||
| 80 | } | ||
| 81 | } | ||
| 82 | } | ||
| 83 | } | ||
| 84 | </script> | ||
| 85 | |||
| 86 | <style lang="stylus"> | ||
| 87 | .home | ||
| 88 | padding $navbarHeight 2rem 0 | ||
| 89 | max-width $homePageWidth | ||
| 90 | margin 0px auto | ||
| 91 | display block | ||
| 92 | .hero | ||
| 93 | text-align center | ||
| 94 | img | ||
| 95 | max-width: 100% | ||
| 96 | max-height 280px | ||
| 97 | display block | ||
| 98 | margin 3rem auto 1.5rem | ||
| 99 | h1 | ||
| 100 | font-size 3rem | ||
| 101 | h1, .description, .action | ||
| 102 | margin 1.8rem auto | ||
| 103 | .description | ||
| 104 | max-width 35rem | ||
| 105 | font-size 1.6rem | ||
| 106 | line-height 1.3 | ||
| 107 | color lighten($textColor, 40%) | ||
| 108 | .action-button | ||
| 109 | display inline-block | ||
| 110 | font-size 1.2rem | ||
| 111 | color #fff | ||
| 112 | background-color $accentColor | ||
| 113 | padding 0.8rem 1.6rem | ||
| 114 | border-radius 4px | ||
| 115 | transition background-color .1s ease | ||
| 116 | box-sizing border-box | ||
| 117 | border-bottom 1px solid darken($accentColor, 10%) | ||
| 118 | &:hover | ||
| 119 | background-color lighten($accentColor, 10%) | ||
| 120 | .features | ||
| 121 | border-top 1px solid $borderColor | ||
| 122 | padding 1.2rem 0 | ||
| 123 | margin-top 2.5rem | ||
| 124 | display flex | ||
| 125 | flex-wrap wrap | ||
| 126 | align-items flex-start | ||
| 127 | align-content stretch | ||
| 128 | justify-content space-between | ||
| 129 | .feature | ||
| 130 | flex-grow 1 | ||
| 131 | flex-basis 30% | ||
| 132 | max-width 30% | ||
| 133 | h2 | ||
| 134 | font-size 1.4rem | ||
| 135 | font-weight 500 | ||
| 136 | border-bottom none | ||
| 137 | padding-bottom 0 | ||
| 138 | color lighten($textColor, 10%) | ||
| 139 | p | ||
| 140 | color lighten($textColor, 25%) | ||
| 141 | .footer | ||
| 142 | padding 2.5rem | ||
| 143 | border-top 1px solid $borderColor | ||
| 144 | text-align center | ||
| 145 | color lighten($textColor, 25%) | ||
| 146 | |||
| 147 | @media (max-width: $MQMobile) | ||
| 148 | .home | ||
| 149 | .features | ||
| 150 | flex-direction column | ||
| 151 | .feature | ||
| 152 | max-width 100% | ||
| 153 | padding 0 2.5rem | ||
| 154 | |||
| 155 | @media (max-width: $MQMobileNarrow) | ||
| 156 | .home | ||
| 157 | padding-left 1.5rem | ||
| 158 | padding-right 1.5rem | ||
| 159 | .hero | ||
| 160 | img | ||
| 161 | max-height 210px | ||
| 162 | margin 2rem auto 1.2rem | ||
| 163 | h1 | ||
| 164 | font-size 2rem | ||
| 165 | h1, .description, .action | ||
| 166 | margin 1.2rem auto | ||
| 167 | .description | ||
| 168 | font-size 1.2rem | ||
| 169 | .action-button | ||
| 170 | font-size 1rem | ||
| 171 | padding 0.6rem 1.2rem | ||
| 172 | .feature | ||
| 173 | h2 | ||
| 174 | font-size 1.25rem | ||
| 175 | </style> | ||
