Skip to content

Commit 8f64bb4

Browse files
committed
Migrate to VuePress
Signed-off-by: Yannick Schaus <[email protected]>
1 parent 6b15728 commit 8f64bb4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+12830
-3837
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
_site
1+
vuepress
2+
node_modules

.vuepress/components/Footer.vue

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<template>
2+
<footer>
3+
<div class="social-icons">
4+
<a href="https://twitter.com/openhabfdn" target="_blank"><svg class="social-icon twitter"><path d="M32 7.075c-1.175 0.525-2.444 0.875-3.769 1.031 1.356-0.813 2.394-2.1 2.887-3.631-1.269 0.75-2.675 1.3-4.169 1.594-1.2-1.275-2.906-2.069-4.794-2.069-3.625 0-6.563 2.938-6.563 6.563 0 0.512 0.056 1.012 0.169 1.494-5.456-0.275-10.294-2.888-13.531-6.862-0.563 0.969-0.887 2.1-0.887 3.3 0 2.275 1.156 4.287 2.919 5.463-1.075-0.031-2.087-0.331-2.975-0.819 0 0.025 0 0.056 0 0.081 0 3.181 2.263 5.838 5.269 6.437-0.55 0.15-1.131 0.231-1.731 0.231-0.425 0-0.831-0.044-1.237-0.119 0.838 2.606 3.263 4.506 6.131 4.563-2.25 1.762-5.075 2.813-8.156 2.813-0.531 0-1.050-0.031-1.569-0.094 2.913 1.869 6.362 2.95 10.069 2.95 12.075 0 18.681-10.006 18.681-18.681 0-0.287-0.006-0.569-0.019-0.85 1.281-0.919 2.394-2.075 3.275-3.394z"></path></svg></a>
5+
<!-- <a href="https://github.com/openhab" target="_blank"><svg class="social-icon github"><path d="M10.369 24.837c0 0.125-0.144 0.225-0.325 0.225-0.206 0.019-0.35-0.081-0.35-0.225 0-0.125 0.144-0.225 0.325-0.225 0.188-0.019 0.35 0.081 0.35 0.225zM8.425 24.556c-0.044 0.125 0.081 0.269 0.269 0.306 0.162 0.063 0.35 0 0.387-0.125s-0.081-0.269-0.269-0.325c-0.162-0.044-0.344 0.019-0.387 0.144zM11.188 24.45c-0.181 0.044-0.306 0.163-0.287 0.306 0.019 0.125 0.181 0.206 0.369 0.163 0.181-0.044 0.306-0.163 0.287-0.288-0.019-0.119-0.188-0.2-0.369-0.181zM15.3 0.5c-8.669 0-15.3 6.581-15.3 15.25 0 6.931 4.362 12.863 10.594 14.95 0.8 0.144 1.081-0.35 1.081-0.756 0-0.387-0.019-2.525-0.019-3.837 0 0-4.375 0.938-5.294-1.863 0 0-0.713-1.819-1.737-2.288 0 0-1.431-0.981 0.1-0.962 0 0 1.556 0.125 2.412 1.613 1.369 2.413 3.662 1.719 4.556 1.306 0.144-1 0.55-1.694 1-2.106-3.494-0.387-7.019-0.894-7.019-6.906 0-1.719 0.475-2.581 1.475-3.681-0.162-0.406-0.694-2.081 0.162-4.244 1.306-0.406 4.313 1.688 4.313 1.688 1.25-0.35 2.594-0.531 3.925-0.531s2.675 0.181 3.925 0.531c0 0 3.006-2.1 4.313-1.688 0.856 2.169 0.325 3.838 0.163 4.244 1 1.106 1.613 1.969 1.613 3.681 0 6.031-3.681 6.512-7.175 6.906 0.575 0.494 1.063 1.431 1.063 2.9 0 2.106-0.019 4.712-0.019 5.225 0 0.406 0.288 0.9 1.081 0.756 6.25-2.075 10.488-8.006 10.488-14.938 0-8.669-7.031-15.25-15.7-15.25zM6.075 22.056c-0.081 0.063-0.063 0.206 0.044 0.325 0.1 0.1 0.244 0.144 0.325 0.063 0.081-0.063 0.063-0.206-0.044-0.325-0.1-0.1-0.244-0.144-0.325-0.063zM5.4 21.55c-0.044 0.081 0.019 0.181 0.144 0.244 0.1 0.063 0.225 0.044 0.269-0.044 0.044-0.081-0.019-0.181-0.144-0.244-0.125-0.038-0.225-0.019-0.269 0.044zM7.425 23.775c-0.1 0.081-0.063 0.269 0.081 0.387 0.144 0.144 0.325 0.163 0.406 0.063 0.081-0.081 0.044-0.269-0.081-0.387-0.138-0.144-0.325-0.163-0.406-0.063zM6.713 22.856c-0.1 0.063-0.1 0.225 0 0.369s0.269 0.206 0.35 0.144c0.1-0.081 0.1-0.244 0-0.387-0.088-0.144-0.25-0.206-0.35-0.125z"></path></svg></a>
6+
<a href="https://www.youtube.com/channel/UC7OK88DW0La_BJlcXZg8ydQ" target="_blank"><svg class="social-icon youtube"><path d="M31.681 9.6c0 0-0.313-2.206-1.275-3.175-1.219-1.275-2.581-1.281-3.206-1.356-4.475-0.325-11.194-0.325-11.194-0.325h-0.012c0 0-6.719 0-11.194 0.325-0.625 0.075-1.987 0.081-3.206 1.356-0.963 0.969-1.269 3.175-1.269 3.175s-0.319 2.588-0.319 5.181v2.425c0 2.587 0.319 5.181 0.319 5.181s0.313 2.206 1.269 3.175c1.219 1.275 2.819 1.231 3.531 1.369 2.563 0.244 10.881 0.319 10.881 0.319s6.725-0.012 11.2-0.331c0.625-0.075 1.988-0.081 3.206-1.356 0.962-0.969 1.275-3.175 1.275-3.175s0.319-2.587 0.319-5.181v-2.425c-0.006-2.588-0.325-5.181-0.325-5.181zM12.694 20.15v-8.994l8.644 4.513-8.644 4.481z"></path></svg></a> -->
7+
</div>
8+
<div class="legal">
9+
<span class="copyright">Copyright © {{year}} by the openHAB Foundation e.V.</span>
10+
<br />
11+
<router-link to="/privacy.html">Privacy policy</router-link> |
12+
<router-link to="/imprint.html">Imprint</router-link>
13+
</div>
14+
<img src="/openhab-logo-square.png" class="footer-logo" />
15+
</footer>
16+
</template>
17+
18+
<style lang="stylus">
19+
footer
20+
border-top 1px solid #eaecef
21+
margin-bottom -2rem
22+
.footer-logo
23+
width 70px
24+
height 70px
25+
margin-left -6px
26+
margin-top 3rem
27+
filter grayscale(100%)
28+
opacity 0.2
29+
background rgb(250,250,252) !important
30+
padding 3rem 2.5rem
31+
// padding-bottom 6rem
32+
text-align center
33+
color lighten(black, 25%)
34+
.social-icons
35+
.social-icon
36+
height 35px
37+
width 35px
38+
margin 10px
39+
fill #777
40+
&:hover
41+
fill #333
42+
.legal
43+
font-size 10pt
44+
a
45+
color black
46+
.copyright
47+
color #777
48+
49+
@media print
50+
footer
51+
background-color transparent
52+
.social-icons
53+
display none
54+
.footer-logo
55+
display none
56+
</style>
57+
58+
<script>
59+
export default {
60+
name: 'Footer',
61+
data () {
62+
return {
63+
year: new Date().getFullYear()
64+
}
65+
},
66+
mounted () {
67+
if (this.$sr) {
68+
const sr = this.$sr
69+
//import('scrollreveal').then(ScrollReveal => {
70+
//const sr = new ScrollReveal.default()
71+
sr.reveal('.social-icons')
72+
sr.reveal('.legal', { scale: 1.0 })
73+
sr.reveal('.footer-logo', { scale: 0.5, duration: 1000 })
74+
}
75+
}
76+
}
77+
</script>

