张延森 пре 4 година
комит
6b310e8b9a

+ 17
- 0
.gitignore Прегледај датотеку

@@ -0,0 +1,17 @@
1
+.DS_Store
2
+node_modules/
3
+/dist/
4
+npm-debug.log*
5
+yarn-debug.log*
6
+yarn-error.log*
7
+/test/unit/coverage/
8
+/test/e2e/reports/
9
+selenium-debug.log
10
+
11
+# Editor directories and files
12
+.idea
13
+.vscode
14
+*.suo
15
+*.ntvs*
16
+*.njsproj
17
+*.sln

+ 12
- 0
docs/.vuepress/config.js Прегледај датотеку

@@ -0,0 +1,12 @@
1
+
2
+module.exports = {
3
+  title: '南京市云致技术服务有限公司',
4
+  themeConfig: {
5
+    nav: [
6
+      { text: '产品', link: '/products/' },
7
+      { text: '服务', link: '/service/' },
8
+      { text: '关于我们', link: '/about/' },
9
+      { text: 'External', link: 'https://google.com' },
10
+    ]
11
+  }
12
+}

+ 56
- 0
docs/.vuepress/theme/components/Jumbotron.vue Прегледај датотеку

@@ -0,0 +1,56 @@
1
+<template>
2
+  <div class="jumbotron">
3
+    <div class="container">
4
+      <h1 class="display-4" v-if="title">{{title}}</h1>
5
+      <p class="lead">{{lead}}</p>
6
+      <template v-if="link">
7
+        <RouterLink
8
+          v-if="!isExternal(link)"
9
+          class="btn btn-primary btn-lg"
10
+          :to="link"
11
+        >
12
+          {{linkLabel}}
13
+        </RouterLink>
14
+        <a class="btn btn-primary btn-lg" :href="link" role="button" target="_blank" v-else>
15
+          {{linkLabel}}
16
+          <OutboundLink />
17
+        </a>
18
+      </template>
19
+    </div>
20
+  </div>
21
+</template>
22
+
23
+<script>
24
+import { isExternal } from '@theme/utils/index.js'
25
+
26
+export default {
27
+  name: 'Jumbotron',
28
+  props: {
29
+    title: String,
30
+    lead: String,
31
+    link: String,
32
+    linkLabel: String,
33
+    backImage: String,
34
+  },
35
+  watch: {
36
+    'backImage': {
37
+      handler (newVal) {
38
+        if (newVal) {
39
+          this.setBackImage(newVal)
40
+        }
41
+      }
42
+    }
43
+  },
44
+  mounted() {
45
+    this.setBackImage(this.backImage)
46
+  },
47
+  methods: {
48
+    isExternal,
49
+    setBackImage(img) {
50
+      if (img && this.$el) {
51
+        this.$el.style.backgroundImage = `url(${img})`
52
+      }
53
+    }
54
+  }
55
+}
56
+</script>

+ 104
- 0
docs/.vuepress/theme/components/Navbar.vue Прегледај датотеку

@@ -0,0 +1,104 @@
1
+<template>
2
+  <nav class="navbar navbar-expand-lg fixed-top navbar-light navbar-dync">
3
+    <div class="container">
4
+      <RouterLink class="navbar-brand" :to="$localePath">
5
+        <img
6
+          v-if="$site.themeConfig.logo"
7
+          class="logo"
8
+          :src="$withBase($site.themeConfig.logo)"
9
+          :alt="$siteTitle"
10
+        >
11
+        <span
12
+          v-if="$siteTitle && !$site.themeConfig.logo"
13
+          ref="siteName"
14
+        >{{ $siteTitle }}</span>
15
+      </RouterLink>
16
+
17
+      <template v-if="links.length">
18
+        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
19
+          <span class="navbar-toggler-icon"></span>
20
+        </button>
21
+
22
+        <div class="collapse navbar-collapse" id="navbarSupportedContent">
23
+          <ul class="navbar-nav ml-md-auto">
24
+            <li class="nav-item mx-3" v-for="item in links" :key="item.link">
25
+              <RouterLink
26
+                v-if="!isExternal(item.link)"
27
+                class="nav-link"
28
+                :to="item.link"
29
+              >
30
+                {{item.text}}
31
+              </RouterLink>
32
+              <a v-else class="nav-link" :href="item.link" target="_blank">
33
+                {{item.text}}
34
+                <OutboundLink />
35
+              </a>
36
+            </li>
37
+          </ul>
38
+        </div>
39
+      </template>
40
+    </div>
41
+  </nav>
42
+</template>
43
+
44
+<script>
45
+import { isExternal } from '@theme/utils'
46
+
47
+export default {
48
+  name: 'Navbar',
49
+  computed: {
50
+    links() {
51
+      const navs = this.$site.themeConfig.nav || []
52
+      return navs
53
+    }
54
+  },
55
+  mounted() {
56
+    this.$themeScroll.listen((evt) => {
57
+      const d = window.pageYOffset
58
+      const actCls = 'navbar-dync-act'
59
+
60
+      if (d > 10) {
61
+        if (!this.$el.classList.contains(actCls)) {
62
+          this.$el.classList.add(actCls)
63
+        }
64
+      } else {
65
+        if (this.$el.classList.contains(actCls)) {
66
+          this.$el.classList.remove(actCls)
67
+        }
68
+      }
69
+    })
70
+  },
71
+  methods: {
72
+    isExternal
73
+  }
74
+}
75
+</script>
76
+
77
+<style lang="scss">
78
+.navbar {
79
+  &.navbar-dync {
80
+    transition: all 0.5s ease;
81
+    background: transparent;
82
+
83
+    .navbar-nav .nav-link {
84
+      color: #333;
85
+    }
86
+
87
+    &-act {
88
+      background-color: rgba(255, 255, 255, 0.75);
89
+    }
90
+
91
+    @media (max-width: 991.98px) {
92
+      #navbarSupportedContent {
93
+        background-color: rgba(255, 255, 255, 0.75);
94
+      }
95
+    }
96
+
97
+    .navbar-toggler {
98
+      border: none;
99
+      outline: none;
100
+    }
101
+  }
102
+}
103
+
104
+</style>

