Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to universal header ids #385

Merged
merged 3 commits into from
Nov 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 12 additions & 24 deletions docs/.vuepress/components/HomePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@
</h3>
<ul>
<li>
<router-link :to="content['page-home-section-use-item-one-link']" class="black">
<router-link :to="content['path'] + 'use/#1-use-an-application-built-on-ethereum'" class="black">
{{content['page-home-section-use-item-one']}}
</router-link>
</li>
<li>
<router-link :to="content['page-home-section-use-item-two-link']" class="black">
<router-link :to="content['path'] + 'use/#2-what-is-eth-and-how-do-i-get-it'" class="black">
{{content['page-home-section-use-item-two']}}
</router-link>
</li>
<li>
<router-link :to="content['page-home-section-use-item-three-link']" class="black">
<router-link :to="content['path'] + 'use/#3-what-is-a-wallet-and-which-one-should-i-use'" class="black">
{{content['page-home-section-use-item-three']}}
</router-link>
</li>
Expand All @@ -65,17 +65,17 @@
</h3>
<ul>
<li>
<router-link :to="content['page-home-section-learn-item-one-link']" class="black">
<router-link :to="content['path'] + 'learn/#ethereum-basics'" class="black">
{{content['page-home-section-learn-item-one']}}
</router-link>
</li>
<li>
<router-link :to="content['page-home-section-learn-item-two-link']" class="black">
<router-link :to="content['path'] + 'learn/#how-ethereum-works'" class="black">
{{content['page-home-section-learn-item-two']}}
</router-link>
</li>
<li>
<router-link :to="content['page-home-section-learn-item-three-link']" class="black">
<router-link :to="content['path'] + 'learn/#eth-2-0'" class="black">
{{content['page-home-section-learn-item-three']}}
</router-link>
</li>
Expand All @@ -90,17 +90,17 @@
</h3>
<ul>
<li>
<router-link :to="content['page-home-section-developers-item-one-link']" class="black">
<router-link :to="content['path'] + 'developers/#getting-started'" class="black">
{{content['page-home-section-developers-item-one']}}
</router-link>
</li>
<li>
<router-link :to="content['page-home-section-developers-item-two-link']" class="black">
<router-link :to="content['path'] + 'developers/#smart-contract-languages'" class="black">
{{content['page-home-section-developers-item-two']}}
</router-link>
</li>
<li>
<router-link :to="content['page-home-section-developers-item-three-link']" class="black">
<router-link :to="content['path'] + 'developers/#developer-tools'" class="black">
{{content['page-home-section-developers-item-three']}}
</router-link>
</li>
Expand All @@ -115,17 +115,17 @@
</h3>
<ul>
<li>
<router-link :to="content['page-home-section-enterprise-item-one-link']" class="black">
<router-link :to="content['path'] + 'enterprise/#why-enterprise-ethereum'" class="black">
{{content['page-home-section-enterprise-item-one']}}
</router-link>
</li>
<li>
<router-link :to="content['page-home-section-enterprise-item-two-link']" class="black">
<router-link :to="content['path'] + 'enterprise/#enterprise-features'" class="black">
{{content['page-home-section-enterprise-item-two']}}
</router-link>
</li>
<li>
<router-link :to="content['page-home-section-enterprise-item-three-link']" class="black">
<router-link :to="content['path'] + 'enterprise/#enterprise-developer-community'" class="black">
{{content['page-home-section-enterprise-item-three']}}
</router-link>
</li>
Expand Down Expand Up @@ -155,31 +155,19 @@
'page-home-section-use-item-one': translate('page-home-section-use-item-one', this.$lang),
'page-home-section-use-item-two': translate('page-home-section-use-item-two', this.$lang),
'page-home-section-use-item-three': translate('page-home-section-use-item-three', this.$lang),
'page-home-section-use-item-one-link': translate('page-home-section-use-item-one-link', this.$lang),
'page-home-section-use-item-two-link': translate('page-home-section-use-item-two-link', this.$lang),
'page-home-section-use-item-three-link': translate('page-home-section-use-item-three-link', this.$lang),
'page-home-section-learn-title': translate('page-home-section-learn-title', this.$lang),
'page-home-section-learn-item-one': translate('page-home-section-learn-item-one', this.$lang),
'page-home-section-learn-item-two': translate('page-home-section-learn-item-two', this.$lang),
'page-home-section-learn-item-three': translate('page-home-section-learn-item-three', this.$lang),
'page-home-section-learn-item-one-link': translate('page-home-section-learn-item-one-link', this.$lang),
'page-home-section-learn-item-two-link': translate('page-home-section-learn-item-two-link', this.$lang),
'page-home-section-learn-item-three-link': translate('page-home-section-learn-item-three-link', this.$lang),
'page-home-section-developers-title': translate('page-home-section-developers-title', this.$lang),
'page-home-section-developers-item-one': translate('page-home-section-developers-item-one', this.$lang),
'page-home-section-developers-item-two': translate('page-home-section-developers-item-two', this.$lang),
'page-home-section-developers-item-three': translate('page-home-section-developers-item-three', this.$lang),
'page-home-section-enterprise-title': translate('page-home-section-enterprise-title', this.$lang),
'page-home-section-developers-item-one-link': translate('page-home-section-developers-item-one-link', this.$lang),
'page-home-section-developers-item-two-link': translate('page-home-section-developers-item-two-link', this.$lang),
'page-home-section-developers-item-three-link': translate('page-home-section-developers-item-three-link', this.$lang),
'page-home-section-enterprise-title': translate('page-home-section-enterprise-title', this.$lang),
'page-home-section-enterprise-item-one': translate('page-home-section-enterprise-item-one', this.$lang),
'page-home-section-enterprise-item-two': translate('page-home-section-enterprise-item-two', this.$lang),
'page-home-section-enterprise-item-three': translate('page-home-section-enterprise-item-three', this.$lang),
'page-home-section-enterprise-item-one-link': translate('page-home-section-enterprise-item-one-link', this.$lang),
'page-home-section-enterprise-item-two-link': translate('page-home-section-enterprise-item-two-link', this.$lang),
'page-home-section-enterprise-item-three-link': translate('page-home-section-enterprise-item-three-link', this.$lang)
}
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ exports[`HomePage render successfully with Deutsch 1`] = `
<li>
<router-link-stub
class="black"
to="/de/use/#_1-eine-auf-ethereum-basierende-anwendung-verwenden"
to="/de/use/#1-use-an-application-built-on-ethereum"
>

Was kann ich schon heute mit Ethereum tun?
Expand All @@ -108,7 +108,7 @@ exports[`HomePage render successfully with Deutsch 1`] = `
<li>
<router-link-stub
class="black"
to="/de/use/#_2-was-ist-eth-und-wie-bekomme-ich-es"
to="/de/use/#2-what-is-eth-and-how-do-i-get-it"
>

