|
1 | 1 | <template>
|
2 |
| - <h1>Hello World!</h1> |
| 2 | + <div> |
| 3 | + <header> |
| 4 | + <div class="container"> |
| 5 | + <router-link :to="{ path: '/' }" id="logo"></router-link> |
| 6 | + <h1>Vue-infinite-loading</h1> |
| 7 | + </div> |
| 8 | + </header> |
| 9 | + <main class="container"> |
| 10 | + <previewer class="previewer"></previewer> |
| 11 | + <div class="intro-container"> |
| 12 | + <p>An infinite scroll plugin for Vue.js</p> |
| 13 | + <button class="button button-intro">Get Started</button> |
| 14 | + <button class="button button-intro">View GitHub</button> |
| 15 | + <ul class="feat-list"> |
| 16 | + <li> |
| 17 | + <h3>Out of the box</h3> |
| 18 | + BalabalaBalabalaBalabalaBalabala |
| 19 | + </li> |
| 20 | + <li> |
| 21 | + <h3>2-direction support</h3> |
| 22 | + BalabalaBalabalaBalabalaBalabala |
| 23 | + </li> |
| 24 | + <li> |
| 25 | + <h3>Result display</h3> |
| 26 | + BalabalaBalabalaBalabalaBalabala |
| 27 | + </li> |
| 28 | + </ul> |
| 29 | + </div> |
| 30 | + </main> |
| 31 | + </div> |
3 | 32 | </template>
|
| 33 | + |
| 34 | +<script> |
| 35 | +import Previewer from './Previewer'; |
| 36 | +
|
| 37 | +export default { |
| 38 | + components: { |
| 39 | + Previewer, |
| 40 | + } |
| 41 | +}; |
| 42 | +</script> |
| 43 | + |
| 44 | +<style lang="less"> |
| 45 | +body { |
| 46 | + margin: 0; |
| 47 | + font: 16px/1.42857 PingFang SC, Lantinghei SC, Microsoft Yahei, Hiragino Sans GB, Microsoft Sans Serif, WenQuanYi Micro Hei, sans-serif; |
| 48 | + background-color: #f9fbfd; |
| 49 | +} |
| 50 | +</style> |
| 51 | + |
| 52 | +<style lang="less" scoped> |
| 53 | +@import './less/variables.less'; |
| 54 | +
|
| 55 | +.container { |
| 56 | + margin: 0 auto; |
| 57 | + width: 1200px; |
| 58 | +} |
| 59 | +
|
| 60 | +header .container, |
| 61 | +main.container { |
| 62 | + position: relative; |
| 63 | +} |
| 64 | +
|
| 65 | +#logo { |
| 66 | + position: absolute; |
| 67 | + z-index: 10; |
| 68 | + top: 10px; |
| 69 | + left: 50%; |
| 70 | + margin-left: -600px; |
| 71 | + display: inline-block; |
| 72 | + width: 60px; |
| 73 | + height: 60px; |
| 74 | + background: url('./assets/images/logo.png') no-repeat center/100%; |
| 75 | +
|
| 76 | + + h1 { |
| 77 | + position: absolute; |
| 78 | + top: 10px; |
| 79 | + left: 50%; |
| 80 | + margin: 12px 0 0 -520px; |
| 81 | + z-index: 10; |
| 82 | + color: @c-basic; |
| 83 | + font-size: 24px; |
| 84 | +
|
| 85 | + } |
| 86 | +
|
| 87 | + &, |
| 88 | + + h1 { |
| 89 | + transition: all 1s cubic-bezier(0.23, 1, 0.32, 1); |
| 90 | + } |
| 91 | +
|
| 92 | + &.router-link-active { |
| 93 | + top: 100px; |
| 94 | + left: 38%; |
| 95 | + margin-left: 236px; |
| 96 | + width: 200px; |
| 97 | + height: 200px; |
| 98 | +
|
| 99 | + + h1 { |
| 100 | + top: 280px; |
| 101 | + left: 38%; |
| 102 | + margin-top: 20px; |
| 103 | + margin-left: 179px; |
| 104 | + font-size: 32px; |
| 105 | + } |
| 106 | + } |
| 107 | +} |
| 108 | +
|
| 109 | +.previewer { |
| 110 | + position: absolute; |
| 111 | + z-index: 10; |
| 112 | + top: 80px; |
| 113 | + right: 62%; |
| 114 | + margin-right: 20px; |
| 115 | +} |
| 116 | +
|
| 117 | +.intro-container { |
| 118 | + position: absolute; |
| 119 | + z-index: 10; |
| 120 | + left: 38%; |
| 121 | + margin-top: 338px; |
| 122 | + margin-left: 20px; |
| 123 | + width: 640px; |
| 124 | + text-align: center; |
| 125 | +
|
| 126 | + > p { |
| 127 | + margin: 0 0 40px; |
| 128 | + color: @c-basic-light; |
| 129 | + } |
| 130 | +
|
| 131 | + .button-intro { |
| 132 | + padding: 16px 48px; |
| 133 | + color: #fff; |
| 134 | + font-size: 20px; |
| 135 | + background: lighten(@c-basic, 20%); |
| 136 | + border: 1px solid lighten(@c-basic, 20%); |
| 137 | + border-radius: 2px; |
| 138 | + cursor: pointer; |
| 139 | + outline: none; |
| 140 | +
|
| 141 | + &:hover, |
| 142 | + &:focus { |
| 143 | + opacity: 0.9; |
| 144 | + } |
| 145 | +
|
| 146 | + &:active { |
| 147 | + opacity: 1; |
| 148 | + } |
| 149 | +
|
| 150 | + + .button-intro { |
| 151 | + margin-left: 20px; |
| 152 | + color: @c-basic; |
| 153 | + background: transparent; |
| 154 | + } |
| 155 | + } |
| 156 | +
|
| 157 | + .feat-list { |
| 158 | + list-style: none; |
| 159 | + display: flex; |
| 160 | + margin-top: 60px; |
| 161 | + padding: 0; |
| 162 | +
|
| 163 | + li { |
| 164 | + position: relative; |
| 165 | + padding-top: 120px; |
| 166 | + flex: 1; |
| 167 | + color: @c-basic-light; |
| 168 | + word-break: break-all; |
| 169 | +
|
| 170 | + &:not(:last-child) { |
| 171 | + margin-right: 20px; |
| 172 | + } |
| 173 | +
|
| 174 | + &::before { |
| 175 | + content: ''; |
| 176 | + position: absolute; |
| 177 | + z-index: 1; |
| 178 | + top: 0; |
| 179 | + left: 0; |
| 180 | + width: 100%; |
| 181 | + padding-top: 80%; |
| 182 | + background: no-repeat center top/90%; |
| 183 | + filter: grayscale(50%); |
| 184 | + transition: filter 0.3s; |
| 185 | + } |
| 186 | +
|
| 187 | + &:first-child::before { |
| 188 | + background-image: url('./assets/images/icon-box.png'); |
| 189 | + } |
| 190 | +
|
| 191 | + &:nth-child(2)::before { |
| 192 | + background-image: url('./assets/images/icon-dir.png'); |
| 193 | + } |
| 194 | +
|
| 195 | + &:last-child::before { |
| 196 | + background-image: url('./assets/images/icon-msg.png'); |
| 197 | + } |
| 198 | +
|
| 199 | + &:hover::before { |
| 200 | + filter: none; |
| 201 | + } |
| 202 | +
|
| 203 | + h3 { |
| 204 | + margin: 0 0 5px; |
| 205 | + color: @c-basic; |
| 206 | + } |
| 207 | + } |
| 208 | + } |
| 209 | +} |
| 210 | +</style> |
0 commit comments