Skip to content

[pull] master from vuejs:master #231

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

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
1b1bd3e
docs: a few improvements (#1040)
wenfangdu May 10, 2021
5943397
chore(deps): bump url-parse from 1.4.7 to 1.5.1 (#1046)
dependabot[bot] May 10, 2021
43d1ccf
docs: Update key-attribute.md (#1045)
Alex-Sokolov May 11, 2021
48dd23e
fix: set the font-weight for strong tags back to 600 (#1048)
skirtles-code May 11, 2021
6b0a492
fix: prevent CodePens from stealing focus and scrolling the page (#1047)
skirtles-code May 11, 2021
9c0ccea
docs: Russian translation (#1042)
Alex-Sokolov May 12, 2021
6de305a
docs: add automatic global registration to cookbook (#1041)
vilaboim May 12, 2021
c4efde2
Add onActivated and onDeacitvated hooks to the list (#1051)
connectkushal May 14, 2021
9b2628a
chore(deps): bump lodash from 4.17.20 to 4.17.21 (#1050)
dependabot[bot] May 14, 2021
1c3f103
docs: update recommended node version (#1053)
naokie May 15, 2021
4d43757
Add created hook to custom directives code example (#1054)
connectkushal May 16, 2021
8101503
Update custom-directives.md
NataliaTepluhina May 16, 2021
77c2c01
Update introduction.md (#1057)
NataliaTepluhina May 17, 2021
e465293
docs: elaborate on how style auto-prefixing works (#1062)
skirtles-code May 23, 2021
6730d26
fix: use method shorthands and switch indexOf to includes (#1061)
skirtles-code May 23, 2021
514943e
docs: add transition as root to the migration guide (#1067)
skirtles-code May 25, 2021
6672db1
docs: add installation notes about compiler-sfc and bundlers (#1068)
skirtles-code May 25, 2021
6efc0ce
Update custom-directive.md (#1058)
fanhefeng May 25, 2021
b8fc1e1
chore(deps): bump browserslist from 4.15.0 to 4.16.6 (#1069)
dependabot[bot] May 25, 2021
de8b55a
Fix: broken gif url (#1070)
VadymGulka May 26, 2021
42bb2a2
The description of `this` in setup is inconsistent with the source co…
coderwhy May 27, 2021
4aec4e4
chore(deps): bump dns-packet from 1.3.1 to 1.3.4 (#1074)
dependabot[bot] May 29, 2021
2b84763
Fix typo in render-function-api.md (#1076)
mrts Jun 2, 2021
9657a47
Update keep-alive hook documentation (#1075)
tylermercer Jun 2, 2021
9331a38
fix: json format quotation (#1071)
1sm23 Jun 4, 2021
b47a7e8
feature: add Vue 3 vueschool links (#964)
rahaug Jun 4, 2021
2cb2d87
Migration build (#1033)
NataliaTepluhina Jun 7, 2021
c9e28e3
3.1 Updates (#1078)
yyx990803 Jun 7, 2021
8fb147b
chore(deps): bump ws from 6.2.1 to 6.2.2 (#1081)
dependabot[bot] Jun 8, 2021
574fbc5
Add VueSchool Summer Sale banner (#1082)
nicodevs Jun 9, 2021
6b60199
chore: update partners contact info
yyx990803 Jun 9, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ export const repos = [
{ lang: 'ja', owner: 'vuejs-jp', repo: 'ja.vuejs.org', branch: 'lang-ja', url: 'https://v3.ja.vuejs.org/' },
{ lang: 'ko', owner: 'vuejs-kr', repo: 'docs-next', branch: 'rootKoKr', url: 'https://v3.ko.vuejs.org/' },
{ lang: 'pt-br', owner: 'vuejs-br', repo: 'docs-next', branch: 'master', url: 'https://vuejsbr-docs-next.netlify.app/' },
{ lang: 'ru', owner: 'translation-gang', repo: 'docs-next', branch: 'master' },
{ lang: 'ru', owner: 'translation-gang', repo: 'docs-next', branch: 'master', url: 'https://v3.ru.vuejs.org/' },
{ lang: 'zh-cn', owner: 'vuejs', repo: 'docs-next-zh-cn', branch: 'master', url: 'https://v3.cn.vuejs.org/' }
]
12 changes: 10 additions & 2 deletions src/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ const sidebar = {
children: [
'/cookbook/',
'/cookbook/editable-svg-icons',
'/cookbook/debugging-in-vscode'
'/cookbook/debugging-in-vscode',
'/cookbook/automatic-global-registration-of-base-components'
]
}
],
Expand Down Expand Up @@ -171,6 +172,7 @@ const sidebar = {
],
migration: [
'/guide/migration/introduction',
'/guide/migration/migration-build',
{
title: 'Details',
collapsable: false,
Expand Down Expand Up @@ -201,6 +203,7 @@ const sidebar = {
'/guide/migration/slots-unification',
'/guide/migration/suspense',
'/guide/migration/transition',
'/guide/migration/transition-as-root',
'/guide/migration/transition-group',
'/guide/migration/v-on-native-modifier-removed',
'/guide/migration/v-model',
Expand Down Expand Up @@ -434,6 +437,10 @@ module.exports = {
text: '日本語',
link: 'https://v3.ja.vuejs.org/'
},
{
text: 'Русский',
link: 'https://v3.ru.vuejs.org/'
},
{
text: 'More Translations',
link: '/guide/contributing/translations#community-translations'
Expand Down Expand Up @@ -468,7 +475,8 @@ module.exports = {
carbon: 'CEBDT27Y',
custom: 'CKYD62QM',
placement: 'vuejsorg'
}
},
topBanner: true
},
plugins: [
[
Expand Down
7 changes: 7 additions & 0 deletions src/.vuepress/public/images/vueschool/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions src/.vuepress/public/images/vueschool/vs-iso.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions src/.vuepress/public/images/vueschool/vs-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
165 changes: 165 additions & 0 deletions src/.vuepress/theme/components/BannerTop.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
<template>
<a id="vs" href="https://vueschool.io/sales/summer-vue?friend=vuejs" target="_blank" rel="noreferrer">
<div class="vs-iso">
<img src="/images/vueschool/vs-iso.svg">
</div>
<div class="vs-logo">
<img src="/images/vueschool/vs-logo.svg">
</div>
<div class="vs-core">
<div class="vs-backpack">
<img src="/images/vueschool/vs-backpack.png" alt="Backpack">
</div>
<div class="vs-slogan">
3-months Vue School for only $49 <span style="text-decoration: line-through">$75</span>!
<span class="vs-slogan-light">
Limited Time Offer
</span>
</div>
<div class="vs-button">
GET ACCESS
</div>
</div>
<div
id="vs-close"
class="vs-close"
@click.stop.prevent="$emit('close')">
<img src="/images/vueschool/close.svg" alt="Close">
</div>
</a>
</template>

<style lang="stylus">
@require '../styles/config'
$topBannerHeight ?= 5rem
$topBannerHeightMobile ?= 3.125rem

// Banner
#vs
align-items: center
background-color: #202A5A
box-sizing: border-box
color: #fff
display: none
font-family 'Inter', Roboto, Oxygen, Fira Sans, Helvetica Neue, sans-serif
justify-content: center
position: fixed
padding: 0 10px
left: 0
right: 0
top: 0
z-index: 100
height: $topBannerHeightMobile
@media (min-width: 680px)
height: $topBannerHeight
&:hover
.vs-core
.vs-button
background: #f22606

.vs-iso
display: none
position: absolute
left: 20px
height: 26px
img
height: 26px
@media (min-width: 680px)
display: inline-block
height: 40px
img
height: 40px
@media (min-width: 900px)
display: none

.vs-logo
position: absolute
display: none
left: 40px
@media (min-width: 900px)
display: block

.vs-core
display: flex
align-items: center

.vs-backpack
margin-right: 6px
@media (min-width: 680px)
margin-right: 14px
img
height: 50px
@media (min-width: 680px)
height: 74px

.vs-slogan
color: #FFF
font-weight: bold
font-size: 14px
margin-right: 26px
@media (min-width: 680px)
margin-right: 0
font-size: 18px
> .vs-slogan-light
color: #ff5338
display: block
text-align: left
@media (min-width: 900px)
text-align: center
display: inline

.vs-button
margin-left: 43px
color: #FFF
padding: 13px 24px
border-radius: 40px
display: none
background: #ff5338
font-weight: bold
@media (min-width: 680px)
display: inline-block

.vs-close
right: 10px
position: absolute
padding: 10px
@media (min-width: 680px)
right: 20px
&:hover
color: #56D8FF

/************************************/

// Show banner only if the container has class "has-top-banner"
.theme-container.has-top-banner
#vs
display: flex

// Add margin top to body, navbar and sidebar
.theme-container.has-top-banner
margin-top: $topBannerHeightMobile
.navbar
margin-top: $topBannerHeightMobile
.sidebar
margin-top: $topBannerHeightMobile
@media (min-width: 680px)
.theme-container.has-top-banner
margin-top: $topBannerHeight
.navbar
margin-top: $topBannerHeight
.sidebar
margin-top: $topBannerHeight

// Adjust titles margin and padding for anchor links
.theme-container.has-top-banner
{$contentClass}:not(.custom)
h1, h2, h3, h4, h5, h6
margin-top (0.5rem - $topBannerHeight - $navbarHeight)
padding-top ($navbarHeight + $topBannerHeight + 1rem)
@media (min-width: 680px)
.theme-container.has-top-banner
{$contentClass}:not(.custom)
h1, h2, h3, h4, h5, h6
margin-top (0.5rem - $topBannerHeightMobile - $navbarHeight)
padding-top ($navbarHeight + $topBannerHeightMobile + 1rem)
</style>
15 changes: 14 additions & 1 deletion src/.vuepress/theme/layouts/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
@touchstart="onTouchStart"
@touchend="onTouchEnd"
>
<BannerTop v-if="showTopBanner" @close="closeBannerTop" />

<Navbar v-if="shouldShowNavbar" @toggle-sidebar="toggleSidebar" />

<div class="sidebar-mask" @click="toggleSidebar(false)" />
Expand Down Expand Up @@ -50,6 +52,7 @@ import Page from '@theme/components/Page.vue'
import Sidebar from '@theme/components/Sidebar.vue'
import BuySellAds from '@theme/components/BuySellAds.vue'
import CarbonAds from '@theme/components/CarbonAds.vue'
import BannerTop from '@theme/components/BannerTop.vue'
import { resolveSidebarItems } from '../util'

export default {
Expand All @@ -60,12 +63,14 @@ export default {
Page,
Sidebar,
Navbar,
BannerTop,
BuySellAds,
CarbonAds
},

data() {
return {
showTopBanner: false,
isSidebarOpen: false
}
},
Expand Down Expand Up @@ -110,7 +115,8 @@ export default {
{
'no-navbar': !this.shouldShowNavbar,
'sidebar-open': this.isSidebarOpen,
'no-sidebar': !this.shouldShowSidebar
'no-sidebar': !this.shouldShowSidebar,
'has-top-banner': this.showTopBanner
},
userPageClass
]
Expand All @@ -125,9 +131,16 @@ export default {
this.$router.afterEach(() => {
this.isSidebarOpen = false
})

this.showTopBanner = !localStorage.getItem('VS_SUMMER_BANNER_CLOSED')
},

methods: {
closeBannerTop () {
this.showTopBanner = false
localStorage.setItem('VS_SUMMER_BANNER_CLOSED', 1)
},

toggleSidebar(to) {
this.isSidebarOpen = typeof to === 'boolean' ? to : !this.isSidebarOpen
this.$emit('toggle-sidebar', this.isSidebarOpen)
Expand Down
2 changes: 1 addition & 1 deletion src/.vuepress/theme/styles/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ ul, ol
padding-left 1.2em

strong
font-weight 500
font-weight 600

h1, h2, h3, h4, h5, h6
font-weight 500
Expand Down
Loading