文章
This commit is contained in:
@@ -7,10 +7,10 @@
|
||||
:alt="data.heroAlt || 'hero'"
|
||||
>
|
||||
|
||||
<h1 v-if="data.heroText !== null" id="main-title">{{ data.heroText || $title || 'Hello' }}</h1>
|
||||
<h1 id="main-title">Kuboard</h1>
|
||||
|
||||
<p class="description">
|
||||
A cool Kubernetes Dashboard
|
||||
Kubernetes 安装文档/教程/实践/管理界面
|
||||
</p>
|
||||
|
||||
<span
|
||||
@@ -64,7 +64,7 @@ import NavLink from '@theme/components/NavLink.vue'
|
||||
export default {
|
||||
components: { NavLink },
|
||||
mounted () {
|
||||
window.document.title = 'Kuboard 官网'
|
||||
window.document.title = 'Kuboard - Kubernetes 安装文档/教程/实践/管理界面'
|
||||
},
|
||||
computed: {
|
||||
data () {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
let dateFns = require('date-fns')
|
||||
|
||||
module.exports = {
|
||||
title: 'Kuboard',
|
||||
title: 'Kuboard - Kubernetes 安装文档/教程/实践/管理界面',
|
||||
description: '一个非常 cool 的 Kubernetes Dashboard,简化 Kubernetes 的学习和使用,帮助您1天落地 Kubernetes;同时提供 Spring Cloud 微服务部署教程,DevOps教程',
|
||||
head: [
|
||||
['meta', {name: 'keywords', content: 'Kubernetes, Docker, Dashboard, Kuboard, Linux, K8S, Spring Cloud, micro service, DevOps, Rancher, 微服务, 持续构建集成, 容器'}]
|
||||
['meta', {name: 'keywords', content: 'Kubernetes, Docker, Dashboard, Kuboard, Linux, K8S, Spring Cloud, micro service, DevOps, Rancher, 微服务, 持续构建集成, 容器, 教程, 实践, 安装文档'}]
|
||||
],
|
||||
markdown: {
|
||||
toc: { includeLevel: [2, 3] }
|
||||
@@ -107,6 +107,16 @@ module.exports = {
|
||||
}
|
||||
],
|
||||
|
||||
'/articles/': [
|
||||
{
|
||||
title: '文章',
|
||||
collapsable: false,
|
||||
children: [
|
||||
'201908/kuboard-view-of-k8s'
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
'/install/': [
|
||||
{
|
||||
title: '安装 Kubernetes',
|
||||
|
||||
17
.vuepress/override.styl
Normal file
17
.vuepress/override.styl
Normal file
@@ -0,0 +1,17 @@
|
||||
.theme-container.overview-page-class {
|
||||
.feature {
|
||||
flex-grow: 1;
|
||||
flex-basis: 30%;
|
||||
max-width: 30%;
|
||||
h2 {
|
||||
font-size: 1.4rem;
|
||||
font-weight: 500;
|
||||
border-bottom: none;
|
||||
padding-bottom: 0;
|
||||
|
||||
}
|
||||
p {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
128
.vuepress/theme/components/Navbar.vue
Normal file
128
.vuepress/theme/components/Navbar.vue
Normal file
@@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<header class="navbar">
|
||||
<SidebarButton @toggle-sidebar="$emit('toggle-sidebar')"/>
|
||||
|
||||
<router-link
|
||||
:to="$localePath"
|
||||
class="home-link"
|
||||
>
|
||||
<img
|
||||
class="logo"
|
||||
v-if="$site.themeConfig.logo"
|
||||
:src="$withBase($site.themeConfig.logo)"
|
||||
:alt="$siteTitle"
|
||||
>
|
||||
<span
|
||||
ref="siteName"
|
||||
class="site-name"
|
||||
v-if="$siteTitle"
|
||||
:class="{ 'can-hide': $site.themeConfig.logo }"
|
||||
>Kuboard</span>
|
||||
</router-link>
|
||||
|
||||
<div
|
||||
class="links"
|
||||
:style="linksWrapMaxWidth ? {
|
||||
'max-width': linksWrapMaxWidth + 'px'
|
||||
} : {}"
|
||||
>
|
||||
<AlgoliaSearchBox
|
||||
v-if="isAlgoliaSearch"
|
||||
:options="algolia"
|
||||
/>
|
||||
<SearchBox v-else-if="$site.themeConfig.search !== false && $page.frontmatter.search !== false"/>
|
||||
<NavLinks class="can-hide"/>
|
||||
</div>
|
||||
</header>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AlgoliaSearchBox from '@AlgoliaSearchBox'
|
||||
import SearchBox from '@SearchBox'
|
||||
import SidebarButton from '@theme/components/SidebarButton.vue'
|
||||
import NavLinks from '@theme/components/NavLinks.vue'
|
||||
|
||||
export default {
|
||||
components: { SidebarButton, NavLinks, SearchBox, AlgoliaSearchBox },
|
||||
|
||||
data () {
|
||||
return {
|
||||
linksWrapMaxWidth: null
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
const MOBILE_DESKTOP_BREAKPOINT = 719 // refer to config.styl
|
||||
const NAVBAR_VERTICAL_PADDING = parseInt(css(this.$el, 'paddingLeft')) + parseInt(css(this.$el, 'paddingRight'))
|
||||
const handleLinksWrapWidth = () => {
|
||||
if (document.documentElement.clientWidth < MOBILE_DESKTOP_BREAKPOINT) {
|
||||
this.linksWrapMaxWidth = null
|
||||
} else {
|
||||
this.linksWrapMaxWidth = this.$el.offsetWidth - NAVBAR_VERTICAL_PADDING
|
||||
- (this.$refs.siteName && this.$refs.siteName.offsetWidth || 0)
|
||||
}
|
||||
}
|
||||
handleLinksWrapWidth()
|
||||
window.addEventListener('resize', handleLinksWrapWidth, false)
|
||||
},
|
||||
|
||||
computed: {
|
||||
algolia () {
|
||||
return this.$themeLocaleConfig.algolia || this.$site.themeConfig.algolia || {}
|
||||
},
|
||||
|
||||
isAlgoliaSearch () {
|
||||
return this.algolia && this.algolia.apiKey && this.algolia.indexName
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function css (el, property) {
|
||||
// NOTE: Known bug, will return 'auto' if style value is 'auto'
|
||||
const win = el.ownerDocument.defaultView
|
||||
// null means not to return pseudo styles
|
||||
return win.getComputedStyle(el, null)[property]
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
$navbar-vertical-padding = 0.7rem
|
||||
$navbar-horizontal-padding = 1.5rem
|
||||
|
||||
.navbar
|
||||
padding $navbar-vertical-padding $navbar-horizontal-padding
|
||||
line-height $navbarHeight - 1.4rem
|
||||
a, span, img
|
||||
display inline-block
|
||||
.logo
|
||||
height $navbarHeight - 1.4rem
|
||||
min-width $navbarHeight - 1.4rem
|
||||
margin-right 0.8rem
|
||||
vertical-align top
|
||||
.site-name
|
||||
font-size 1.3rem
|
||||
font-weight 600
|
||||
color $textColor
|
||||
position relative
|
||||
.links
|
||||
padding-left 1.5rem
|
||||
box-sizing border-box
|
||||
background-color white
|
||||
white-space nowrap
|
||||
font-size 0.9rem
|
||||
position absolute
|
||||
right $navbar-horizontal-padding
|
||||
top $navbar-vertical-padding
|
||||
display flex
|
||||
.search-box
|
||||
flex: 0 0 auto
|
||||
vertical-align top
|
||||
|
||||
@media (max-width: $MQMobile)
|
||||
.navbar
|
||||
padding-left 4rem
|
||||
.can-hide
|
||||
display none
|
||||
.links
|
||||
padding-left 1.5rem
|
||||
</style>
|
||||
Reference in New Issue
Block a user