Skip to content

Commit aab7d1b

Browse files
committed
docs: rewrite Previewer component with stylus
1 parent b979511 commit aab7d1b

File tree

3 files changed

+54
-32
lines changed

3 files changed

+54
-32
lines changed

docs/.vuepress/theme/Previewer.vue

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<template>
2+
<div class="previewer">
3+
<div class="content"></div>
4+
</div>
5+
</template>
6+
7+
<script>
8+
export default {
9+
name: 'Previewer',
10+
};
11+
</script>
12+
13+
<style lang="stylus" scoped>
14+
@require '../styles/config';
15+
16+
.previewer
17+
$ratio = 1425/700
18+
19+
position relative
20+
width $s-preview-width
21+
height $s-preview-width * $ratio
22+
background url('../assets/images/16th-mockup.png') no-repeat center/100%
23+
24+
.content
25+
$s-vertical = 28px
26+
$s-horizontal = 11px
27+
28+
position absolute
29+
z-index 1
30+
top $s-vertical
31+
bottom $s-vertical
32+
left $s-horizontal
33+
right $s-horizontal
34+
background-color #fff
35+
box-shadow 0 0 0 1.5px rgba(0,0,0,0.8)
36+
border-radius 32px
37+
</style>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* color config
3+
*/
4+
5+
$c-basic = #32495f;
6+
$c-basic-light = desaturate(lighten($c-basic, 35%), 10%);
7+
8+
/**
9+
* size config
10+
*/
11+
12+
$s-home-divide-ratio = 36.5%;
13+
$s-home-middle-gap = 40px;
14+
$s-edge-gap = 30px;
15+
$s-header-height = 62px;
16+
$s-sidebar-width = 200px;
17+
$s-preview-width = 334px;

0 commit comments

Comments
 (0)