diff --git a/examples/async-component-injection/assets/css/common.css b/examples/async-component-injection/assets/css/common.css new file mode 100644 index 0000000000..b4f5ee78bf --- /dev/null +++ b/examples/async-component-injection/assets/css/common.css @@ -0,0 +1,69 @@ +body { + font-family: "Roboto", "Helvetica Neue", "Hiragino Sans GB", "LiHei Pro", Arial, serif; + text-rendering: optimizelegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-weight: 400; + font-size: 16px; + word-spacing: 1px; + color: #666; + margin: 0; +} +img { + border: none; +} +a { + color: #666; + text-decoration: none; + transition: color 0.2s ease, border-color 0.2s ease; +} +.header { + letter-spacing: 5px; + margin: 50px auto 15px; + text-align: center; +} +.header a { + font-size: 15px; + color: #444; +} +.links { + text-align: center; + font-family: "Roboto", "Helvetica Neue", "Hiragino Sans GB", "LiHei Pro", Arial, serif; + color: #999; + font-size: 24px; + margin: 0; +} +.links a { + cursor: pointer; + padding: 2px; + margin: 0 3px; +} +.links img { + width: 15px; + height: 15px; +} +.header, +h1, +h2, +h3, +h4, +h5, +h6 { + font-family: "Montserrat", "Helvetica Neue", "Hiragino Sans GB", "LiHei Pro", Arial, sans-serif; + font-weight: 400; + color: #444; +} +.main { + max-width: 600px; + margin: 50px auto; + padding: 0 30px 50px; + position: relative; +} +@media screen and (max-width: 420px) { + .header { + margin: 40px auto 10px; + } + .header a { + font-size: 14px; + } +} diff --git a/examples/async-component-injection/assets/css/index.css b/examples/async-component-injection/assets/css/index.css new file mode 100644 index 0000000000..25870b834d --- /dev/null +++ b/examples/async-component-injection/assets/css/index.css @@ -0,0 +1,57 @@ +.main > ul { + list-style-type: none; + padding: 0; + padding-top: 4px; +} +.main > ul > li { + position: relative; + padding: 30px 0 30px; + border-bottom: 1px solid #e6e6e6; +} +.main > ul > li:first-child { + margin-top: -30px; +} +.main h2, +.main h3 { + letter-spacing: 1px; + margin: 0; + text-transform: uppercase; +} +.main h2 { + font-size: 20px; + letter-spacing: 1px; + margin-left: 120px; +} +.main h2 a { + color: #444; +} +.main h2 a:hover { + color: #f33; +} +.main h3 { + font-size: 13px; + color: #999; + position: absolute; + left: 0; + top: 33px; +} +@media screen and (max-width: 420px) { + .main h2 { + font-size: 16px; + margin-left: 0; + } + .main h2 a:hover { + color: #f66; + } + .main h3 { + font-size: 11px; + position: static; + margin-bottom: 10px; + } + .main ul li { + padding: 18px 0 20px; + } + .main ul li:first-child { + margin-top: -35px; + } +} diff --git a/examples/async-component-injection/assets/css/post.css b/examples/async-component-injection/assets/css/post.css new file mode 100644 index 0000000000..128b175f70 --- /dev/null +++ b/examples/async-component-injection/assets/css/post.css @@ -0,0 +1,307 @@ +.gutter pre { + color: #999; +} +pre { + color: #525252; +} +pre .function .keyword, +pre .constant { + color: #0092db; +} +pre .keyword, +pre .attribute { + color: #e96900; +} +pre .number, +pre .literal { + color: #ae81ff; +} +pre .tag, +pre .tag .title, +pre .change, +pre .winutils, +pre .flow, +pre .lisp .title, +pre .clojure .built_in, +pre .nginx .title, +pre .tex .special { + color: #2973b7; +} +pre .class .title { + color: #fff; +} +pre .symbol, +pre .symbol .string, +pre .value, +pre .regexp { + color: #42b983; +} +pre .title { + color: #a6e22e; +} +pre .tag .value, +pre .string, +pre .subst, +pre .haskell .type, +pre .preprocessor, +pre .ruby .class .parent, +pre .built_in, +pre .sql .aggregate, +pre .django .template_tag, +pre .django .variable, +pre .smalltalk .class, +pre .javadoc, +pre .django .filter .argument, +pre .smalltalk .localvars, +pre .smalltalk .array, +pre .attr_selector, +pre .pseudo, +pre .addition, +pre .stream, +pre .envvar, +pre .apache .tag, +pre .apache .cbracket, +pre .tex .command, +pre .prompt { + color: #42b983; +} +pre .comment, +pre .java .annotation, +pre .python .decorator, +pre .template_comment, +pre .pi, +pre .doctype, +pre .deletion, +pre .shebang, +pre .apache .sqbracket, +pre .tex .formula { + color: #b3b3b3; +} +pre .coffeescript .javascript, +pre .javascript .xml, +pre .tex .formula, +pre .xml .javascript, +pre .xml .vbscript, +pre .xml .css, +pre .xml .cdata { + opacity: 0.5; +} +.main .post { + position: relative; + padding-bottom: 30px; + margin-bottom: 30px; + border-bottom: 1px solid #e6e6e6; +} +.main .post h1, +.main .post h2 { + text-transform: uppercase; + letter-spacing: 0px; +} +.main .post h1 a:hover, +.main .post h2 a:hover { + border-bottom: 3px solid #666; +} +.main .post h1 { + font-size: 32px; + margin: 0 0 45px; + letter-spacing: 1px; +} +.main .post h2 { + font-size: 24px; + margin: 60px 0 30px; + position: relative; +} +.main .post h2:before { + content: ''; + border-left: 5px solid #41b883; + position: absolute; + left: -15px; + height: 75%; + top: 12%; +} +.main .post h3 { + margin: 30px 0 15px; +} +.main .post .date { + font-family: "Montserrat", "Helvetica Neue", "Hiragino Sans GB", "LiHei Pro", Arial, sans-serif; + font-size: 13px; + color: #999; + margin: 0 0 30px; + letter-spacing: 1px; + position: initial; + text-transform: none; +} +.main .post .content { + text-align: left; + line-height: 1.8em; +} +.main .post .content p, +.main .post .content ul, +.main .post .content ol { + margin: 1em 0 1.5em; +} +.main .post .content strong { + font-weight: 600; + color: #444; +} +.main .post .content ol { + padding-left: 1.6em; +} +.main .post .content ul { + padding-left: 15px; + list-style-type: none; +} +.main .post .content ul li:before { + position: absolute; + font-weight: 600; + content: " ยท "; + margin: 0; + left: 0; +} +.main .post .content a { + color: #41b883; + border-bottom: 2px solid transparent; +} +.main .post .content a:hover { + color: #41b883; + border-bottom-color: #41b883; +} +.main .post .content .highlight, +.main .post .content .highlight table { + margin: 0; + width: 100%; +} +.main .post .content .highlight { + overflow-x: auto; +} +.main .post .content .highlight table, +.main .post .content .highlight tr, +.main .post .content .highlight td { + padding: 0; + border-collapse: collapse; +} +.main .post .content code { + font-family: "Roboto Mono", "Menlo", "Consolas", monospace; + font-size: 13px; + background-color: #f6f6f6; + padding: 3px 10px; + margin: 0 5px; + border-radius: 2px; +} +.main .post .content pre { + font-family: "Roboto Mono", "Menlo", "Consolas", monospace; + font-size: 13px; + overflow-x: auto; + text-align: left; + padding: 15px 25px; + background-color: #f6f6f6; + line-height: 1.5em; +} +.main .post .content .code pre { + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; +} +.main .post .content .gutter pre { + padding: 15px 0 15px 15px; + color: #75715e; + border-top-left-radius: 2px; + border-bottom-left-radius: 2px; +} +.main .post .content blockquote { + margin: 2em 0; + padding-left: 30px; + border-left: 5px solid #e6e6e6; +} +.main .post .content blockquote p { + font-size: 17px; + font-style: italic; + line-height: 1.8em; + color: #999; +} +.main .post img { + display: block; + max-width: 100%; +} +.blog-nav { + position: fixed; + bottom: 20px; + height: 20px; + line-height: 20px; + font-family: "Montserrat", "Helvetica Neue", "Hiragino Sans GB", "LiHei Pro", Arial, sans-serif; + font-size: 15px; + color: #999; + text-decoration: none; + cursor: pointer; + letter-spacing: 1px; + border-bottom: 3px solid transparent; +} +.blog-nav:hover { + color: #333; + border-bottom-color: #333; +} +#newer { + left: 40px; +} +#older { + right: 40px; +} +.show-comments { + font-family: "Montserrat", "Helvetica Neue", "Hiragino Sans GB", "LiHei Pro", Arial, sans-serif; + text-align: center; +} +.show-comments a { + color: #999; + cursor: pointer; +} +.show-comments a:hover { + color: #666; +} +@media screen and (max-width: 900px) { + .main .post { + padding-bottom: 80px; + } + .blog-nav { + position: absolute; + bottom: 30px; + } + #newer { + left: 0; + } + #older { + right: 0; + } +} +@media screen and (max-width: 420px) { + .main { + margin-top: 32px; + } + .main .post h1 { + font-size: 24px; + margin: 0 0 30px; + } + .main .post h2 { + font-size: 20px; + margin: 30px 0 15px; + } + .main .post h3 { + font-size: 16px; + line-height: 1.3em; + } + .main .post .date { + font-size: 12px; + margin: 0 0 20px; + } + .main .post .content { + font-size: 15px; + } + .main .post .content pre { + font-size: 12px; + } + .main .post .content blockquote p { + font-size: 16px; + } + .blog-nav { + font-size: 14px; + color: #444; + } +} diff --git a/examples/async-component-injection/assets/img/github.png b/examples/async-component-injection/assets/img/github.png new file mode 100644 index 0000000000..3844ec302d Binary files /dev/null and b/examples/async-component-injection/assets/img/github.png differ diff --git a/examples/async-component-injection/assets/img/swimmer.jpg b/examples/async-component-injection/assets/img/swimmer.jpg new file mode 100644 index 0000000000..e22693d4e6 Binary files /dev/null and b/examples/async-component-injection/assets/img/swimmer.jpg differ diff --git a/examples/async-component-injection/assets/img/twitter.png b/examples/async-component-injection/assets/img/twitter.png new file mode 100644 index 0000000000..e84e1b8a28 Binary files /dev/null and b/examples/async-component-injection/assets/img/twitter.png differ diff --git a/examples/async-component-injection/layouts/default.vue b/examples/async-component-injection/layouts/default.vue new file mode 100644 index 0000000000..a904ff90e1 --- /dev/null +++ b/examples/async-component-injection/layouts/default.vue @@ -0,0 +1,15 @@ + + diff --git a/examples/async-component-injection/nuxt.config.js b/examples/async-component-injection/nuxt.config.js new file mode 100644 index 0000000000..569cee3b0b --- /dev/null +++ b/examples/async-component-injection/nuxt.config.js @@ -0,0 +1,22 @@ +module.exports = { + head: { + title: 'Nuxt Blog', + meta: [ + { charset: 'utf-8' }, + { name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' } + ], + link: [ + { rel: 'icon', href: '/favicon.ico', type: 'image/x-icon' }, + { rel: 'stylesheet', href: 'http://fonts.googleapis.com/css?family=Montserrat|Roboto:400,400italic,600|Roboto+Mono', type: 'text/css' } + ] + }, + css: [ + '@/assets/css/common.css' + ], + generate: { + routes: [ + '/deep-dive-into-ocean', + '/welcome-to-my-blog' + ] + } +} diff --git a/examples/component-injection/package.json b/examples/async-component-injection/package.json similarity index 100% rename from examples/component-injection/package.json rename to examples/async-component-injection/package.json diff --git a/examples/async-component-injection/pages/_slug.vue b/examples/async-component-injection/pages/_slug.vue new file mode 100644 index 0000000000..10b87643d3 --- /dev/null +++ b/examples/async-component-injection/pages/_slug.vue @@ -0,0 +1,21 @@ + + + + +