.vuepress/config.js

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
module.exports = {
2+
title: 'myopenHAB',
3+
description: 'myopenHAB is an instance of the openHAB Cloud service, which is hosted by the openHAB Foundation e.V.',
4+
dest: 'vuepress',
5+
host: 'localhost',
6+
ga: 'UA-89041046-2',
7+
head: [
8+
['link', { rel: 'stylesheet', href: `/fonts/fonts.css` }],
9+
['link', { rel: 'icon', href: `/favicon.ico` }],
10+
['link', { rel: 'shortcut icon', href: `/favicon.ico` }],
11+
['link', { rel: 'apple-touch-icon', href: `/apple-icon.png` }],
12+
['meta', { property: 'og:type', content: 'website' }],
13+
['meta', { property: 'og:image', content: 'https://www.openhab.org/og-image.png' }],
14+
['meta', { property: 'og:title', content: 'openHAB Foundation e.V.' }],
15+
['meta', { property: 'og:description', content: 'myopenHAB is an instance of the openHAB Cloud service, which is hosted by the openHAB Foundation e.V.' }],
16+
],
17+
serviceWorker: false,
18+
themeConfig: {
19+
logo: `/logo.png`,
20+
editLinks: false,
21+
search: false,
22+
nav: [
23+
{ text: 'Register | Login ➜',
24+
link: 'https://myopenhab.org/login'
25+
},
26+
{
27+
text: 'openHAB.org',
28+
link: 'https://www.myopenhab.org/'
29+
}
30+
]
31+
}
32+
}

