-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
PageContainer.vue
126 lines (107 loc) · 2.26 KB
/
PageContainer.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<template>
<transition name="page-container" appear>
<div class="page-container main-container" :class="{ centered }">
<ad-manager />
<slot />
</div>
</transition>
</template>
<script>
import * as types from 'store/mutation-types'
import { mapState, mapActions } from 'vuex'
import AdManager from './AdManager'
export default {
name: 'PageContainer',
components: {
AdManager
},
props: {
title: String,
centered: Boolean
},
computed: {
...mapState({
currentTheme: 'theme'
})
},
methods: {
...mapActions({
setPageTitle: types.SET_PAGE_TITLE
})
},
created () {
this.$material.theming.theme = this.currentTheme
this.setPageTitle(this.title)
}
}
</script>
<style lang="scss" scoped>
@import "~vue-material/components/MdAnimation/variables";
@import "~vue-material/theme/engine";
.page-container.centered {
max-width: 1100px;
margin: 0 auto;
padding: 16px;
transition: .4s $md-transition-default-timing;
transition-property: width;
}
@media(min-width:981px){
.page-container.centered{
margin-right: 280px;
}
}
.page-container-leave-active {
display: none;
}
.page-container-enter-active {
opacity: 0;
transform: translate3d(0, 150px, 0);
transition-property: opacity, transform;
will-change: opacity, transform;
.ad-manager {
display: none;
}
}
.page-container-enter-to {
opacity: 1;
transform: translate3d(0, 0, 0);
}
>>> .page-container-section {
letter-spacing: .01em;
line-height: 1.6em;
+ .page-container-section {
margin-top: 32px;
}
p >,
li >,
.note-block {
code {
padding: 0 4px;
display: inline-block;
color: md-get-palette-color(red, A200);
background: rgba(#000, .07);
border-radius: 2px;
line-height: 1.45em;
}
}
p,
.md-layout-row {
+ .code-example {
margin-top: 1em;
}
}
}
.ad-manager{
margin-bottom: 0 !important;
position: fixed;
}
@media(max-width: 960px){
.ad-manager{
position: relative;
>>>.code-fund{
float: none;
margin: 0;
}
}
}
</style>