]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
docs: remove old components
authorEduardo San Martin Morote <posva13@gmail.com>
Mon, 31 May 2021 18:05:45 +0000 (20:05 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Mon, 31 May 2021 18:05:45 +0000 (20:05 +0200)
docs/.vitepress/config.js
docs/.vitepress/theme/Layout.vue
docs/.vitepress/theme/components/BuySellAds.vue [deleted file]
docs/.vitepress/theme/components/CarbonAds.vue [deleted file]
docs/api/index.md

index 033b4b7dd21b0fbdb81ad018fdc4a3977a0c660f..02c920e1a6c70d25b76de77fa28d3d16f7fb73c7 100644 (file)
@@ -65,8 +65,7 @@ const config = {
           },
           {
             text: 'Changelog',
-            link:
-              'https://github.com/vuejs/vue-router-next/blob/master/CHANGELOG.md',
+            link: 'https://github.com/vuejs/vue-router-next/blob/master/CHANGELOG.md',
           },
         ],
 
@@ -199,8 +198,7 @@ const config = {
           },
           {
             text: '更新日志',
-            link:
-              'https://github.com/vuejs/vue-router-next/blob/master/CHANGELOG.md',
+            link: 'https://github.com/vuejs/vue-router-next/blob/master/CHANGELOG.md',
           },
         ],
 
index 6cdec6adba36ee393a2302311ddb65bc6e19c4a3..082a80a329d12cb9b2a7cb602601557edbc94b55 100644 (file)
@@ -1,22 +1,5 @@
 <template>
   <ParentLayout>
-    <template #page-top-ads><span /></template>
-    <template #page-top>
-      <CarbonAds
-        v-if="$site.themeConfig.carbonAds"
-        :key="'carbon' + $page.relativePath"
-        :code="$site.themeConfig.carbonAds.carbon"
-        :placement="$site.themeConfig.carbonAds.placement"
-      />
-    </template>
-    <template #page-bottom>
-      <BuySellAds
-        v-if="$site.themeConfig.carbonAds"
-        :key="'custom' + $page.relativePath"
-        :code="$site.themeConfig.carbonAds.custom"
-        :placement="$site.themeConfig.carbonAds.placement"
-      />
-    </template>
     <template #sidebar-bottom>
       <div class="sponsors">
         <a
@@ -42,8 +25,6 @@
 
 <script>
 import DefaultTheme from 'vitepress/dist/client/theme-default'