Wie komme ich an Ether?
Expand All @@ -119,7 +119,7 @@ exports[`HomePage render successfully with Deutsch 1`] = `
<li>
<router-link-stub
class="black"
to="/de/use/#_3-was-ist-eine-wallet-und-welche-sollte-ich-verwenden"
to="/de/use/#3-what-is-a-wallet-and-which-one-should-i-use"
>

Was ist eine Wallet?
Expand Down Expand Up @@ -150,7 +150,7 @@ exports[`HomePage render successfully with Deutsch 1`] = `
<li>
<router-link-stub
class="black"
to="/de/learn/#ethereum-grundlagen"
to="/de/learn/#ethereum-basics"
>

Die Ethereum-Grundlagen
Expand All @@ -161,7 +161,7 @@ exports[`HomePage render successfully with Deutsch 1`] = `
<li>
<router-link-stub
class="black"
to="/de/learn/#wie-ethereum-funktioniert"
to="/de/learn/#how-ethereum-works"
>

Wie Ethereum funktioniert
Expand Down Expand Up @@ -203,7 +203,7 @@ exports[`HomePage render successfully with Deutsch 1`] = `
<li>
<router-link-stub
class="black"
to="/de/developers/#erste-schritte"
to="/de/developers/#getting-started"
>

Erste Schritte
Expand All @@ -214,7 +214,7 @@ exports[`HomePage render successfully with Deutsch 1`] = `
<li>
<router-link-stub
class="black"
to="/de/developers/#smart-contract-sprachen"
to="/de/developers/#smart-contract-languages"
>

Lerne Smart Contracts zu programmieren
Expand All @@ -225,7 +225,7 @@ exports[`HomePage render successfully with Deutsch 1`] = `
<li>
<router-link-stub
class="black"
to="/de/developers/#entwicklertools"
to="/de/developers/#developer-tools"
>

