Skip to content

Commit 4d72d09

Browse files
authored
Merge pull request #33 from luaChina/develop
Develop
2 parents bdda6e4 + 3e232aa commit 4d72d09

File tree

16 files changed

+3395
-3063
lines changed

16 files changed

+3395
-3063
lines changed

components/app-header.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
>
5454
</li>
5555
</ul>
56-
<no-ssr>
56+
<client-only>
5757
<div>
5858
<div v-if="user.id == 0">
5959
<router-link to="/login" rel="nofollow">
@@ -176,7 +176,7 @@
176176
</div>
177177
</div>
178178
</div>
179-
</no-ssr>
179+
</client-only>
180180
</div>
181181
</div>
182182
</nav>

layouts/default.vue

Lines changed: 69 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,94 @@
11
<template>
2-
<div>
3-
<nuxt />
4-
</div>
2+
<div class="bg-light d-flex flex-column main" id="app">
3+
<app-header></app-header>
4+
<div class="container pt-4 main-content">
5+
<nuxt />
6+
</div>
7+
<app-foot></app-foot>
8+
</div>
59
</template>
610
<script>
7-
export default { name: "layout" };
11+
import header from "~/components/app-header.vue";
12+
import footer from "~/components/app-footer.vue";
13+
import * as Sentry from "@sentry/browser";
14+
import { Integrations } from "@sentry/tracing";
15+
export default {
16+
name: "layout",
17+
components: {
18+
"app-header": header,
19+
"app-foot": footer
20+
},
21+
mounted() {
22+
this.$nextTick(() => {
23+
this.$nuxt.$loading.start();
24+
setTimeout(() => this.$nuxt.$loading.finish(), 500);
25+
});
26+
// init sentry
27+
Sentry.init({
28+
dsn: "https://[email protected]/1329324",
29+
integrations: [new Integrations.BrowserTracing()],
30+
tracesSampleRate: 1.0,
31+
});
32+
// init baidu seo
33+
var bp = document.createElement("script");
34+
bp.src = "https://zz.bdstatic.com/linksubmit/push.js";
35+
var s = document.getElementsByTagName("script")[0];
36+
s.parentNode.insertBefore(bp, s);
37+
}
38+
};
839
</script>
940
<style>
41+
.main {
42+
min-height: 100vh;
43+
}
44+
.main-content {
45+
flex: 1;
46+
}
1047
html {
11-
font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI",
12-
Roboto, "Helvetica Neue", Arial, sans-serif;
13-
font-size: 16px;
14-
word-spacing: 1px;
15-
-ms-text-size-adjust: 100%;
16-
-webkit-text-size-adjust: 100%;
17-
-moz-osx-font-smoothing: grayscale;
18-
-webkit-font-smoothing: antialiased;
19-
box-sizing: border-box;
48+
font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont,
49+
"Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
50+
font-size: 16px;
51+
word-spacing: 1px;
52+
-ms-text-size-adjust: 100%;
53+
-webkit-text-size-adjust: 100%;
54+
-moz-osx-font-smoothing: grayscale;
55+
-webkit-font-smoothing: antialiased;
56+
box-sizing: border-box;
2057
}
2158
2259
*,
2360
*:before,
2461
*:after {
25-
box-sizing: border-box;
26-
margin: 0;
62+
box-sizing: border-box;
63+
margin: 0;
2764
}
2865
2966
.button--green {
30-
display: inline-block;
31-
border-radius: 4px;
32-
border: 1px solid #3b8070;
33-
color: #3b8070;
34-
text-decoration: none;
35-
padding: 10px 30px;
67+
display: inline-block;
68+
border-radius: 4px;
69+
border: 1px solid #3b8070;
70+
color: #3b8070;
71+
text-decoration: none;
72+
padding: 10px 30px;
3673
}
3774
3875
.button--green:hover {
39-
color: #fff;
40-
background-color: #3b8070;
76+
color: #fff;
77+
background-color: #3b8070;
4178
}
4279
4380
.button--grey {
44-
display: inline-block;
45-
border-radius: 4px;
46-
border: 1px solid #35495e;
47-
color: #35495e;
48-
text-decoration: none;
49-
padding: 10px 30px;
50-
margin-left: 15px;
81+
display: inline-block;
82+
border-radius: 4px;
83+
border: 1px solid #35495e;
84+
color: #35495e;
85+
text-decoration: none;
86+
padding: 10px 30px;
87+
margin-left: 15px;
5188
}
5289
5390
.button--grey:hover {
54-
color: #fff;
55-
background-color: #35495e;
91+
color: #fff;
92+
background-color: #35495e;
5693
}
5794
</style>

nuxt.config.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,6 @@ module.exports = {
2525
"Lua 中国,这里是 Lua 论坛,为开发者提供学习交流的平台,Lua 中国需要你的力量!"
2626
}
2727
],
28-
link: [{ rel: "icon", type: "image/x-icon", href: "/favicon.ico" }],
29-
script: [
30-
{
31-
src:
32-
"https://lua-china-1256147061.file.myqcloud.com/static/js/sentry.min.js",
33-
crossorigin: "anonymous"
34-
},
35-
{
36-
src:
37-
"https://lua-china-1256147061.file.myqcloud.com/static/js/highlight.min.js",
38-
crossorigin: "anonymous"
39-
},
40-
{
41-
src:
42-
"https://lua-china-1256147061.file.myqcloud.com/static/js/lua.min.js",
43-
crossorigin: "anonymous"
44-
}
45-
]
4628
},
4729

4830
/*

0 commit comments

Comments
 (0)