-import CarbonAds from './components/CarbonAds.vue'
-import BuySellAds from './components/BuySellAds.vue'
 import sponsors from '../components/sponsors.json'
 
 export default {
@@ -51,8 +32,6 @@ export default {
 
   components: {
     ParentLayout: DefaultTheme.Layout,
-    CarbonAds,
-    BuySellAds,
   },
 
   setup() {
@@ -62,6 +41,10 @@ export default {
 </script>
 
 <style>
+td code {
+  white-space: nowrap;
+}
+
 form {
   margin-block-end: 0;
 }
diff --git a/docs/.vitepress/theme/components/BuySellAds.vue b/docs/.vitepress/theme/components/BuySellAds.vue
deleted file mode 100644 (file)
index ccd4cfc..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-<template>
-  <div class="bsa-cpc-wrapper">
-    <div class="bsa-cpc"></div>
-  </div>
-</template>
-
-<script>
-import { onMounted } from 'vue'
-
-/* global _bsa */
-const ID = 'bsa-cpc-script'
-
-export default {
-  name: 'BuySellAds',
-  props: {
-    code: {
-      type: String,
-      required: true,
-    },
-    placement: {
-      type: String,
-      required: true,
-    },
-  },
-
-  setup(props) {
-    function load() {
-      if (typeof _bsa !== 'undefined' && _bsa) {
-        _bsa.init('default', props.code, `placement:${props.placement}`, {
-          target: '.bsa-cpc',
-          align: 'horizontal',
-          disable_css: 'true',
-        })
-      }
-    }
-
-    onMounted(() => {
-      if (!document.getElementById(ID)) {
-        const s = document.createElement('script')
-        s.id = ID
-        s.src = `//m.servedby-buysellads.com/monetization.js`
-        document.head.appendChild(s)
-        s.onload = () => {
-          load()
-        }
-      } else {
-        load()
-      }
-    })
-  },
-}
-</script>
-
-<style>
-.bsa-cpc-wrapper {
-  font-size: 0.95rem;
-  /* from Page.vue */
-  max-width: 50rem;
-  margin: 0px auto;
-  padding: 1rem 2rem 0;
-  margin-bottom: -1rem;
-}
-
-@media (max-width: 419px) {
-  .bsa-cpc-wrapper {
-    padding: 0 1.5rem;
-  }
-}
-
-.bsa-cpc {
-  font-size: 0.9em;
-  background-color: #f8f8f8;
-  border-radius: 6px;
-}
-
-.bsa-cpc .default-text {
-  display: inline;
-}
-
-.bsa-cpc a._default_ {
-  text-align: left;
-  display: block;
-  text-decoration: none;
-  padding: 10px 15px 12px;
-  margin-bottom: 20px;
-  color: #666;
-  font-weight: 400;
-  line-height: 18px;
-}
-
-.bsa-cpc a._default_ .default-image img {
-  height: 20px;
-  border-radius: 3px;
-  vertical-align: middle;
-  position: relative;
-  top: -1px;
-}
-
-.bsa-cpc a._default_ .default-title {
-  font-weight: 600;
-}
-
-.bsa-cpc a._default_ .default-description:after {
-  font-size: 0.85em;
-  content: 'Sponsored';
-  color: #1c90f3;
-  border: 1px solid #1c90f3;
-  border-radius: 3px;
-  padding: 0 4px 1px;
-  margin-left: 6px;
-}
-
-.bsa-cpc .default-ad {
-  display: none;
-}
-
-.bsa-cpc a._default_ .default-image,
-.bsa-cpc a._default_ .default-title,
-.bsa-cpc a._default_ .default-description {
-  display: inline;
-  vertical-align: middle;
-  margin-right: 6px;
-}
-</style>
diff --git a/docs/.vitepress/theme/components/CarbonAds.vue b/docs/.vitepress/theme/components/CarbonAds.vue
deleted file mode 100644 (file)
index b219bc2..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-<template>
-  <div class="carbon-ads" ref="el" />
-</template>
-
-<script lang="ts">
-import { defineComponent, ref, onMounted } from 'vue'
-
-export default defineComponent({
-  props: {
-    code: {
-      type: String,
-      required: true,
-    },
-    placement: {
-      type: String,
-      required: true,
-    },
-  },
-
-  setup(props) {
-    const el = ref()
-    onMounted(() => {
-      const s = document.createElement('script')
-      s.id = '_carbonads_js'
-      s.src = `//cdn.carbonads.com/carbon.js?serve=${props.code}&placement=${props.placement}`
-      el.value.appendChild(s)
-    })
-
-    // TODO: change on route change
-
-    return { el }
-  },
-})
-</script>
-
-<style scoped>
-.carbon-ads {
-  padding: 1.75rem 0 0;
-  border-radius: 4px;
-  margin: 0 auto;
-  max-width: 280px;
-  font-size: 0.75rem;
-  background-color: rgba(255, 255, 255, 0.8);
-}
-
-.carbon-ads::after {
-  clear: both;
-  display: block;
-  content: '';
-}
-
-@media (min-width: 420px) {
-  .carbon-ads {
-    position: relative;
-    right: -8px;
-    z-index: 1;
-    float: right;
-    margin: -8px -8px 24px 24px;
-    padding: 8px;
-    width: 146px;
-    max-width: 100%;
-  }
-}
-
-@media (max-width: 420px) {
-  .carbon-ads {
-    /* Avoid layout shift */
-    height: 105px;
-  }
-}
-
-@media (min-width: 1400px) {
-  .carbon-ads {
-    position: fixed;
-    top: auto;
-    right: 8px;
-    bottom: 8px;
-    float: none;
-    margin: 0;
-  }
-}
-
-.carbon-ads ::v-deep(.carbon-img) {
-  float: left;
-  margin-right: 0.75rem;
-  max-width: 100px;
-  border: 1px solid var(--c-divider);
-}
-
-@media (min-width: 420px) {
-  .carbon-ads ::v-deep(.carbon-img) {
-    float: none;
-    display: block;
-    margin-right: 0;
-    max-width: 130px;
-  }
-}
-
-.carbon-ads ::v-deep(.carbon-img img) {
-  display: block;
-  width: 100%;
-}
-
-@media (min-width: 420px) {
-  .carbon-ads ::v-deep(.carbon-text) {
-    padding-top: 8px;
-  }
-}
-
-.carbon-ads ::v-deep(.carbon-text) {
-  display: block;
-  font-weight: 400;
-  color: var(--c-text-light);
-}
-
-.carbon-ads ::v-deep(.carbon-poweredby) {
-  display: block;
-  padding-top: 2px;
-  font-weight: 400;
-  color: var(--c-text-lighter);
-}
-</style>
index e4cd7ba8ac1561120dc1068035a2094035e769b3..c699f1bf11e3a061b7d04cf5257af722126317e1 100644 (file)
@@ -424,10 +424,10 @@ addRoute(parentName: string | symbol, route: RouteRecordRaw): () => void
 
 _Parameters_
 
-| Parameter  | Type                                | Description         |
-| ---------- | ----------------------------------- | ------------------- |
-| parentName | `string                             | symbol`             | Parent Route Record where `route` should be appended at |
-| route      | [`RouteRecordRaw`](#routerecordraw) | Route Record to add |
+| Parameter  | Type                                | Description                                             |
+| ---------- | ----------------------------------- | ------------------------------------------------------- |
+| parentName | `string \| symbol`                  | Parent Route Record where `route` should be appended at |
+| route      | [`RouteRecordRaw`](#routerecordraw) | Route Record to add                                     |
 
 ### addRoute
 
@@ -861,12 +861,14 @@ Route record that can be provided by the user when adding routes via the [`route
 If you want to use a functional component, make sure to add a `displayName` to it.
 
 For example:
+
 ```js
 const HomeView = () => h('div', 'HomePage')
 // in TypeScript, you will need to use the FunctionalComponent type
 HomeView.displayName = 'HomeView'
 const routes = [{ path: '/', component: HomeView }]
 ```
+
 :::
 
 ## RouteRecordNormalized