+ 6
- 0
docs/.vuepress/theme/enhanceApp.js Прегледај датотеку

@@ -0,0 +1,6 @@
1
+
2
+import observe from './utils/observe.js'
3
+
4
+export default ({ Vue }) => {
5
+  Vue.prototype.$themeScroll = observe()
6
+}

+ 7
- 0
docs/.vuepress/theme/index.js Прегледај датотеку

@@ -0,0 +1,7 @@
1
+const path = require('path')
2
+
3
+module.exports = (options, ctx) => {
4
+  return {
5
+    globalLayout: path.resolve(__dirname, 'layouts/GlobalLayout.vue')
6
+  }
7
+}

+ 11
- 0
docs/.vuepress/theme/layouts/404.vue Прегледај датотеку

@@ -0,0 +1,11 @@
1
+<template>
2
+  <div class="theme-container">
3
+    <div class="theme-default-content">
4
+      <h1>404</h1>
5
+
6
+      <RouterLink to="/">
7
+        Take me home.
8
+      </RouterLink>
9
+    </div>
10
+  </div>
11
+</template>

+ 43
- 0
docs/.vuepress/theme/layouts/GlobalLayout.vue Прегледај датотеку

@@ -0,0 +1,43 @@
1
+<template>
2
+  <div id="global-layout" class="global-wrapper">
3
+    <Navbar />
4
+    <component :is="layout"/>
5
+    <footer><h1>Footer</h1></footer>
6
+  </div>
7
+</template>
8
+
9
+<script>
10
+import 'jquery/dist/jquery.slim.min.js'
11
+import 'bootstrap/dist/css/bootstrap.min.css'
12
+import 'bootstrap/dist/js/bootstrap.bundle.min.js'
13
+
14
+import Navbar from '@theme/components/Navbar.vue'
15
+
16
+export default {
17
+  components: {
18
+    Navbar
19
+  },
20
+  computed: {
21
+    layout () {
22
+      if (this.$page.path) {
23
+        if (this.$frontmatter.layout) {
24
+          // 你也可以像默认的 globalLayout 一样首先检测 layout 是否存在
25
+          return this.$frontmatter.layout
26
+        }
27
+        return 'Layout'
28
+      }
29
+      return 'NotFound'
30
+    }
31
+  },
32
+  mounted () {
33
+    window.addEventListener('scroll', this.$themeScroll.notify)
34
+  }
35
+}
36
+</script>
37
+
38
+<style lang="scss">
39
+body {
40
+  padding-top: 4.5rem;
41
+  overflow-y: auto;
42
+}
43
+</style>

+ 53
- 0
docs/.vuepress/theme/layouts/Layout.vue Прегледај датотеку

