]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
docs: update layout for ad
authorEduardo San Martin Morote <posva13@gmail.com>
Fri, 6 Nov 2020 17:47:22 +0000 (18:47 +0100)
committerEduardo San Martin Morote <posva13@gmail.com>
Fri, 6 Nov 2020 17:47:22 +0000 (18:47 +0100)
docs/.vitepress/config.js
docs/.vitepress/theme/Layout.vue
docs/.vitepress/theme/components/CarbonAds.vue
docs/.vitepress/theme/index.js
docs/guide/advanced/meta.md
docs/guide/index.md
docs/index.md
docs/introduction.md [new file with mode: 0644]
docs/public/logo.png [new file with mode: 0644]
patches/vite+1.0.0-rc.4.patch [deleted file]

index c95e449707cd130fc8822ce6a0c17459a77368c5..35f5b19ba486b9425c59eb9296e9e2ff274dad74 100644 (file)
@@ -78,7 +78,7 @@ const config = {
         sidebar: [
           {
             text: 'Introduction',
-            link: '/',
+            link: '/introduction.html',
           },
           {
             text: 'Installation',
index df492df779e52e73ba387d7f867309b9d7a02264..aee1a8ab726dca70fbb9b6899f3a66014c001875 100644 (file)
@@ -3,7 +3,7 @@
     <template #navbar-search>
       <AlgoliaSearchBox :options="$site.themeConfig.algolia" />
     </template>
-    <template #sidebar-top>
+    <template #page-top>
       <CarbonAds
         v-if="$site.themeConfig.carbonAds"
         :key="'carbon' + $page.path"
index 706ae7dc9c82e28d3a1f4feb130a44885e6222ed..d32de6b00ca14ea4e9765404ad719795dd4add34 100644 (file)
@@ -37,8 +37,25 @@ export default {
 .carbon-ads {
   min-height: 102px;
   padding: 1.5rem 1.5rem 0;
-  margin-bottom: 0.5rem;
   font-size: 0.75rem;
+
+  width: 125px;
+  position: fixed;
+  z-index: 19;
+  bottom: 0;
+  right: 22px;
+  padding: 10px;
+}
+
+@media screen and (max-width: 1300px) {
+  .carbon-ads {
+    z-index: 1;
+    position: relative;
+    top: 12px;
+    right: 20px;
+    float: right;
+    padding: 0 0 20px 30px;
+  }
 }
 
 .carbon-ads a {
index 104a412989aad2d5a7ab24ad6763da654db8c546..cc3c5046a1d6dedfff0b3c6ac777ba269b9465c4 100644 (file)
@@ -1,10 +1,12 @@
 import DefaultTheme from 'vitepress/dist/client/theme-default'
 import Layout from './Layout.vue'
+import HomeSponsors from '../components/HomeSponsors.vue'
 
 export default {
   ...DefaultTheme,
   Layout,
   enhanceApp({ app, router, siteData }) {
+    app.component('HomeSponsors', HomeSponsors)
     // test
     // app is the Vue 3 app instance from createApp()
     // router is VitePress' custom router (see `lib/app/router.js`)
index dc2170e06b5212c3b4f56a7c2361ea5a4bdb2d97..07ecb5fc64f7fad81914fa10dd3e714ebce25de5 100644 (file)
@@ -1,6 +1,6 @@
 # Route Meta Fields
 
-You can include a `meta` field when defining a route with any arbitrary information:
+Sometimes, you might want to attach arbitrary information to routes like transition names, who can access the route, etc. This can be achieved through the `meta` property which accepts an object of properties and can be accessed on the route location and navigation guards. You can define `meta` properties like this:
 
 ```js
 const routes = [
index 7ca11276a6555637b9cfe03251f184655b5b9617..1e8cd95b98a2b1a9c35a881d501f3342b243124b 100644 (file)
@@ -1,11 +1,5 @@
 # Getting Started
 
-::: tip Note
-We will be using [ES2015](https://github.com/lukehoban/es6features) in the code samples in the guide.
-
-Also, all examples will be using the full version of Vue to make on-the-fly template compilation possible. See more details [here](https://v3.vuejs.org/guide/installation.html#runtime-compiler-vs-runtime-only).
-:::
-
 Creating a Single-page Application with Vue + Vue Router is dead simple. With Vue.js, we are already composing our application with components. When adding Vue Router to the mix, all we need to do is map our components to the routes and let Vue Router know where to render them. Here's a basic example:
 
 ## HTML
index afb30ecefe51ebb27bb3de66884b1bea986d7667..4feb69489ebb1e5572b672ac05c6fd17bd39fb4d 100644 (file)
@@ -1,16 +1,7 @@
-# Introduction
-
-Vue Router is the official router for [Vue.js](http://v3.vuejs.org). It deeply integrates with Vue.js core to make building Single Page Applications with Vue.js a breeze. Features include:
-
-- Nested routes mapping
-- Dynamic Routing
-- Modular, component-based router configuration
-- Route params, query, wildcards
-- View transition effects powered by Vue.js' transition system
-- Fine-grained navigation control
-- Links with automatic active CSS classes
-- HTML5 history mode or hash mode
-- Customizable Scroll Behavior
-- Proper encoding for URLs
-
-[Get started](/guide/) or play with the [playground](https://github.com/vuejs/vue-router-next/tree/master/playground) (see [`README.md`](https://github.com/vuejs/vue-router-next) to run them).
+---
+home: true
+heroImage: /logo.png
+actionText: Get Started →
+actionLink: /introduction.html
+footer: MIT Licensed | Copyright © 2014-present Evan You, Eduardo San Martin Morote
+---
diff --git a/docs/introduction.md b/docs/introduction.md
new file mode 100644 (file)
index 0000000..d130c53
--- /dev/null
@@ -0,0 +1,18 @@
+# Introduction
+
+Vue Router is the official router for [Vue.js](http://v3.vuejs.org). It deeply integrates with Vue.js core to make building Single Page Applications with Vue.js a breeze. Features include:
+
+- Nested routes mapping
+- Dynamic Routing
+- Modular, component-based router configuration
+- Route params, query, wildcards
+- View transition effects powered by Vue.js' transition system
+- Fine-grained navigation control
+- Links with automatic active CSS classes
+- HTML5 history mode or hash mode
+- Customizable Scroll Behavior
+- Proper encoding for URLs
+
+<HomeSponsors />
+
+[Get started](/guide/) or play with the [playground](https://github.com/vuejs/vue-router-next/tree/master/playground) (see [`README.md`](https://github.com/vuejs/vue-router-next) to run them).
diff --git a/docs/public/logo.png b/docs/public/logo.png
new file mode 100644 (file)
index 0000000..60e1700
Binary files /dev/null and b/docs/public/logo.png differ
diff --git a/patches/vite+1.0.0-rc.4.patch b/patches/vite+1.0.0-rc.4.patch
deleted file mode 100644 (file)
index 49439a4..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-diff --git a/node_modules/vite/dist/node/build/index.js b/node_modules/vite/dist/node/build/index.js
-index 923d0ea..7155e48 100644
---- a/node_modules/vite/dist/node/build/index.js
-+++ b/node_modules/vite/dist/node/build/index.js
-@@ -351,7 +351,7 @@ async function build(options) {
-         console.log(`Build completed in ${((Date.now() - start) / 1000).toFixed(2)}s.\n`);
-     }
-     // stop the esbuild service after each build
--    esbuildService_1.stopService();
-+    await esbuildService_1.stopService();
-     return {
-         assets: output,
-         html: indexHtml
-diff --git a/node_modules/vite/dist/node/esbuildService.js b/node_modules/vite/dist/node/esbuildService.js
-index 0d5d11b..2caf9e3 100644
---- a/node_modules/vite/dist/node/esbuildService.js
-+++ b/node_modules/vite/dist/node/esbuildService.js
-@@ -33,16 +33,19 @@ function resolveJsxOptions(options = 'vue') {
- }
- exports.resolveJsxOptions = resolveJsxOptions;
- // lazy start the service
--let _service;
--const ensureService = async () => {
--    if (!_service) {
--        _service = await esbuild_1.startService();
-+let _servicePromise;
-+const ensureService = () => {
-+    if (!_servicePromise) {
-+      _servicePromise = esbuild_1.startService();
-     }
--    return _service;
-+    return _servicePromise;
- };
--exports.stopService = () => {
--    _service && _service.stop();
--    _service = undefined;
-+exports.stopService = async () => {
-+  if (_servicePromise) {
-+    const service = await _servicePromise
-+    service.stop();
-+    _servicePromise = undefined;
-+  }
- };
- // transform used in server plugins with a more friendly API
- exports.transform = async (src, request, options = {}, jsxOption) => {