.vuepress/enhanceApp.js

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
export default ({
2+
Vue, // the version of Vue being used in the VuePress app
3+
options, // the options for the root Vue instance
4+
router, // the router instance for the app
5+
siteData // site metadata
6+
}) => {
7+
if (typeof window !== 'undefined') {
8+
const Headroom = require('headroom.js')
9+
Vue.prototype.Headroom = Headroom
10+
11+
const ScrollReveal = require('scrollreveal')
12+
Vue.prototype.$sr = new ScrollReveal()
13+
14+
router.onReady(() => {
15+
if (typeof window.ga !== 'undefined') {
16+
ga('set', 'anonymizeIp', true);
17+
window.gaOptout = function () {
18+
const GA_ID = 'UA-89041046-2'
19+
const disableStr = 'ga-disable-' + GA_ID
20+
document.cookie = disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/'
21+
alert('Google Analytics disabled')
22+
}
23+
}
24+
})
25+
26+
// Add the cookie consent before </body>
27+
let tag = document.createElement('script')
28+
tag.setAttribute('type', 'text/javascript')
29+
tag.setAttribute('id', 'cookieinfo')
30+
tag.setAttribute('src', '/cookieinfo.min.js')
31+
tag.setAttribute('data-bg', '#645862')
32+
tag.setAttribute('data-fg', '#FFFFFF')
33+
tag.setAttribute('data-link', '#F1D600')
34+
tag.setAttribute('data-linkmsg', 'Privacy Policy')
35+
tag.setAttribute('data-moreinfo', '/privacy.html')
36+
tag.setAttribute('data-cookie', 'CookieInfoScript')
37+
tag.setAttribute('data-text-align', 'left')
38+
tag.setAttribute('data-close-text', 'Got it!')
39+
document.body.appendChild(tag)
40+
}
41+
}

.vuepress/override.styl

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
$accentColor = #ff6600
2+
$MQMobile = 859px
3+
$MQNarrow = 1023px

.vuepress/public/apple-icon.png

4.29 KB
Loading
File renamed without changes.

