132 lines
2.0 KiB
Vue
132 lines
2.0 KiB
Vue
<template>
|
|
<article class="content-page">
|
|
<h1 v-if="heading !== ''" class="page-heading title">{{ heading }}</h1>
|
|
<section class="content-container">
|
|
<div v-if="$slots.default" class="content">
|
|
<slot></slot>
|
|
</div>
|
|
</section>
|
|
<div v-if="$slots.background" class="background">
|
|
<slot name="background"></slot>
|
|
</div>
|
|
</article>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
heading: {
|
|
type: String,
|
|
required: false,
|
|
default: '',
|
|
}
|
|
},
|
|
|
|
data () {
|
|
return {
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
}
|
|
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
$z-index-bottom: 5;
|
|
$z-index-top: 10;
|
|
|
|
.content-page {
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: column;
|
|
width: 100%;
|
|
height: 100%;
|
|
padding: $site-menu__header-width 0 0 0;
|
|
|
|
@media (min-width: $bp__layout) {
|
|
padding: 0 0 0 $site-menu__header-width;
|
|
}
|
|
|
|
background-color: $color__neutral-100;
|
|
}
|
|
|
|
.content-container {
|
|
z-index: $z-index-top;
|
|
position: relative;
|
|
|
|
height: 100%;
|
|
width: 100%;
|
|
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
|
|
@media (min-width: $bp__layout) {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
}
|
|
}
|
|
|
|
.content {
|
|
position: absolute;
|
|
width: 100%;
|
|
top: 0;
|
|
right: 0;
|
|
|
|
padding: .5rem 1rem 2rem;
|
|
|
|
@media (min-width: $bp__layout) {
|
|
width: 50%;
|
|
padding: 1rem;
|
|
|
|
background-color: rgba(0, 0, 0, .5);
|
|
}
|
|
|
|
color: #fff; // TEMP
|
|
}
|
|
|
|
.page-heading {
|
|
z-index: $z-index-top;
|
|
position: relative;
|
|
margin: 1rem;
|
|
|
|
@media (min-width: $bp__layout) {
|
|
width: 14em;
|
|
max-width: calc(50% - #{$site-menu__header-width} - 3rem);
|
|
margin: 2rem 1rem 1rem 2rem;
|
|
}
|
|
}
|
|
|
|
.title {
|
|
@include font-title();
|
|
color: $color__neutral-900;
|
|
text-align: center;
|
|
|
|
@media (min-width: $bp__layout) {
|
|
font-size: 3.7vw;
|
|
text-align: left;
|
|
}
|
|
|
|
@media (min-width: 90em) {
|
|
font-size: 3.5rem;
|
|
}
|
|
}
|
|
|
|
.background {
|
|
z-index: $z-index-bottom;
|
|
position: absolute;
|
|
width: 100%;
|
|
height: 100%;
|
|
top: 0;
|
|
left: 0;
|
|
|
|
opacity: .5;
|
|
|
|
@media (min-width: $bp__layout) {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
</style>
|