├── .gitignore
├── 19.gif
├── LICENSE
├── README.md
├── juejin
├── .editorconfig
├── .eslintrc.js
├── .gitignore
├── README.md
├── assets
│ ├── README.md
│ ├── font
│ │ ├── iconfont.eot
│ │ ├── iconfont.svg
│ │ ├── iconfont.ttf
│ │ └── iconfont.woff
│ ├── img
│ │ └── default.jpg
│ └── less
│ │ ├── define.less
│ │ ├── iconfont.less
│ │ ├── main.less
│ │ └── reset.less
├── backpack.config.js
├── build
│ ├── main.js
│ └── main.map
├── components
│ ├── Alert.vue
│ ├── Footer.vue
│ ├── Header.vue
│ ├── PostCell.vue
│ ├── README.md
│ └── loading.vue
├── config
│ ├── default.js
│ ├── development.js
│ ├── index.js
│ └── production.js
├── layouts
│ ├── README.md
│ ├── add.vue
│ ├── default.vue
│ ├── error.vue
│ └── regist.vue
├── middleware
│ ├── README.md
│ └── adminAuth.js
├── nuxt.config.js
├── package-lock.json
├── package.json
├── pages
│ ├── README.md
│ ├── index.vue
│ ├── posts
│ │ ├── _id.vue
│ │ ├── add.vue
│ │ └── index.vue
│ ├── regist
│ │ └── index.vue
│ └── user
│ │ └── _id.vue
├── plugins
│ ├── README.md
│ ├── axios.js
│ └── vue-notification.js
├── server
│ ├── api
│ │ ├── index.js
│ │ ├── posts.js
│ │ ├── signin.js
│ │ ├── signout.js
│ │ └── signup.js
│ ├── index.js
│ ├── lib
│ │ ├── sql.js
│ │ └── util.date.js
│ ├── middlewares
│ │ └── check.js
│ ├── models
│ │ ├── comments.js
│ │ ├── posts.js
│ │ └── users.js
│ └── views
│ │ ├── error.jade
│ │ ├── index.jade
│ │ └── layout.jade
├── static
│ ├── README.md
│ ├── assets
│ │ └── postImages
│ │ │ ├── 2016120801.png
│ │ │ ├── 2016121601.png
│ │ │ ├── 2016121602.png
│ │ │ ├── 2016121603.png
│ │ │ ├── 2016121604.png
│ │ │ ├── 2016121605.png
│ │ │ ├── 2017010401.png
│ │ │ ├── 2017010402.png
│ │ │ ├── 2017010403.png
│ │ │ ├── 2017010404.png
│ │ │ ├── 2017010405.png
│ │ │ ├── 2017010406.png
│ │ │ ├── 2017010407.png
│ │ │ ├── 2017011201.png
│ │ │ ├── 2017011202.png
│ │ │ ├── 2017040501.png
│ │ │ ├── 2017042601.png
│ │ │ ├── 2017042602.png
│ │ │ ├── 2017042603.png
│ │ │ ├── 2017050201.png
│ │ │ ├── 2017050202.png
│ │ │ └── home.jpg
│ ├── img
│ │ ├── 1.png
│ │ ├── 1515725808511.png
│ │ ├── 1515727064963.png
│ │ ├── 1515727090471.png
│ │ ├── 1515727141161.png
│ │ ├── 1515727186354.png
│ │ ├── 1515729594563.png
│ │ ├── 1515731040539.png
│ │ ├── 1515731077974.png
│ │ ├── 1515731207859.png
│ │ ├── 1515733291930.png
│ │ ├── 1515733415909.png
│ │ ├── 1515824367994.png
│ │ ├── 1515824455722.png
│ │ ├── 1515824668934.png
│ │ ├── 1516001084211.png
│ │ ├── 1516003699246.png
│ │ ├── 1516005815970.png
│ │ ├── 1516023012260.png
│ │ ├── 1516085175539.png
│ │ ├── 1516199442057.png
│ │ ├── 1516242571904.png
│ │ ├── favicon.ico
│ │ ├── headIcon.png
│ │ ├── upload_07bb571b7706cc09df03adef334ceac6.png
│ │ ├── upload_67b102bc50907f58c8318f50fc208416.jpg
│ │ └── upload_866d2b77767777d2563aa882200af1ca.png
│ ├── javascripts
│ │ ├── prism.js
│ │ └── screen.js
│ └── stylesheets
│ │ ├── github-markdown.css
│ │ ├── prism.css
│ │ └── style.css
├── util
│ ├── api.config.js
│ ├── assist.js
│ ├── cUtil.js
│ ├── cookieSessionStorate.js
│ ├── device.js
│ ├── userloginUtil.js
│ └── util.date.js
└── 命令列表.txt
└── 数据库表.sql
/.gitignore:
--------------------------------------------------------------------------------
1 | # Build and Release Folders
2 | bin/
3 | bin-debug/
4 | bin-release/
5 | [Oo]bj/ # FlashDevelop obj
6 | [Bb]in/ # FlashDevelop bin
7 |
8 | node_modules/
9 | coverage/
10 | logs/
11 | test/
12 |
13 | # Other files and folders
14 | .settings/
15 |
16 | # Executables
17 | *.swf
18 | *.air
19 | *.ipa
20 | *.apk
21 |
22 | # Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties`
23 | # should NOT be excluded as they contain compiler settings and other important
24 | # information for Eclipse / Flash Builder.
25 |
--------------------------------------------------------------------------------
/19.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huang303513/ExpressNuxtMysqlNginxBlog/3392ea52107993b0bb7773a2601d61a50e0cc04a/19.gif
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## 项目说明
2 |
3 | 1项目使用Express+mysql+nuxt+nginx写的一个项目。nuxt用于实现服务端渲染。nginx做代理服务器对静态资源代理
4 | 2项目环境是node的8.5。
5 | 3详情页使用markdown语法,使用ejs模板来渲染。兼容移动端和桌面端
6 | 4项目线上部署地址: www.huangchengdu.com 。欢迎访问。
7 | 5整个项目的配置在config目录下面。可以根据自己的情况修改配置。比如端口号、域名等等。
8 | 6这个项目是我玩node一年以来的结晶。O(∩_∩)O~。
9 | 7整个项目布局都是less写的,没有使用任何第三方框架。
10 |
11 |
12 | ## 项目运行
13 |
14 | ````javascript
15 | //部署,具体细节看下面
16 | npm install
17 | npm run build
18 | npm run start
19 | //开发
20 | npm run dev
21 | ````
22 |
23 | ## 关于nginx代理配置
24 |
25 | nginx的配置文件如下:
26 |
27 | ````javascript
28 | user www www;
29 | worker_processes 2;#设置值和CPU核心数一致
30 | error_log /usr/local/webserver/nginx/logs/nginx_error.log crit; #日志位置和日志级别
31 | pid /usr/local/webserver/nginx/nginx.pid;
32 | #Specifies the value for maximum file descriptors that can be opened by this process.
33 | worker_rlimit_nofile 65535;
34 | events
35 | {
36 | use epoll;
37 | worker_connections 65535;
38 | }
39 | http
40 | {
41 | include mime.types;
42 | default_type application/octet-stream;
43 | log_format main '$remote_addr - $remote_user [$time_local] "$request" '
44 | '$status $body_bytes_sent "$http_referer" '
45 | '"$http_user_agent" $http_x_forwarded_for';
46 |
47 | #charset gb2312;
48 |
49 | server_names_hash_bucket_size 128;
50 | client_header_buffer_size 32k;
51 | large_client_header_buffers 4 32k;
52 | client_max_body_size 8m;
53 |
54 | sendfile on;
55 | tcp_nopush on;
56 | keepalive_timeout 60;
57 | tcp_nodelay on;
58 | fastcgi_connect_timeout 300;
59 | fastcgi_send_timeout 300;
60 | fastcgi_read_timeout 300;
61 | fastcgi_buffer_size 64k;
62 | fastcgi_buffers 4 64k;
63 | fastcgi_busy_buffers_size 128k;
64 | fastcgi_temp_file_write_size 128k;
65 | gzip on;
66 | gzip_min_length 1k;
67 | gzip_buffers 4 16k;
68 | gzip_http_version 1.0;
69 | gzip_comp_level 2;
70 | gzip_types text/plain application/x-javascript text/css application/xml;
71 | gzip_vary on;
72 |
73 | #limit_zone crawler $binary_remote_addr 10m;
74 | upstream sample {
75 | server localhost:5389;
76 | #server 127.0.0.1:5389;
77 | #server 127.0.0.1:3001;
78 | keepalive 64;
79 | }
80 | #下面是server虚拟主机的配置
81 | server
82 | {
83 | listen 80;#监听端口
84 | server_name www.huangchengdu.com;
85 | rewrite ^(.*)$ https://$host$1 permanent;
86 | }
87 | server
88 | {
89 | listen 443;#监听端口
90 | server_name www.huangchengdu.com;
91 | ssl on;
92 | index index.html index.htm index.php;
93 | root /usr/local/webserver/nginx/html;#站点目录
94 | ssl_certificate cert/214353122570188.pem;
95 | ssl_certificate_key cert/214353122570188.key;
96 | ssl_session_timeout 5m;
97 | ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
98 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
99 | ssl_prefer_server_ciphers on;
100 | location / {
101 | proxy_redirect off;
102 | proxy_set_header X-Real-IP $remote_addr;
103 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
104 | proxy_set_header X-Forwarded-Proto $scheme;
105 | proxy_set_header Host $http_host;
106 | proxy_set_header X-NginX-Proxy true;
107 | proxy_set_header Connection "";
108 | proxy_http_version 1.1;
109 | proxy_pass http://sample;
110 | }
111 | location ~ .*\.(gif|jpg|JPG|jpeg|png|bmp|swf|ico)$
112 | {
113 | root /usr/local/webserver/nginx/static;
114 | expires 30d;
115 | #access_log off;
116 | }
117 | location ~ .*\.(js|css)?$
118 | {
119 | root /usr/local/webserver/nginx/static;
120 | expires 15d;
121 | #access_log off;
122 | }
123 | location ~ .*\.(html|htm)?$
124 | {
125 | root /usr/local/webserver/nginx/static;
126 | expires 30d;
127 | # #access_log off;
128 | }
129 | access_log off;
130 | }
131 |
132 | }
133 | ````
134 |
135 | `npm run build`以后,然后`npm run start`启动服务器。最后需要把`.nuxt/dist/`(build以后生成的)目录下面的所有文件和static(我这里是`/usr/local/webserver/nginx/static`)目录下的所有文件都放到代理服务器的静态资源根目录。
136 | 这样才能完整的使用样式表,如果不使用代理服务器就不用了。
137 |
138 |
139 | ## 关于nuxt
140 |
141 | nuxt是vue官方的服务端渲染框架。犹豫还是比较新颖的东西,坑比较多,我做的过程中也是踩坑不段。
142 | 本来还有一些功能想添加进去,精力有限暂且搞一个段落。
143 |
144 | ## 演示
145 |
146 | 
147 |
148 |
149 |
150 |
151 |
--------------------------------------------------------------------------------
/juejin/.editorconfig:
--------------------------------------------------------------------------------
1 | # editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_size = 4
6 | indent_style = space
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
14 |
--------------------------------------------------------------------------------
/juejin/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | parser: 'babel-eslint',
4 | env: {
5 | browser: true,
6 | node: true
7 | },
8 | extends: 'standard',
9 | // required to lint *.vue files
10 | plugins: [
11 | 'html'
12 | ],
13 | // add your custom rules here
14 | rules: {},
15 | globals: {}
16 | }
17 |
--------------------------------------------------------------------------------
/juejin/.gitignore:
--------------------------------------------------------------------------------
1 | # dependencies
2 | node_modules
3 |
4 | # logs
5 | npm-debug.log
6 |
7 | # Nuxt build
8 | .nuxt
9 |
10 | # Nuxt generate
11 | dist
12 | build/
13 | .nuxt
14 |
--------------------------------------------------------------------------------
/juejin/README.md:
--------------------------------------------------------------------------------
1 | # juejin
2 |
3 | > Nuxt.js project
4 |
5 | ## Build Setup
6 |
7 | ``` bash
8 | # install dependencies
9 | $ npm install # Or yarn install
10 |
11 | # serve with hot reload at localhost:3000
12 | $ npm run dev
13 |
14 | # build for production and launch server
15 | $ npm run build
16 | $ npm start
17 |
18 | # generate static project
19 | $ npm run generate
20 | ```
21 |
22 | For detailed explanation on how things work, checkout the [Nuxt.js docs](https://github.com/nuxt/nuxt.js).
23 |
--------------------------------------------------------------------------------
/juejin/assets/README.md:
--------------------------------------------------------------------------------
1 | # ASSETS
2 |
3 | This directory contains your un-compiled assets such as LESS, SASS, or JavaScript.
4 |
5 | More information about the usage of this directory in the documentation:
6 | https://nuxtjs.org/guide/assets#webpacked
7 |
8 | **This directory is not required, you can delete it if you don't want to use it.**
9 |
--------------------------------------------------------------------------------
/juejin/assets/font/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huang303513/ExpressNuxtMysqlNginxBlog/3392ea52107993b0bb7773a2601d61a50e0cc04a/juejin/assets/font/iconfont.eot
--------------------------------------------------------------------------------
/juejin/assets/font/iconfont.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
79 |
--------------------------------------------------------------------------------
/juejin/assets/font/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huang303513/ExpressNuxtMysqlNginxBlog/3392ea52107993b0bb7773a2601d61a50e0cc04a/juejin/assets/font/iconfont.ttf
--------------------------------------------------------------------------------
/juejin/assets/font/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huang303513/ExpressNuxtMysqlNginxBlog/3392ea52107993b0bb7773a2601d61a50e0cc04a/juejin/assets/font/iconfont.woff
--------------------------------------------------------------------------------
/juejin/assets/img/default.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huang303513/ExpressNuxtMysqlNginxBlog/3392ea52107993b0bb7773a2601d61a50e0cc04a/juejin/assets/img/default.jpg
--------------------------------------------------------------------------------
/juejin/assets/less/define.less:
--------------------------------------------------------------------------------
1 | @headerHeight: 4rem;
2 | @defaultWidth: 1080px;
3 | @defaultBGColor:#f1f2f2;
4 | @defaultDarkColor:#5e6469;
5 | @defaultBlue:#0b66fe;
6 | @darkTextColor:#999999;
7 | .page{
8 | width: 100%;
9 | margin: 4rem auto;
10 | background: #fff;
11 | border-radius: 4px;
12 | box-shadow: 0 0 6px rgba(100,100,100,0.4);
13 | transition: all ease-in 0.3s;
14 | padding: 0 2rem;
15 | }
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/juejin/assets/less/iconfont.less:
--------------------------------------------------------------------------------
1 |
2 | @font-face {font-family: "iconfont";
3 | src: url('../font/iconfont.eot?t=1515681059050'); /* IE9*/
4 | src: url('../font/iconfont.eot?t=1515681059050#iefix') format('embedded-opentype'), /* IE6-IE8 */
5 | url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAyUAAsAAAAAEuwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAAQwAAAFZW70pfY21hcAAAAYAAAADhAAACou8h35tnbHlmAAACZAAAB7QAAAro9WgWRmhlYWQAAAoYAAAALwAAADYQknBDaGhlYQAACkgAAAAgAAAAJAhXBAhobXR4AAAKaAAAABcAAABERGAAAGxvY2EAAAqAAAAAJAAAACQUOhbKbWF4cAAACqQAAAAfAAAAIAEiAHJuYW1lAAAKxAAAAUUAAAJtPlT+fXBvc3QAAAwMAAAAhQAAALJ0Z2jReJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkYWOcwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGBwYKl6kMTf8b2CIYW5kaAQKM4LkANz5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ANwHo7ACTgC3IA78EgnmzaWx9+8eWNPANzgBx6O3y33kT1cMjtyDRe4F65TfxBukF+Em2jjVbhF/U3YxzOmwm10YXmD17hi9oR3YQ8dfAjXcI1P4Tr1L+EG+Vu4iTv8CrfQ8erCPuZeV7iNRy/2x1YvnF6p5UHFockikzm/gple75KFrdLqnGtbxCZTg6BfSVOdaVvdU+zXQ+ciFVmTqgmrOkmMyq3Z6tAFG+fyUa8XiR6EJuVYY/62xgKOcQWFJQ6MMUIYZIjK6Og7VWb0r7FDwl57Vj3N53RbFNT/c4UBAvTPXFO6stJ5Ok+BPV8bUnV0K27LnpQ0kV7NSRKyQl7WtlRC6gE2ZVeOEXpc0Yk/KGdI/wAJWm7IAAAAeJxtyFkSgjAQRdE8CKM44D5cVEw6QBlpqhun3VuUv56vW9dk5qc1//XIkMOiQIkKNRq02KHDHgcccUKPs8HbXp2/We9kLXxipTJQopVsItX2zkKPOXIKdstKKArpWCo58WPuQrCel08T3ZNlWknrxam+WLYfqBuYwyVOKU3zYMwXjJMm+gAAAA==') format('woff'),
6 | url('../font/iconfont.ttf?t=1515681059050') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7 | url('../font/iconfont.svg?t=1515681059050#iconfont') format('svg'); /* iOS 4.1- */
8 | }
9 |
10 | .iconfont {
11 | font-family:"iconfont" !important;
12 | font-size:16px;
13 | font-style:normal;
14 | -webkit-font-smoothing: antialiased;
15 | -moz-osx-font-smoothing: grayscale;
16 | }
17 |
18 | .icon-back:before { content: "\e697"; }
19 |
20 | .icon-cart:before { content: "\e698"; }
21 |
22 | .icon-close:before { content: "\e69a"; }
23 |
24 | .icon-delete:before { content: "\e69d"; }
25 |
26 | .icon-less:before { content: "\e6a5"; }
27 |
28 | .icon-moreunfold:before { content: "\e6a6"; }
29 |
30 | .icon-more:before { content: "\e6a7"; }
31 |
32 | .icon-refresh:before { content: "\e6aa"; }
33 |
34 | .icon-search:before { content: "\e6ac"; }
35 |
36 | .icon-add:before { content: "\e6b9"; }
37 |
38 | .icon-copy:before { content: "\e744"; }
39 |
40 | .icon-favorites:before { content: "\e7ce"; }
41 |
42 | .icon-password:before { content: "\e82b"; }
43 |
44 | .icon-code:before { content: "\e842"; }
45 |
46 | .icon-good-filling:before { content: "\e866"; }
47 |
48 |
--------------------------------------------------------------------------------
/juejin/assets/less/main.less:
--------------------------------------------------------------------------------
1 | @import 'reset';
2 | @import 'define';
3 |
4 | html {
5 | font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
6 | // font-size: 16px;
7 | word-spacing: 1px;
8 | -ms-text-size-adjust: 100%;
9 | -webkit-text-size-adjust: 100%;
10 | -moz-osx-font-smoothing: grayscale;
11 | -webkit-font-smoothing: antialiased;
12 | box-sizing: border-box;
13 | }
14 |
15 | *,
16 | *:before,
17 | *:after {
18 | box-sizing: border-box;
19 | margin: 0;
20 | }
21 | #__nuxt {
22 | // width: @defaultWidth;
23 | width:100%;
24 | max-width: @defaultWidth;
25 | margin: 5rem auto 0 auto;
26 | height: 100%;
27 | }
28 | #__layout{
29 | width: 100%;
30 | height: 100%;
31 | }
32 | body{
33 | background-color: @defaultBGColor;
34 | }
35 |
--------------------------------------------------------------------------------
/juejin/assets/less/reset.less:
--------------------------------------------------------------------------------
1 | @charset "utf-8";
2 | html,
3 | body {
4 | height: 100%;
5 | }
6 |
7 | body,
8 | div,
9 | dl,
10 | dt,
11 | dd,
12 | ul,
13 | ol,
14 | li,
15 | h1,
16 | h2,
17 | h3,
18 | h4,
19 | h5,
20 | h6,
21 | pre,
22 | code,
23 | form,
24 | fieldset,
25 | legend,
26 | input,
27 | textarea,
28 | p,
29 | blockquote,
30 | th,
31 | td,
32 | hr,
33 | button,
34 | article,
35 | aside,
36 | details,
37 | figcaption,
38 | figure,
39 | footer,
40 | header,
41 | hgroup,
42 | menu,
43 | nav,
44 | section {
45 | margin: 0;
46 | padding: 0;
47 | }
48 |
49 | body,
50 | button,
51 | input,
52 | select,
53 | textarea {
54 | font: 400 0.75rem/1.5 Arial, 'Lucida Grande', Verdana, 'Microsoft YaHei', hei;
55 | }
56 |
57 | article,
58 | aside,
59 | details,
60 | figcaption,
61 | figure,
62 | footer,
63 | header,
64 | hgroup,
65 | menu,
66 | nav,
67 | section,
68 | iframe {
69 | display: block;
70 | }
71 |
72 | h1,
73 | h2,
74 | h3,
75 | h4,
76 | h5,
77 | h6 {
78 | font-size: 100%;
79 | font-weight: 500;
80 | }
81 |
82 | address,
83 | cite,
84 | dfn,
85 | em,
86 | var,
87 | i {
88 | font-style: normal;
89 | font-weight: 400;
90 | }
91 |
92 | dfn {
93 | font-family: Arial;
94 | }
95 |
96 | ul,
97 | ol {
98 | list-style: none;
99 | }
100 |
101 | a {
102 | color: #000;
103 | text-decoration: none;
104 | }
105 |
106 | a:hover {
107 | transition: color 0.2s linear;
108 | }
109 |
110 | fieldset,
111 | img,
112 | button,
113 | input {
114 | border: 0;
115 | }
116 |
117 | button,
118 | input,
119 | select,
120 | textarea {
121 | font-size: 100%;
122 | }
123 |
124 | table {
125 | border-collapse: collapse;
126 | border-spacing: 0;
127 | }
128 |
129 | input {
130 | -webkit-appearance: none;
131 | border-radius: 0;
132 | }
133 |
134 | body {
135 | // min-width: 16rem;
136 | // background: green;
137 | overflow-x: hidden;
138 | -webkit-text-size-adjust: none;
139 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
140 | -webkit-font-smoothing: antialiased;
141 | -moz-user-select: none;
142 | color: #000;
143 | }
144 |
145 | :focus {
146 | outline: 0;
147 | }
148 |
149 | .clearfix:after {
150 | clear: both;
151 | content: '.';
152 | display: block;
153 | height: 0;
154 | visibility: hidden;
155 | line-height: 0;
156 | }
157 |
158 | .clearfix {
159 | *zoom: 1;
160 | }
161 |
162 | .fl {
163 | float: left;
164 | }
165 |
166 | .fr {
167 | float: right;
168 | }
169 |
170 | .clear {
171 | clear: both;
172 | }
173 |
174 | .overflow {
175 | overflow: hidden;
176 | }
177 |
178 | .ellips {
179 | white-space: nowrap;
180 | overflow: hidden;
181 | text-overflow: ellipsis;
182 | }
--------------------------------------------------------------------------------
/juejin/backpack.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | webpack: (config, options, webpack) => {
3 | config.entry.main = './server/index.js'
4 | return config
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/juejin/components/Alert.vue:
--------------------------------------------------------------------------------
1 |
2 |
评论
17 |25 |-
26 |
27 |
28 |
29 |
32 |
33 |
34 |
35 |{{comment.author.name}} @{{comment.author.bio}}
30 | 31 |