Files
www_threefold_io/src/templates/MarkdownPage.vue
2021-04-04 15:46:23 +02:00

216 lines
5.4 KiB
Vue

<template>
<Layout :hideHeader="true" :disableScroll="true">
<div class="container-fluid sm:pxi-0 mx-auto overflow-x-hidden py-5">
<Header
v-if="
$page.markdownPage.id !== 'contact' &&
$page.markdownPage.header_title &&
$page.markdownPage.header_title != ''
"
:id="$page.markdownPage.id"
:title="$page.markdownPage.header_title"
:slogan="$page.markdownPage.header_slogan"
:image="$page.markdownPage.header_image"
:altImg="$page.markdownPage.header_altImg"
:excerpt="$page.markdownPage.header_excerpt"
/>
</div>
<div class="container sm:pxi-0 mx-auto overflow-x-hidden py-5">
<SignUp
v-if="$page.markdownPage.signup"
:signup="$page.markdownPage.signup"
/>
<Comparison
v-if="
$page.markdownPage.comparisonSecs &&
$page.markdownPage.comparisonSecs.length > 0
"
:main="$page.markdownPage.comparisonMain"
:sections="$page.markdownPage.comparisonSecs"
/>
<g-image
class="w-3/4 mx-auto mt-10"
v-if="$page.markdownPage.solution_image"
:src="$page.markdownPage.solution_image.src"
/>
<CallToAction
v-if="$page.markdownPage.cta"
:cta="$page.markdownPage.cta"
/>
<ShowcaseProducts
v-if="
$page.markdownPage.productData &&
$page.markdownPage.productData.length > 0
"
:main="$page.markdownPage.productsMain"
:products="$page.markdownPage.productData"
/>
</div>
</Layout>
</template>
<page-query>
query($id: ID!) {
markdownPage(id: $id) {
id
path
excerpt
header_excerpt
header_altImg
header_title
header_image
header_slogan
solution_image
productsMain{
id
title
subtitle
# image
}
productData{
id
title
content
image
url
}
comparisonMain{
id
title
description
button
link
}
comparisonSecs{
id
svg
title
content
}
logos{
id
image
}
cta{
id
title
slogan
content
button
link
}
brandPanel{
id
title
subtitle
content
sourceUrl
btnTxt
image
}
}
}
</page-query>
<script>
import NewCard from "~/components/marketing/sections/cta-sections/NewCard.vue";
import Header from "~/components/marketing/sections/cta-sections/Header.vue";
import VerticalNav from "~/components/custom/Navbar/VerticalNav.vue";
import GetInTouch from "~/components/custom/Navbar/Getintouch.vue";
import ShowcaseProducts from "~/components/marketing/sections/cta-sections/ShowcaseProducts.vue";
import SolutionsHeader from "~/components/custom/sections/header/HeaderSection.vue";
import HowItWorks from "~/components/custom/sections/HowItWorks.vue";
import Features from "~/components/custom/sections/Features.vue";
import logoShowcase from "~/components/marketing/sections/cta-sections/logoShowcase.vue";
import CallToAction from "~/components/custom/sections/CallToAction.vue";
import SignUp from "~/components/custom/sections/SignUp.vue";
import Comparison from "~/components/custom/sections/Comparison.vue";
import Roadmap from "~/components/custom/sections/Roadmap.vue";
import FourTiersWithToggle from "~/components/marketing/sections/pricing/four_tiers_with_toggle.vue";
import WithComparisonTable from "~/components/marketing/sections/pricing/with_comparison_table.vue";
import BrandPanel from "~/components/marketing/sections/cta-sections/BrandPanel.vue";
export default {
components: {
NewCard,
Header,
VerticalNav,
GetInTouch,
SolutionsHeader,
ShowcaseProducts,
HowItWorks,
Features,
logoShowcase,
CallToAction,
SignUp,
Comparison,
Roadmap,
FourTiersWithToggle,
WithComparisonTable,
BrandPanel,
},
metaInfo() {
return {
title: this.pageName,
};
},
computed: {
pageName() {
let path = this.$route.path.substring(1);
let name = path[0].toUpperCase() + path.slice(1);
return name;
},
},
};
</script>
<style scoped>
/**
* Add back the container background-color, border-radius, padding, margin
* and overflow that we removed from <pre>.
*/
.gridsome-highlight {
background-color: #fdf6e3;
border-radius: 0.3em;
margin: 0.5em 0;
padding: 1em;
overflow: auto;
}
.gridsome-highlight-code-line {
background-color: #feb;
display: block;
margin-right: -1em;
margin-left: -1em;
padding-right: 1em;
padding-left: 0.75em;
border-left: 0.25em solid #f99;
}
/**
* Remove the default PrismJS theme background-color, border-radius, margin,
* padding and overflow.
* 1. Make the element just wide enough to fit its content.
* 2. Always fill the visible space in .gatsby-highlight.
* 3. Adjust the position of the line numbers
*/
.gridsome-highlight pre[class*="language-"] {
background-color: transparent;
margin: 0;
padding: 0;
overflow: initial;
float: left; /* 1 */
min-width: 100%; /* 2 */
}
/* Adjust the position of the line numbers */
.gridsome-highlight pre[class*="language-"].line-numbers {
padding-left: 2.8em;
}
</style> >