Skip to content

Commit

Permalink
resolving conflicts (#48)
Browse files Browse the repository at this point in the history
* Revert "Add Vue Toronto banner - schedule 2 (#2536)" (#2553)

This reverts commit 71ecfd5.

* Remove the app constant name from the method name (#2523)

* Remove the app variable name from the method name

To be consitent with the rest of the guide, it should be displayed the method name (with the dot accessor)
i.e.: https://vuejs.org/guide/essentials/application.html#mounting-the-app

* remove app const name from method

* Update rules-recommended.md (#2540)

docs: add missing div to seperate bad and good examples

* Update events.md - Diff between Options API and Composition API text (#2550)

* Update events.md - Diff between Options API and Composition API text

The emits support for object sintax for Options API text was displayed for both, Options and Composition API.

* Update events.md - in span instead of repeat code in different divs

* Update events.md - fix options-api class

* Update src/guide/components/events.md

Co-authored-by: Natalia Tepluhina <[email protected]>

---------

Co-authored-by: Natalia Tepluhina <[email protected]>

* Add missing ':' on duration property (#2556)

* docs: consistent colons in input labels (#2557)

* docs: consistent colons in input labels

* Update colons everywhere

* docs: use useByRole in example and fix typos (#2559)

getByRole validates the role of an element, giving us an extra free assertion

https://testing-library.com/docs/queries/about/#priority

* chore(deps): bump @vue/theme from 2.2.4 to 2.2.5 (#2555)

Bumps [@vue/theme](https://github.com/vuejs/theme) from 2.2.4 to 2.2.5.
- [Commits](https://github.com/vuejs/theme/commits/v2.2.5)

---
updated-dependencies:
- dependency-name: "@vue/theme"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix `watch` examples (#2537)

* Add note to `watch` examples

* fix watch examples

* fix: fixed disabling an input

---------

Co-authored-by: NataliaTepluhina <[email protected]>

* imported and changed twitter icon to new logo (#2548)

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Evan You <[email protected]>
Co-authored-by: Leo <[email protected]>
Co-authored-by: Jérémie LITZLER <[email protected]>
Co-authored-by: Natalia Tepluhina <[email protected]>
Co-authored-by: cabbageshop <[email protected]>
Co-authored-by: Andrew <[email protected]>
Co-authored-by: Yakir Gottesman <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jun Shindo <[email protected]>
Co-authored-by: stevenks17 <[email protected]>
  • Loading branch information
11 people authored Nov 5, 2023
1 parent 5999348 commit f81294b
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 118 deletions.
4 changes: 2 additions & 2 deletions .vitepress/inlined-scripts/restorePreference.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
restore('vue-docs-prefer-composition', 'prefer-composition', true)
restore('vue-docs-prefer-sfc', 'prefer-sfc', true)

window.__VUE_BANNER_ID__ = 'vt2023-2'
restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed')
// window.__VUE_BANNER_ID__ = ''
// restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed')
})()
88 changes: 13 additions & 75 deletions .vitepress/theme/components/Banner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,16 @@ function dismiss() {

<template>
<div class="banner" v-if="open">
<p class="vt-banner-text">
<span class="vt-text-primary">VueConf Toronto</span>
<span class="vt-tagline"> - Join the premier Vue.js conference</span>
| 9-10 Nov 2023 <span class="vt-place"> - Toronto, Canada</span>
<a
target="_blank"
class="vt-primary-action"
href="https://vuetoronto.com/schedule?utm_source=vuejs&utm_content=top_banner"
>
<span class="vt-time-now">View</span> Schedule
</a>
</p>
<a target="_blank"></a>
<button @click="dismiss">
<VTIconPlus class="close" />
</button>
<p class="vt-banner-text vt-coupon">
<span class="vt-text-primary">Use code</span> VUEJS
<span class="vt-text-primary">to get 15% off</span>
</p>
</div>
</template>

<style>
html:not(.banner-dismissed) {
--vt-banner-height: 60px;
--vt-banner-height: 30px;
}
</style>

Expand All @@ -65,10 +50,12 @@ html:not(.banner-dismissed) {
font-weight: 600;
color: #fff;
background-color: var(--vt-c-green);
background: #11252b;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(
90deg,
rgba(66, 184, 131, 1) 0%,
rgba(39, 179, 137, 1) 19%,
rgba(100, 126, 255, 1) 100%
);
}
.banner-dismissed .banner {
Expand All @@ -83,7 +70,7 @@ button {
position: absolute;
right: 0;
top: 0;
padding: 20px 10px;
padding: 5px;
}
.close {
Expand All @@ -92,59 +79,10 @@ button {
fill: #fff;
transform: rotate(45deg);
}
.vt-banner-text {
color: #fff;
font-size: 16px;
}
.vt-text-primary {
color: #75c05e;
}
.vt-primary-action {
background: #75c05e;
color: #121c1a;
padding: 8px 15px;
border-radius: 5px;
font-size: 14px;
text-decoration: none;
margin: 0 20px;
font-weight: bold;
}
.vt-primary-action:hover {
text-decoration: none;
background: #5a9f45;
}
@media (max-width: 1280px) {
.banner .vt-banner-text {
font-size: 14px;
}
.vt-tagline {
display: none;
}
}
@media (max-width: 780px) {
.vt-tagline {
display: none;
}
.vt-coupon {
display: none;
}
.vt-primary-action {
margin: 0 10px;
padding: 7px 10px;
}
.vt-time-now {
display: none;
}
}
@media (max-width: 560px) {
.vt-place {
/*
@media (max-width: 720px) {
a > span {
display: none;
}
}
} */
</style>
4 changes: 2 additions & 2 deletions .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import {
} from './components/preferences'
import SponsorsAside from './components/SponsorsAside.vue'
import VueSchoolLink from './components/VueSchoolLink.vue'
import Banner from './components/Banner.vue'
// import Banner from './components/Banner.vue'
// import TextAd from './components/TextAd.vue'

export default Object.assign({}, VPTheme, {
Layout: () => {
// @ts-ignore
return h(VPTheme.Layout, null, {
banner: () => h(Banner),
// banner: () => h(Banner),
'sidebar-top': () => h(PreferenceSwitch),
'aside-mid': () => h(SponsorsAside)
})
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/about/team/TeamMember.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
VTIconLink,
VTIconLinkedIn,
VTIconMapPin,
VTIconTwitter,
VTIconX,
VTLink
} from '@vue/theme'
import type { Member } from './Member'
Expand Down Expand Up @@ -146,7 +146,7 @@ const avatarUrl = computed(() => {
:href="`https://twitter.com/${member.socials.twitter}`"
:no-icon="true"
>
<VTIconTwitter class="social-icon" />
<VTIconX class="social-icon" />
</VTLink>
</li>
<li v-if="member.socials.linkedin" class="social-item">
Expand Down
12 changes: 6 additions & 6 deletions src/guide/best-practices/accessibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ watch(
برای هر یک از فیلدها، یک لیبل (label) تعریف کنید تا مشخص شود آن فیلد برای چه منظوری استفاده می‌شود. سپس، ویژگی `id` را برای فیلد و ویژگی `for` را برای لیبل تعریف کنید و مقادیر آن‌ها را برابر هم قرار دهید تا بین لیبل و فیلد ارتباط برقرار شود.

```vue-html
<label for="name">Name</label>
<label for="name">Name: </label>
<input type="text" name="name" id="name" v-model="name" />
```

Expand Down Expand Up @@ -191,7 +191,7 @@ watch(
همچنین می‌توانید با استفاده از [`aria-label`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label) به input نام دسترس‌پذیر بدهید.

```vue-html
<label for="name">Name</label>
<label for="name">Name: </label>
<input
type="text"
name="name"
Expand Down Expand Up @@ -220,7 +220,7 @@ watch(
>
<h1 id="billing">Billing</h1>
<div class="form-item">
<label for="name">Name:</label>
<label for="name">Name: </label>
<input
type="text"
name="name"
Expand Down Expand Up @@ -250,7 +250,7 @@ watch(
>
<h1 id="billing">Billing</h1>
<div class="form-item">
<label for="name">Full Name:</label>
<label for="name">Full Name: </label>
<input
type="text"
name="name"
Expand Down Expand Up @@ -330,7 +330,7 @@ watch(
```vue-html
<fieldset>
<legend>Using aria-labelledby</legend>
<label id="date-label" for="date">Current Date:</label>
<label id="date-label" for="date">Current Date: </label>
<input
type="date"
name="date"
Expand All @@ -346,7 +346,7 @@ watch(
```vue-html
<fieldset>
<legend>Using aria-describedby</legend>
<label id="dob" for="dob">Date of Birth:</label>
<label id="dob" for="dob">Date of Birth: </label>
<input type="date" name="dob" id="dob" aria-describedby="dob-instructions" />
<p id="dob-instructions">MM/DD/YYYY</p>
</fieldset>
Expand Down
2 changes: 1 addition & 1 deletion src/guide/built-ins/transition.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ In such cases you can specify an explicit transition duration (in milliseconds)

<NestedTransitions />

[Try it in the Playground](https://play.vuejs.org/#eNqVVMtu2zAQ/JWtekjiRo80cIGoStCil3yADy2gC02tJCIUKZCUncDwv3cpyrbstmgLGxC53J2ZnaW0i772fbIZMMqjwnIjegcW3dA/lUp0vTYOdmCwhj3URndwRalXpSoV18pSaqu38OgTrp0Z8KZURRpQqJ42DrteMoe0AyjWg3NawRcuBX95LKOp+p1/ltHTSjeNxCINaaFkZZiywgkqqwbD/IIKl8usjECxDmmj0DqsqN4XUEklNrCJRT0RUCKXzFra6sGhOSZOqYdDodTpsHT+94xS6mNyStkHjuO6SE8KKVCks45pa92b9MtkpL6FZGSBHR26NeMvjdGDqnJ4j4ifPV7PqkqoJof7rH8dI51QcYuiaV0Od1mI7v0BoU5otAQ4g+Ocz9KCQzEq0hAz7sQGScoUlcg2OEWDMHfsKAcmJWTJvQVkFmOSQo0E5HQBFUr2BiMA6Jq0G6IAlNj55yI9UV+SAJxI4hEmJ5qPSxuwLzX7q3d7ieb0DKnWpsvD0rv/49r7dzMaqHvGhfMEB3CSvkXgTFF7Vs+kQCA4tGBhsDSMQ9RSmDtt7Flrc1en+f4i9ex0mtd/ujzSeJfPJf5NyuVE/9HsPzVCnp9wf2/995n16WK8ge6Z7iaw8XICg28tMSA8fIL10IBQ0DJVyZnR08RmFtkkvHirVligv9KOkrGiZKrXriVFa6O3Fmk62hwpHj7Als4QKMOzBZSWWVgjKqjFK1YjtLdxflWSLLsL9tAHbXyJo/1PJETL1g==)
[Try it in the Playground](https://play.vuejs.org/#eNqVVd9v0zAQ/leO8LAfrE3HNKSFbgKmSYMHQNAHkPLiOtfEm2NHttN2mvq/c7bTNi1jgFop9t13d9995ziPyfumGc5bTLJkbLkRjQOLrm2uciXqRhsHj2BwBiuYGV3DAUEPcpUrrpUlaKUXcOkBh860eJSrcRqzUDxtHNaNZA5pBzCets5pBe+4FPz+Mk+66Bf+mSdXE12WEsdphMWQiWHKCicoLCtaw/yKIs/PR3kCitVIG4XWYUEJfATFFGIO84GYdRUIyCWzlra6dWg2wA66dgqlts7c+d8tSqk34JTQ6xqb9TjdUiTDOO21TFvrHqRfDkPpExiGKvBITjdl/L40ulVFBi8R8a3P17CiEKrM4GzULIOlFmpQoSgrl8HpKFpX3kFZu2y0BNhJxznvwaJCA1TEYcC4E3MkKp1VIptjZ43E3KajDJiUMBqeWUBmcUBUqJGYOT2GAiV7gJAA9Iy4GyoBKLH2z+N0W3q/CMC2yCCkyajM63Mbc+9z9mfvZD+b071MM23qLC69+j8PvX5HQUDdMC6cL7BOTtQXCJwpas/qHhWIBdYtWGgtDWNttWTmThu701pf1W6+v1Hd8Xbz+k+VQxmv8i7Fv1HZn+g/iv2nRkjzbd6npf/Rkz49DifQ3dLZBBYOJzC4rqgCwsUbmLYlCAUVU4XsCd1NrCeRHcYXb1IJC/RX2hEYCwJTvHYVMZoavbBI09FmU+LiFSzIh0AIXy1mqZiFKaKCmVhiEVJ7GftHZTganUZ56EYLL3FykjhL195MlMM7qxXdmEGDPOG6boRE86UJVPMki+p4H01WLz4Fm78hSdBo5xXy+yfsd3bpbXny1SA1M8c82fgcMyW66L75/hmXtN44a120ktDPOL+h1bL1HCPsA42DaPdwge3HcO/TOCb2ZumQJtA15Yl65Crg84S+BdfPtL6lezY8C3GkZ7L6Bc1zNR0=)

If necessary, you can also specify separate values for enter and leave durations using an object:

Expand Down
2 changes: 1 addition & 1 deletion src/guide/components/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export default {

</div>

گزینه `emits` همچنین از یک نحو شی(object syntax) پشتیبانی می‌کند، که به ما اجازه می‌دهد اعتبار سنجی محموله(payload) رویدادهای اِمیت شده را در زمان اجرا (runtime) فراهم کنیم:
گزینه `emits` و ماکرو `defineEmits()‎` همچنین از syntax شیء پشتیبانی می‌کنند که به ما اجازه می‌دهد payload رویدادهای ارسال شده را در زمان اجرا Validate کنیم:

<div class="composition-api">

Expand Down
4 changes: 2 additions & 2 deletions src/guide/components/registration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A Vue component needs to be "registered" so that Vue knows where to locate its i

## Global Registration {#global-registration}

We can make components available globally in the current [Vue application](/guide/essentials/application) using the `app.component()` method:
We can make components available globally in the current [Vue application](/guide/essentials/application) using the `.component()` method:

```js
import { createApp } from 'vue'
Expand All @@ -33,7 +33,7 @@ import MyComponent from './App.vue'
app.component('MyComponent', MyComponent)
```

The `app.component()` method can be chained:
The `.component()` method can be chained:

```js
app
Expand Down
20 changes: 14 additions & 6 deletions src/guide/essentials/watchers.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ export default {
data() {
return {
question: '',
answer: 'سوالی که مینویسید باید شامل علامت سوال(?) باشد.'
answer: 'سوالی که مینویسید باید شامل علامت سوال(?) باشد.',
loading: false
}
},
watch: {
Expand All @@ -28,12 +29,15 @@ export default {
},
methods: {
async getAnswer() {
this.loading = true
this.answer = 'درحال فکر کردن...'
try {
const res = await fetch('https://yesno.wtf/api')
this.answer = (await res.json()).answer
} catch (error) {
this.answer = 'خطا! دسترسی به لینک ممکن نیست. ' + error
} finally {
this.loading = false
}
}
}
Expand All @@ -43,12 +47,12 @@ export default {
```vue-html
<p>
یک سوال بله/خیر بپرسید:
<input v-model="question" />
<input v-model="question" :disabled="loading" />
</p>
<p>{{ answer }}</p>
```

[امتحان کنید](https://play.vuejs.org/#eNptUk2PmzAQ/SuvXAA1sdVrmt0qqnroqa3UIxcLhuCGjKk/wkYR/70OBJLuroRkPDPvzbznuSS7rhOnQMkm2brS6s4/F0wvnbEeFd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ys9aoUu6Av7WqoNWO5rhsh0fxownplbBqhjJEmuv0WbN2UDNtDMRXm+zfsz/bY2TL2SH1Ec8CMTZjjhqaxh7e/v+ORvieQqvaSvN8Bf6HV0veSdG5fvSoo7Su/kO1D3f13SKInuz06VHYsahzzfl0yRj+s+3dKn9O9TW7HPrPLP624lFU=)

گزینه `watch` از پراپرتی های تو در تو یک آبجکت هم پشتیبانی می کند.

Expand All @@ -75,15 +79,19 @@ import { ref, watch } from 'vue'
const question = ref('')
const answer = ref('سوالی که مینویسید باید شامل علامت سوال(?) باشد.')
const loading = ref(false)
watch(question, async (newQuestion, oldQuestion) => {
if (newQuestion.indexOf('?') > -1) {
if (newQuestion.includes('?')) {
loading.value = true
answer.value = 'درحال فکر کردن...'
try {
const res = await fetch('https://yesno.wtf/api')
answer.value = (await res.json()).answer
} catch (error) {
answer.value = 'خطا! دسترسی به لینک ممکن نیست. ' + error
} finally {
loading.value = false
}
}
})
Expand All @@ -92,13 +100,13 @@ watch(question, async (newQuestion, oldQuestion) => {
<template>
<p>
یک سوال بله/خیر بپرسید:
<input v-model="question" />
<input v-model="question" :disabled="loading" />
</p>
<p>{{ answer }}</p>
</template>
```

[ امتحان کنید ](https://play.vuejs.org/#eNplkkGPmzAQhf/KKxdA3Rj1mpJUUdVDT22lHrlYxDRuYOzaJjRC/PcdxyGr3b2A7PfmmzcMc3awVlxGlW2z2rdO2wCvwmj3DenBGhcww6nuCZMM7QkLOmcG5FyRN9RQa8gH/BuVD9oQdtFb5Hm5KpL8pNx6/+vu8xj9KPv+CnYFqQnyhTFIdxb4vCkjpaFb32JVnyD9lVoUpKaVVmK3x9wQoLtXgtB0VP9/cOMveYk9Np/K5MM9l7jIflScLv990nTW9EcIwXNFR3DX1YwYk4dxyrNXTlIHdCrGyk8hWL+tqqvyZMQUukpaHYOnujdtilTLHPHXGyrKUiRH8i9obx+5UM4Z98j6Pu23qH/AVzP2R5CJRMl14aRw+PldIMdH3Bh3bnzxY+FcdZW2zPvlQ1CD7WVQfALquPToP/gzL4RHqsg89rJNWq3JjgGXzWCOqt812ao3GaqEqRKHcfO8/gDLkq7r6tEyW54Bf5TTlg==)
[ امتحان کنید ](https://play.vuejs.org/#eNp9U8Fy0zAQ/ZVFF9tDah96C2mZ0umhHKBAj7oIe52oUSQjyXEyGf87KytyoDC9JPa+p+e3b1cndtd15b5HtmQrV1vZeXDo++6Wa7nrjPVwAovtAgbh6w2M0Fqzg4xOZFxzXRvtPPzq0XlpNNwEbp5lRUKEdgPaVP925jnoXS+UOgKxvJAaxEVjJ+y2hA9XxUVFGdFIvT7LtEI5JIzrqjrbGozdOmikxdqTKqmIQOV6gvOkvQDhjrqGXOOQvCzAqCa9FHBzCyeuAWT7F6uUulZ9gy7PPmZFETmQjJV7oXoke972GJHY+Axkzxupt4FalhRcYHh7TDIQcqA+LTriikFIDy0G59nG+84tq+qITpty8G0lOhmSiedefSaPZ0mnfHFG50VRRkbkj1BPceVorbFzF/+6fQj4O7g3vWpAm6Ao6JzfINw9PZaQwXuYNJJuK/U0z1nxdTLT0M7s8Ec/I3WxquLS0brRi8ddp4RHegNYhR0M/Du3pXFSAJU285osI7aSuus97K92pkF1w1nCOYNlI534qbCh8tkOVasoXkV1+sjplLZ0HGN5Vc1G2IJ5R8Np5XpKlK7J1CJntdl1UqH92k0bzdkyNc8ZRWGGz1MtbMQi1esN1tv/1F/cIdQ4e6LJod0jZzPmhV2jj/DDjy94oOcZpK57Rew3wO/ojOpjJIH2qdcN2f6DN7l9nC47RfTsHg4etUtNpZUeJz5ndPPv32j9Yve6vE6DZuNvu1R2Tg==)

### انواع منابع نظارتی{#watch-source-types}

Expand Down
Loading

0 comments on commit f81294b

Please sign in to comment.