Skip to content

Commit e8c1ebf

Browse files
committed
chore: upgrade nuxt
1 parent 77b1b5f commit e8c1ebf

34 files changed

+9625
-686
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.gitignore

+78-19
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,90 @@
1-
# dependencies
2-
node_modules
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Node template
3+
# Logs
4+
/logs
5+
*.log
6+
npm-debug.log*
7+
yarn-debug.log*
8+
yarn-error.log*
9+
10+
# Runtime data
11+
pids
12+
*.pid
13+
*.seed
14+
*.pid.lock
15+
16+
# Directory for instrumented libs generated by jscoverage/JSCover
17+
lib-cov
18+
19+
# Coverage directory used by tools like istanbul
20+
coverage
21+
22+
# nyc test coverage
23+
.nyc_output
24+
25+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26+
.grunt
27+
28+
# Bower dependency directory (https://bower.io/)
29+
bower_components
30+
31+
# node-waf configuration
32+
.lock-wscript
33+
34+
# Compiled binary addons (https://nodejs.org/api/addons.html)
35+
build/Release
36+
37+
# Dependency directories
38+
node_modules/
39+
jspm_packages/
40+
41+
# TypeScript v1 declaration files
42+
typings/
43+
44+
# Optional npm cache directory
45+
.npm
346

4-
# logs
5-
npm-debug.log
47+
# Optional eslint cache
48+
.eslintcache
649

7-
# Nuxt build
50+
# Optional REPL history
51+
.node_repl_history
52+
53+
# Output of 'npm pack'
54+
*.tgz
55+
56+
# Yarn Integrity file
57+
.yarn-integrity
58+
59+
# dotenv environment variables file
60+
.env
61+
62+
# parcel-bundler cache (https://parceljs.org/)
63+
.cache
64+
65+
# next.js build output
66+
.next
67+
68+
# nuxt.js build output
869
.nuxt
970

1071
# Nuxt generate
1172
dist
1273

13-
# IntelliJ
14-
.idea
74+
# vuepress build output
75+
.vuepress/dist
1576

16-
# Visual Studio Code
17-
.vscode
77+
# Serverless directories
78+
.serverless
1879

19-
# Log files
20-
*.log
80+
# IDE / Editor
81+
.idea
82+
83+
# Service worker
84+
sw.*
2185

22-
# OS generated files
86+
# Mac OSX
2387
.DS_Store
24-
.DS_Store?
25-
._*
26-
.Spotlight-V100
27-
.Trashes
28-
ehthumbs.db
29-
Thumbs.db
3088

31-
.env
89+
# Vim swap files
90+
*.swp

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10.18.1
1+
12.14.1

.prettierrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true
4+
}

README.md

+8-19
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,22 @@
1-
<p align="left">
2-
<a href="https://travis-ci.org/krestaino/nuepress"><img src="https://travis-ci.org/krestaino/nuepress.svg?branch=master" alt="Build Status"></a>
3-
</p>
1+
# NuePress
42