@@ -0,0 +1,53 @@
1
+<template>
2
+  <div class="theme-container">
3
+    <div id="carouselExampleCaptions" class="carousel slide" data-ride="carousel">
4
+      <ol class="carousel-indicators">
5
+        <li data-target="#carouselExampleCaptions" data-slide-to="0" class="active"></li>
6
+        <li data-target="#carouselExampleCaptions" data-slide-to="1"></li>
7
+        <li data-target="#carouselExampleCaptions" data-slide-to="2"></li>
8
+      </ol>
9
+      <div class="carousel-inner">
10
+        <div class="carousel-item active">
11
+          <img src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1603118729589&di=d9acb40dc12f61b2a65c0ae973a9ee2f&imgtype=0&src=http%3A%2F%2Fattach.bbs.miui.com%2Fforum%2F201303%2F13%2F174429b5wzavjztjr9tntt.jpg" class="d-block w-100" alt="">
12
+          <div class="carousel-caption d-none d-md-block">
13
+            <h5>First slide label</h5>
14
+            <p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
15
+            <a class="btn btn-primary btn-lg" href="#" role="button" target="_blank">Some text</a>
16
+          </div>
17
+        </div>
18
+        <div class="carousel-item">
19
+          <img src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1603118783426&di=c827609dd419a2213563dba665111229&imgtype=0&src=http%3A%2F%2Fattachments.gfan.com%2Fforum%2Fattachments2%2Fday_120617%2F1206171640deaafc4222e7bc51.jpg" class="d-block w-100" alt="">
20
+          <div class="carousel-caption d-none d-md-block">
21
+            <h5>Second slide label</h5>
22
+            <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
23
+          </div>
24
+        </div>
25
+        <div class="carousel-item">
26
+          <img src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1603118729589&di=d9acb40dc12f61b2a65c0ae973a9ee2f&imgtype=0&src=http%3A%2F%2Fattach.bbs.miui.com%2Fforum%2F201303%2F13%2F174429b5wzavjztjr9tntt.jpg" class="d-block w-100" alt="">
27
+          <div class="carousel-caption d-none d-md-block">
28
+            <h5>Third slide label</h5>
29
+            <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p>
30
+          </div>
31
+        </div>
32
+      </div>
33
+      <a class="carousel-control-prev" href="#carouselExampleCaptions" role="button" data-slide="prev">
34
+        <span class="carousel-control-prev-icon" aria-hidden="true"></span>
35
+        <span class="sr-only">Previous</span>
36
+      </a>
37
+      <a class="carousel-control-next" href="#carouselExampleCaptions" role="button" data-slide="next">
38
+        <span class="carousel-control-next-icon" aria-hidden="true"></span>
39
+        <span class="sr-only">Next</span>
40
+      </a>
41
+    </div>
42
+
43
+    <div class="container">
44
+      <Content/>
45
+    </div>
46
+  </div>
47
+</template>
48
+
49
+<script>
50
+export default {
51
+  name: 'Layout'
52
+}
53
+</script>

+ 6
- 0
docs/.vuepress/theme/package.json Прегледај датотеку

@@ -0,0 +1,6 @@
1
+{
2
+  "name": "vuepress-theme-yz001",
3
+  "version": "1.0.0",
4
+  "main": "index.js",
5
+  "license": "MIT"
6
+}

+ 4
- 0
docs/.vuepress/theme/utils/index.js Прегледај датотеку

@@ -0,0 +1,4 @@
1
+
2
+export function isExternal (link) {
3
+  return link.toLowerCase().indexOf('http') === 0 || link.toLowerCase().indexOf('mailto') === 0
4
+}

+ 18
- 0
docs/.vuepress/theme/utils/observe.js Прегледај датотеку

@@ -0,0 +1,18 @@
1
+
2
+export default function () {
3
+  const listeners = []
4
+
5
+  const listen = (f) => {
6
+    const p = listeners.length
7
+    listeners.push(f)
8
+    return () => {
9
+      listeners.splice(p, 1)
10
+    }
11
+  }
12
+
13
+  const notify = (...args) => {
14
+    listeners.forEach(f => f(...args))
15
+  }
16
+
17
+  return { listen, notify }
18
+}

+ 1
- 0
docs/README.md Прегледај датотеку

@@ -0,0 +1 @@
1
+# Hello

+ 19
- 0
package.json Прегледај датотеку

@@ -0,0 +1,19 @@
1
+{
2
+  "name": "vuepress-starter",
3
+  "version": "1.0.0",
4
+  "main": "index.js",
5
+  "license": "MIT",
6
+  "scripts": {
7
+    "docs:dev": "vuepress dev docs",
8
+    "docs:build": "vuepress build docs"
9
+  },
10
+  "devDependencies": {
11
+    "node-sass": "^4.14.1",
12
+    "sass-loader": "^10.0.3",
13
+    "vuepress": "^1.7.1"
14
+  },
15
+  "dependencies": {
16
+    "bootstrap": "^4.5.3",
17
+    "jquery": "^3.5.1"
18
+  }
19
+}

+ 8401
- 0
yarn.lock
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку