Skip to content

Commit 1154298

Browse files
committed
Refactor: initial commit following conversion to Nuxt project
1 parent d886668 commit 1154298

File tree

143 files changed

+25080
-10756
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+25080
-10756
lines changed

.editorconfig

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
# editorconfig.org
12
root = true
23

34
[*]
4-
charset = utf-8
55
indent_style = space
66
indent_size = 2
77
end_of_line = lf
8-
insert_final_newline = true
8+
charset = utf-8
99
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.eslintignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
build/*.js
2-
config/*.js
1+
/vendor

.eslintrc.js

+25-19
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,33 @@
1-
// http://eslint.org/docs/user-guide/configuring
2-
31
module.exports = {
42
root: true,
5-
parser: 'babel-eslint',
6-
parserOptions: {
7-
sourceType: 'module'
8-
},
93
env: {
104
browser: true,
5+
node: true
6+
},
7+
parserOptions: {
8+
parser: 'babel-eslint',
9+
sourceType: 'module'
1110
},
12-
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
13-
extends: 'standard',
14-
// required to lint *.vue files
15-
plugins: [
16-
'html'
11+
extends: [
12+
'@nuxtjs',
13+
'plugin:nuxt/recommended',
14+
'plugin:vue/essential'
1715
],
18-
// add your custom rules here
19-
'rules': {
20-
// allow paren-less arrow functions
21-
'arrow-parens': 0,
22-
// allow async-await
23-
'generator-star-spacing': 0,
24-
// allow debugger during development
25-
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
16+
// Add your custom rules here
17+
rules: {
18+
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
19+
'vue/html-closing-bracket-newline': ['error', {
20+
'singleline': 'never',
21+
'multiline': 'never'
22+
}],
23+
'vue/singleline-html-element-content-newline': 'off',
24+
'vue/multiline-html-element-content-newline': 'off',
25+
'vue/singleline-html-element-content-newline': ['error', {
26+
'ignoreWhenNoAttributes': true
27+
}],
28+
'no-trailing-spaces': ['error', {
29+
'skipBlankLines': true
30+
}],
31+
'vue/html-self-closing': 'off'
2632
}
2733
}

.gitignore

+86-11
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,91 @@
1-
.DS_Store
2-
node_modules/
3-
dist/
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Node template
3+
# Logs
4+
logs
5+
*.log
46
npm-debug.log*
57
yarn-debug.log*
68
yarn-error.log*
7-
test/unit/coverage
8-
test/e2e/reports
9-
selenium-debug.log
109

11-
# Editor directories and files
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
46+
47+
# Optional eslint cache
48+
.eslintcache
49+
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
69+
.nuxt
70+
71+
# Nuxt generate
72+
dist
73+
74+
# vuepress build output
75+
.vuepress/dist
76+
77+
# Serverless directories
78+
.serverless
79+
80+
# IDE / Editor
1281
.idea
13-
*.suo
14-
*.ntvs*
15-
*.njsproj
16-
*.sln
82+
.editorconfig
83+
84+
# Service worker
85+
sw.*
86+
87+
# Mac OSX
88+
.DS_Store
89+
90+
# Vim swap files
91+
*.swp

api/index.js

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import Axios from 'axios'
2+
import NuxtConfig from '@/nuxt.config.js'
3+
4+
const baseUrl = NuxtConfig.backendBaseUrl
5+
6+
export default {
7+
// /////////////////////////////////////////////////////// Get Navigation List
8+
// ---------------------------------------------------------------------------
9+
getNavigationList () {
10+
return Axios
11+
.get(baseUrl + 'api/core/v2/menus')
12+
.then((response) => {
13+
return response.data
14+
})
15+
.catch((error) => {
16+
return { error }
17+
})
18+
},
19+
// ////////////////////////////////////////////////////////// Get Site Options
20+
// ---------------------------------------------------------------------------
21+
getSiteOptions () {
22+
return Axios
23+
.get(baseUrl + 'api/core/v2/site-options')
24+
.then((response) => {
25+
return response.data
26+
})
27+
.catch((error) => {
28+
return { error }
29+
})
30+
},
31+
// /////////////////////////////////////////////////////////// Get Single Page
32+
// ---------------------------------------------------------------------------
33+
getSinglePage (slug) {
34+
return Axios
35+
.get(baseUrl + 'api/core/v2/page/' + slug)
36+
.then((response) => {
37+
return response.data
38+
})
39+
.catch((error) => {
40+
return { error }
41+
})
42+
},
43+
// ///////////////////////////////////////////////////////// Get All CPT Posts
44+
// ---------------------------------------------------------------------------
45+
getAllCptPosts (cptName) {
46+
return Axios
47+
.get(baseUrl + 'api/core/v2/cpt/' + cptName)
48+
.then((response) => {
49+
return response.data
50+
})
51+
.catch((error) => {
52+
return { error }
53+
})
54+
}
55+
}

app.html

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!DOCTYPE html>
2+
<html {{ HTML_ATTRS }}>
3+
4+
<head {{ HEAD_ATTRS }}>
5+
{{ HEAD }}
6+
<link rel="apple-touch-icon" sizes="57x57" href="/favicon/apple-icon-57x57.png">
7+
<link rel="apple-touch-icon" sizes="60x60" href="/favicon/apple-icon-60x60.png">
8+
<link rel="apple-touch-icon" sizes="72x72" href="/favicon/apple-icon-72x72.png">
9+
<link rel="apple-touch-icon" sizes="76x76" href="/favicon/apple-icon-76x76.png">
10+
<link rel="apple-touch-icon" sizes="114x114" href="/favicon/apple-icon-114x114.png">
11+
<link rel="apple-touch-icon" sizes="120x120" href="/favicon/apple-icon-120x120.png">
12+
<link rel="apple-touch-icon" sizes="144x144" href="/favicon/apple-icon-144x144.png">
13+
<link rel="apple-touch-icon" sizes="152x152" href="/favicon/apple-icon-152x152.png">
14+
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-icon-180x180.png">
15+
<link rel="icon" type="image/png" sizes="192x192" href="/favicon/android-icon-192x192.png">
16+
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png">
17+
<link rel="icon" type="image/png" sizes="96x96" href="/favicon/favicon-96x96.png">
18+
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
19+
<link rel="manifest" href="/favicon/manifest.json">
20+
<meta name="msapplication-TileColor" content="#000000">
21+
<meta name="msapplication-TileImage" content="/favicon/ms-icon-144x144.png">
22+
<meta name="theme-color" content="#000000">
23+
</head>
24+
25+
<body {{ BODY_ATTRS }}>
26+
{{ APP }}
27+
<div id="dots-and-gradient"></div>
28+
<div id="canvas"></div>
29+
</body>
30+
31+
</html>

0 commit comments

Comments
 (0)