5-
## NuePress
6-
7-
[Nuxt.js](https://github.com/nuxt/nuxt.js) + [WordPress REST API](https://developer.wordpress.org/rest-api/)
8-
9-
## Demo
10-
11-
[https://nuepress.kmr.io](https://nuepress.kmr.io/)
3+
> Vue + WordPress
124
135
## Build Setup
146

157
```bash
168
# install dependencies
17-
$ npm install
9+
$ yarn install
1810

1911
# serve with hot reload at localhost:3000
20-
$ npm run dev
12+
$ yarn dev
2113

2214
# build for production and launch server
23-
$ npm run build
24-
$ npm start
25-
26-
# build for production and view the bundle analyzer report
27-
$ npm run analyze
15+
$ yarn build
16+
$ yarn start
2817

2918
# generate static project
30-
$ npm run generate
19+
$ yarn generate
3120
```
3221

33-
For detailed explanation on how things work, checkout the [Nuxt.js docs](https://github.com/nuxt/nuxt.js).
22+
For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).

assets/css/tailwind.css

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@import 'tailwindcss/base';
2+
@import 'tailwindcss/components';
3+
@import 'tailwindcss/utilities';

assets/svg/Smile.vue

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<template>
2-
<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
2+
<svg
3+
fill="#000000"
4+
height="24"
5+
viewBox="0 0 24 24"
6+
width="24"
7+
xmlns="http://www.w3.org/2000/svg"
8+
>
39
<path d="M0 0h24v24H0z" fill="none" />
410
<path
511
d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z"

components/ArticleComments.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
</template>
2020

2121
<script>
22-
import Spinner1 from '~/components/Spinner1';
23-
import VueDisqus from 'vue-disqus/VueDisqus.vue';
22+
import Spinner1 from '~/components/Spinner1'
23+
import VueDisqus from 'vue-disqus'
2424
2525
export default {
2626
props: {
@@ -33,9 +33,9 @@ export default {
3333
data() {
3434
return {
3535
disqusReady: false
36-
};
36+
}
3737
}
38-
};
38+
}
3939
</script>
4040

4141
<style lang="scss" scoped>

components/ArticleFeaturedImage.vue

+10-4
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@
55
class="featured-image lazy"
66
:class="{ expanded: expanded }"
77
>
8-
<div class="image-height" :style="{ paddingTop: featuredImageAspectRatio }"></div>
8+
<div
9+
class="image-height"
10+
:style="{ paddingTop: featuredImageAspectRatio }"
11+
></div>
912
<img v-lazy="featuredImage.source_url" />
10-
<div class="featured-image-padding" :style="{ paddingTop: featuredImageAspectRatio }"></div>
13+
<div
14+
class="featured-image-padding"
15+
:style="{ paddingTop: featuredImageAspectRatio }"
16+
></div>
1117
</div>
1218
</div>
1319
</template>
@@ -21,10 +27,10 @@ export default {
2127
2228
computed: {
2329
featuredImageAspectRatio() {
24-
return (this.featuredImage.height / this.featuredImage.width) * 100 + '%';
30+
return (this.featuredImage.height / this.featuredImage.width) * 100 + '%'
2531
}
2632
}
27-
};
33+
}
2834
</script>
2935

3036
<style lang="scss" scoped>

components/ArticleList.vue

+16-7
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,24 @@
1515
</span>
1616
</div>
1717
<nuxt-link :to="`/${article.slug}`" class="row">
18-
<div class="col">
19-
<div class="lazy thumbnail" v-if="article._embedded['wp:featuredmedia']">
18+
<div class="col no-flex-shrink">
19+
<div
20+
class="lazy thumbnail"
21+
v-if="article._embedded['wp:featuredmedia']"
22+
>
2023
<img
2124
v-lazy="
22-
article._embedded['wp:featuredmedia'][0].media_details.sizes.thumbnail.source_url
25+
article._embedded['wp:featuredmedia'][0].media_details.sizes
26+
.thumbnail.source_url
2327
"
2428
/>
2529
<Spinner1 class="spinner" />
2630
</div>
2731
<div class="lazy medium" v-if="article._embedded['wp:featuredmedia']">
2832
<img
2933
v-lazy="
30-
article._embedded['wp:featuredmedia'][0].media_details.sizes.medium.source_url
34+
article._embedded['wp:featuredmedia'][0].media_details.sizes
35+
.medium.source_url
3136
"
3237
/>
3338
<Spinner1 class="spinner" />
@@ -43,7 +48,7 @@
4348
</template>
4449

4550
<script>
46-
import Spinner1 from '~/components/Spinner1';
51+
import Spinner1 from '~/components/Spinner1'
4752
4853
export default {
4954
components: {
@@ -55,11 +60,11 @@ export default {
5560
mixins: {
5661
shortTimestamp: Function
5762
}
58-
};
63+
}
5964
</script>
6065

6166
<style lang="scss" scoped>
62-
@import '~assets/css/vars.scss';
67+
@import '~/assets/css/vars.scss';
6368
6469
.article-list {
6570
article + article {
@@ -91,6 +96,10 @@ export default {
9196
}
9297
}
9398
99+
.no-flex-shrink {
100+
flex-shrink: 0;
101+
}
102+
94103
.date {
95104
font-family: 'Roboto', sans-serif;
96105
font-size: 0.75rem;

components/Spinner1.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</template>
77

88
<style lang="scss" scoped>
9-
@import '~assets/css/vars.scss';
9+
@import '~/assets/css/vars.scss';
1010
1111
.spinner {
1212
width: 40px;

components/TheFooter.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@
1414
export default {
1515
computed: {
1616
meta() {
17-
return this.$store.state.meta;
17+
return this.$store.state.meta
1818
},
1919
year() {
20-
return new Date().getFullYear();
20+
return new Date().getFullYear()
2121
}
2222
},
2323
2424
mixins: {
2525
homeScrollTop: Function
2626
}
27-
};
27+
}
2828
</script>
2929

3030
<style lang="scss" scoped>
31-
@import '~assets/css/vars.scss';
31+
@import '~/assets/css/vars.scss';
3232
3333
footer {
3434
> div {

components/TheHeader.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</template>
1717

1818
<script>
19-
import TheHeaderSearch from '~/components/TheHeaderSearch';
19+
import TheHeaderSearch from '~/components/TheHeaderSearch'
2020
2121
export default {
2222
components: {
@@ -25,18 +25,18 @@ export default {
2525
2626
computed: {
2727
meta() {
28-
return this.$store.state.meta;
28+
return this.$store.state.meta
2929
}
3030
},
3131
3232
mixins: {
3333
homeScrollTop: Function
3434
}
35-
};
35+
}
3636
</script>
3737

3838
<style lang="scss" scoped>
39-
@import '~assets/css/vars.scss';
39+
@import '~/assets/css/vars.scss';
4040
4141
header {
4242
font-family: 'Roboto', sans-serif;
@@ -99,7 +99,7 @@ header {
9999
border-color: #555;
100100
}
101101
102-
&.nuxt-link-active:not(.blog-title) {
102+
&.nuxt-link-active {
103103
padding-bottom: 4px;
104104
border-bottom: 2px solid;
105105
}

0 commit comments

Comments
 (0)