.vuepress/public/favicon.ico

31.3 KB
Binary file not shown.

.vuepress/public/fonts/fonts.css

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
/* Open Sans font weights 300-400 */
3+
/* latin-ext */
4+
@font-face {
5+
font-family: 'Open Sans';
6+
font-style: normal;
7+
font-weight: 300;
8+
src: local('Open Sans Light'), local('OpenSans-Light'), url(/fonts/mem5YaGs126MiZpBA-UN_r8OXOhpOqc.woff2) format('woff2');
9+
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
10+
}
11+
/* latin */
12+
@font-face {
13+
font-family: 'Open Sans';
14+
font-style: normal;
15+
font-weight: 300;
16+
src: local('Open Sans Light'), local('OpenSans-Light'), url(/fonts/mem5YaGs126MiZpBA-UN_r8OUuhp.woff2) format('woff2');
17+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
18+
}
19+
/* latin-ext */
20+
@font-face {
21+
font-family: 'Open Sans';
22+
font-style: normal;
23+
font-weight: 400;
24+
src: local('Open Sans Regular'), local('OpenSans-Regular'), url(/fonts/mem8YaGs126MiZpBA-UFW50bbck.woff2) format('woff2');
25+
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
26+
}
27+
/* latin */
28+
@font-face {
29+
font-family: 'Open Sans';
30+
font-style: normal;
31+
font-weight: 400;
32+
src: local('Open Sans Regular'), local('OpenSans-Regular'), url(/fonts/mem8YaGs126MiZpBA-UFVZ0b.woff2) format('woff2');
33+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
34+
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

.vuepress/public/images/hero.jpg

154 KB
Loading

.vuepress/public/logo-white.png

3.09 KB
Loading

.vuepress/public/logo.png

44.2 KB
Loading

.vuepress/public/og-image.png

7.26 KB
Loading
13.5 KB
Loading

.vuepress/public/openhab.png

11.4 KB
Loading

.vuepress/style.styl

+186
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
.navbar
2+
box-shadow rgba(10%,10%,10%,25%) 0 0 10px
3+
background-color rgba(98%, 98%, 99%, 0.9) !important // linear-gradient(180deg,hsla(0,0%,100%,.3),hsla(0,0%,100%,.3) 95%,rgba(0,0,0,.05) 99%,rgba(0,0,0,.04))
4+
//opacity 0.9
5+
6+
.navbar
7+
.nav-dropdown
8+
// background-color white
9+
background-color rgba(98%, 98%, 99%, 0.96) !important
10+
box-shadow rgba(10%,10%,10%,25%) 0 0 5px
11+
12+
.nav-item a
13+
// font-family 'Open Sans', sans-serif
14+
font-weight 400
15+
font-size 1rem
16+
17+
.dropdown-subitem .nav-link a
18+
font-weight normal
19+
20+
.site-name
21+
display none
22+
23+
.nav-links
24+
.nav-item
25+
&:first-child
26+
font-family 'Open Sans', sans-serif
27+
border 2px solid #f60
28+
border-radius 5px
29+
padding-left 4px
30+
//background #f60
31+
color #ff6600
32+
padding-left 0.5rem
33+
padding-right 0.5rem
34+
a
35+
font-weight bold
36+
&:hover
37+
background #f60
38+
color #fff
39+
border-color #f60
40+
svg
41+
display none
42+
a:hover
43+
color #fff
44+
border-bottom none
45+
&:last-child
46+
border 1px solid #ccc
47+
border-radius 5px
48+
padding-left 4px
49+
&:hover
50+
background #eee
51+
a:hover
52+
border-bottom none
53+
54+
// .nav-links
55+
// .nav-item:last-child
56+
// &:after
57+
// content: url("/external-link.svg") // url("data:image/svg+xml; utf8, <svg class='icon outbound' xmlns='http://www.w3.org/2000/svg' aria-hidden='true' x='0px' y='0px' viewBox='0 0 100 100' width='15' height='15'><path fill='#2c3e50' d='M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z'></path><polygon fill='currentColor' points='45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9'></polygon></svg>");
58+
// display:inline;
59+
// width 15px;
60+
// height 15px;
61+
// margin 2px 0 2px 5px;
62+
63+
// .nav-dropdown .dropdown-item:nth-child(2) .dropdown-subitem:nth-child(1) a:after,
64+
// .nav-dropdown .dropdown-item:nth-child(3) .dropdown-subitem:nth-child(3) a:after
65+
// content url("/external-link.svg")
66+
// display inline-block
67+
// width 10px
68+
// height 15px
69+
// margin-left 5px
70+
// // margin 2px 0 2px 5px
71+
72+
.dropdown-wrapper .nav-dropdown .dropdown-item h4
73+
margin-bottom .2rem
74+
75+
.sidebar
76+
background-color #f7f7f7 !important
77+
// background linear-gradient(90deg, #fff0e0, #fff) !important
78+
79+
@media (min-width: 719px)
80+
.nav-item > a:hover, .nav-item > a.router-link-active
81+
border-bottom 3px solid $accentColor
82+
83+
@media (min-width: 720px) and (max-width: 1023px)
84+
.search-box input:focus
85+
width: 10.8rem // to cover the openHAB text (leaving the logo)
86+
87+
@media (min-width: 1024px) and (max-width: 1280px)
88+
.search-box input
89+
width: 5.7rem
90+
91+
@media (max-width: 360px)
92+
.search-box input:focus
93+
width: 9.4rem // to cover the openHAB text (leaving the logo)
94+
95+
@media (max-width: 419px)
96+
.search-box input:focus
97+
width: 4rem
98+
99+
.content:not(.custom)>h1:first-child
100+
font-family 'Open Sans', sans-serif
101+
font-weight 400
102+
103+
@media print
104+
.navbar
105+
display none
106+
.page-versions
107+
display none
108+
.page-nav
109+
display none
110+
.editLink
111+
display none
112+
113+
.content pre, .content pre[class*='language-']
114+
white-space pre !important
115+
word-break normal !important
116+
117+
.content
118+
max-width 1024px !important
119+
margin 0 auto
120+
padding: 2rem 2.5rem
121+
122+
.page .content:not(.custom):not(.page-nav):not(.edit-link)
123+
min-height 85vh !important
124+
125+
.page .content.edit-link
126+
display none
127+
128+
// .logo
129+
// width 160px
130+
// height 35px
131+
132+
h2.subtitle
133+
font-family 'Open Sans', sans-serif
134+
font-weight 300
135+
border 0
136+
text-align center
137+
138+
.big-title
139+
font-family 'Open Sans', sans-serif
140+
font-size 2rem
141+
font-weight 400
142+
text-align center
143+
&.header
144+
font-size 3rem
145+
146+
147+
img.illustration
148+
width 50%
149+
transform translateX(50%)
150+
&.wide
151+
width 100%
152+
transform translateX(0%)
153+
@media (max-width: 719px)
154+
img.illustration
155+
width 100%
156+
transform translateX(0)
157+
158+
.home
159+
padding 0
160+
.features
161+
border-top none
162+
margin-top 0
163+
164+
.custom-block.tip
165+
border-color #2196f3 !important
166+
167+
address
168+
font-style normal
169+
170+
@keyframes headerSlideDown
171+
0%
172+
transform translateY(-100%)
173+
100%
174+
transform translateY(0%)
175+
@keyframes headerSlideUp
176+
0%
177+
transform translateY(0%)
178+
100%
179+
transform translateY(-100%)
180+
181+
header.headroom--pinned
182+
animation 0.5s ease-out 0s 1 headerSlideDown
183+
transform translateY(0%)
184+
header.headroom--unpinned
185+
animation 0.5s ease-out 0s 1 headerSlideUp
186+
transform translateY(-100%)

0 commit comments

Comments
 (0)