Finde die neuesten Entwickler-Tools
Expand Down Expand Up @@ -337,7 +337,7 @@ exports[`HomePage show enterprise with en-US 1`] = `
<li>
<router-link-stub
class="black"
to="/use/#_1-use-an-application-built-on-ethereum"
to="/use/#1-use-an-application-built-on-ethereum"
>

What can I do with Ethereum today?
Expand All @@ -348,7 +348,7 @@ exports[`HomePage show enterprise with en-US 1`] = `
<li>
<router-link-stub
class="black"
to="/use/#_2-what-is-eth-and-how-do-i-get-it"
to="/use/#2-what-is-eth-and-how-do-i-get-it"
>

How do I get Ether?
Expand All @@ -359,7 +359,7 @@ exports[`HomePage show enterprise with en-US 1`] = `
<li>
<router-link-stub
class="black"
to="/use/#_3-what-is-a-wallet-and-which-one-should-i-use"
to="/use/#3-what-is-a-wallet-and-which-one-should-i-use"
>

What's a wallet?
Expand Down
9 changes: 0 additions & 9 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@ const { renderHeaderWithExplicitAnchor } = require('./theme/utils/markdown');

module.exports = {
title: 'Ethereum',
themeConfig: {
nav: [
{ text: translate('page-home'), link: '/' },
{ text: translate('page-beginners'), link: '/beginners/' },
{ text: translate('page-use'), link: '/use/' },
{ text: translate('page-learn'), link: '/learn/' },
{ text: translate('page-developers'), link: '/developers/' }
]
},
head: [
[
'meta',
Expand Down
2 changes: 1 addition & 1 deletion docs/.vuepress/theme/components/DropdownLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export default {
@media (min-width: $MQMobile)
.dropdown-wrapper
height 1.8rem
width 8.5rem
width 9.5rem
&:hover .nav-dropdown
// override the inline style.
display flex !important
Expand Down
57 changes: 49 additions & 8 deletions docs/.vuepress/theme/components/__tests__/Footer.spec.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,53 @@
import { shallowMount } from '@vue/test-utils'
import Footer from "@/theme/components/Footer"
import { shallowMount } from '@vue/test-utils';
import Footer from '@/theme/components/Footer';

describe('Footer', () => {
// TODO test lastUpdatedDate
test('render successfully', () => {
const mocks = {
$site: {
pages: [
{
path: '/learn/',
title: 'Learn Ethereum',
lastUpdated: 1573079934862
},
{
path: '/developers/',
title: 'Developers Resources',
lastUpdated: 1573079934865
},
{
path: '/enterprise/',
title: 'Ethereum for Enterprise',
lastUpdated: 1573079934863
}
],
themeConfig: {
searchMaxSuggestions: 5
},
locales: {
'/': {
nav: [
{
items: ['en-US', 'en-GB'],
link: '/'
}
]
},
'/de/': {
nav: 'de',
link: '/de/'
}
}
},
$localePath: '/',
$router: []
};
const wrapper = shallowMount(Footer, {
stubs: ['router-link']
})
expect(wrapper.element).toMatchSnapshot()
})
})

stubs: ['router-link'],
mocks
});
expect(wrapper.element).toMatchSnapshot();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ exports[`Footer render successfully 1`] = `

</div>

<p
class="updated-date"
>
Website last updated: Nov 06, 2019
</p>

<ul>
<li>
<a
Expand Down
Loading