+ <%_ if (theme.special) { _%>

Special Sponsor

- <% var specialSponsor = theme.special_sponsors[0]; %> - - Code.xyz Logo + <% var specialSponsor = theme.special[0]; %> +
+ <%_ } _%>
@@ -163,10 +167,11 @@ }) window.addEventListener('scroll', function () { - if (window.pageYOffset > 165 && !topScrolled) { + var offset = 20 + if (window.pageYOffset > offset && !topScrolled) { topScrolled = true document.getElementById('mobile-bar').classList.remove('top') - } else if (window.pageYOffset <= 165 && topScrolled) { + } else if (window.pageYOffset <= offset && topScrolled) { topScrolled = false document.getElementById('mobile-bar').classList.add('top') } diff --git a/themes/vue/layout/layout.ejs b/themes/vue/layout/layout.ejs index 1adeae6962..e2cfbcb80e 100644 --- a/themes/vue/layout/layout.ejs +++ b/themes/vue/layout/layout.ejs @@ -1,6 +1,6 @@ <% var isIndex = page.path === 'index.html' %> <% var isThemes = page.path === 'resources/themes.html' %> -<% var hasVueSchoolBanner = false %> +<% var hasVueSchoolBanner = true %> @@ -11,7 +11,7 @@ - + @@ -55,7 +55,7 @@ - + @@ -76,21 +76,14 @@ window.PAGE_TYPE = "<%- page.type %>" - - + + + - + <% if (hasVueSchoolBanner) { %> <%- partial('partials/vueschool_banner') %> @@ -129,14 +122,24 @@ var match = window.location.pathname.match(/^\/(v\d+)/) var version = match ? match[1] : 'v2' docsearch({ - appId: 'BH4D9OD16A', - apiKey: '85cc3221c9f23bfbaa4e3913dd7625ea', - indexName: 'vuejs', - inputSelector: selector, - algoliaOptions: { facetFilters: ["version:" + version] }, - autocompleteOptions: { hint: false, appendTo: 'body'} + appId: 'ML0LEBN7FQ', + apiKey: 'f49cbd92a74532cc55cfbffa5e5a7d01', + indexName: 'vuejs', + inputSelector: selector, + algoliaOptions: { facetFilters: ["version:" + version] }, + autocompleteOptions: { hint: false, appendTo: 'body'} }) }) + + // unregister service worker + if ('serviceWorker' in navigator) { + navigator.serviceWorker.getRegistrations().then(function(registrations) { + for(let registration of registrations) { + registration.unregister() + } + }) + } + diff --git a/themes/vue/layout/page.ejs b/themes/vue/layout/page.ejs index 31c280fa43..7ccbb38985 100644 --- a/themes/vue/layout/page.ejs +++ b/themes/vue/layout/page.ejs @@ -1,63 +1,57 @@ -<% if (page.type) { %> - <%- partial('partials/sidebar', { type: page.type === 'menu' ? 'guide' : page.type, index: page.index }) %> -<% } else { %> - +<% if (page.type) { %> <%- partial('partials/sidebar', { type: page.type === +'menu' ? 'guide' : page.type, index: page.index }) %> <% } else { %> + <% } %> -
-

- You’re browsing the documentation for v2.x and earlier. - For v3.x, click here. -

- - <% if (page.type) { %> - <% if (page.type === 'menu') { %> -
- -
- <%- partial('partials/toc', { type: 'guide' }) %> - <% } else { %> - <%- partial('partials/ad') %> +
+ <% if (page.type) { %> <% if (page.type === 'menu') { %> +
+ +
+ <%- partial('partials/toc', { type: 'guide' }) %> <% } else { %> <%- + partial('partials/ad') %> <% } %> <% } %> <% if (page.title.trim()) { %> +

<%- page.title %><%- page.type === 'examples' ? ' Example' : '' %>

+ <% } %> <% if (page.sponsors) { %> <%- partial('sponsors-page') %> <% } else + if (page.partners) { %> <%- partial('partners-page') %> <% } else if + (page.search) { %> <%- partial('search-page') %> <% } else { %> <%- + page.content %> <% } %> <% if (page.type === 'guide') { %> + <% } %>
diff --git a/themes/vue/layout/partials/ecosystem_dropdown.ejs b/themes/vue/layout/partials/ecosystem_dropdown.ejs index d7fc2d5889..f3e0f80d5a 100644 --- a/themes/vue/layout/partials/ecosystem_dropdown.ejs +++ b/themes/vue/layout/partials/ecosystem_dropdown.ejs @@ -19,15 +19,14 @@
  • News

  • diff --git a/themes/vue/layout/partials/header.ejs b/themes/vue/layout/partials/header.ejs index cf5faa5754..6d26110791 100644 --- a/themes/vue/layout/partials/header.ejs +++ b/themes/vue/layout/partials/header.ejs @@ -1,7 +1,10 @@
    - - Click here for v3.x documentation. + + Upgrade to Vue 3 + + | + Vue 2 EOL