Skip to content

Commit 453c1be

Browse files
committed
refactor: views consolidation + css fixes
1 parent a78c650 commit 453c1be

Some content is hidden

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

47 files changed

+189
-1055
lines changed

client/app.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import Hammer from 'hammerjs'
1919
import moment from 'moment'
2020
import VueMoment from 'vue-moment'
2121
import VueTour from 'vue-tour'
22+
import VueTreeNavigation from 'vue-tree-navigation'
2223
import store from './store'
2324

2425
// ====================================
@@ -100,6 +101,7 @@ Vue.use(VeeValidate, { events: '' })
100101
Vue.use(Vuetify)
101102
Vue.use(VueMoment, { moment })
102103
Vue.use(VueTour)
104+
Vue.use(VueTreeNavigation)
103105

104106
Vue.prototype.Velocity = Velocity
105107

@@ -136,7 +138,7 @@ let bootstrap = () => {
136138

137139
const i18n = localization.init()
138140
window.WIKI = new Vue({
139-
el: '#app',
141+
el: '#root',
140142
components: {},
141143
mixins: [helpers],
142144
provide: apolloProvider.provide(),

client/components/admin.vue

+4-6
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,7 @@
8080

8181
<script>
8282
import VueRouter from 'vue-router'
83-
84-
import adminStore from '@/store/admin'
85-
86-
/* global WIKI */
87-
88-
WIKI.$store.registerModule('admin', adminStore)
83+
import { get } from 'vuex-pathify'
8984
9085
const router = new VueRouter({
9186
mode: 'history',
@@ -121,6 +116,9 @@ export default {
121116
adminDrawerShown: true
122117
}
123118
},
119+
computed: {
120+
darkMode: get('site/dark')
121+
},
124122
router
125123
}
126124
</script>

client/components/admin/admin-theme.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export default {
108108
}
109109
},
110110
computed: {
111-
darkMode: sync('admin/theme@dark')
111+
darkMode: sync('site/dark')
112112
},
113113
mounted() {
114114
this.darkModeInitial = this.darkMode

client/components/common/nav-footer.vue

+27-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template lang="pug">
2-
v-footer.justify-center(:color='darkMode ? "" : "grey lighten-3"', inset)
2+
v-footer.justify-center(:color='color', inset)
33
.caption.grey--text.text--darken-1
44
span(v-if='company && company.length > 0') {{ $t('common:footer.copyright', { company: company, year: currentYear }) }} |&nbsp;
55
span {{ $t('common:footer.poweredBy') }} Wiki.js
@@ -20,6 +20,12 @@
2020
import { get, sync } from 'vuex-pathify'
2121
2222
export default {
23+
props: {
24+
altbg: {
25+
type: Boolean,
26+
default: false
27+
}
28+
},
2329
data() {
2430
return {
2531
currentYear: (new Date()).getFullYear()
@@ -29,7 +35,26 @@ export default {
2935
company: get('site/company'),
3036
notification: get('notification'),
3137
darkMode: get('site/dark'),
32-
notificationState: sync('notification@isActive')
38+
notificationState: sync('notification@isActive'),
39+
color() {
40+
if (this.altbg) {
41+
return 'altbg'
42+
} else if (!this.darkMode) {
43+
return 'grey lighten-3'
44+
} else {
45+
return ''
46+
}
47+
}
3348
}
3449
}
3550
</script>
51+
52+
<style lang="scss">
53+
.v-footer.altbg {
54+
background: mc('theme', 'primary');
55+
56+
span {
57+
color: mc('blue', '300');
58+
}
59+
}
60+
</style>

client/components/login.vue

+10-26
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<template lang="pug">
22
v-app
3-
nav-header
43
.login
54
.login-container(:class='{ "is-expanded": strategies.length > 1, "is-loading": isLoading }')
65
.login-mascot
@@ -35,20 +34,7 @@
3534
input(type='text', ref='iptTFA', v-model='securityCode', :placeholder='$t("auth:tfa.placeholder")', @keyup.enter='verifySecurityCode')
3635
button.button.is-blue.is-fullwidth(@click='verifySecurityCode')
3736
span {{ $t('auth:tfa.verifyToken') }}
38-
.login-copyright
39-
span {{ $t('common:footer.poweredBy') }}
40-
a(href='https://wiki.js.org', rel='external', title='Wiki.js') Wiki.js
41-
42-
v-snackbar(
43-
:color='notification.style'
44-
bottom,
45-
right,
46-
multi-line,
47-
v-model='notificationState'
48-
)
49-
.text-xs-left
50-
v-icon.mr-3(dark) {{ notification.icon }}
51-
span {{ notification.message }}
37+
nav-footer(altbg)
5238
</template>
5339

5440
<script>
@@ -145,7 +131,7 @@ export default {
145131
})
146132
} else {
147133
this.$store.commit('showNotification', {
148-
message: 'Login successful!',
134+
message: 'Login Successful! Redirecting...',
149135
style: 'success',
150136
icon: 'check'
151137
})
@@ -259,23 +245,22 @@ export default {
259245
&::before {
260246
content: '';
261247
position: absolute;
262-
background-image: url('../static/svg/login-bg.svg');
263-
background-position: center bottom;
248+
background-color: #0d47a1;
249+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' viewBox='0 0 1600 800'%3E%3Cg %3E%3Cpath fill='%231356b1' d='M486 705.8c-109.3-21.8-223.4-32.2-335.3-19.4C99.5 692.1 49 703 0 719.8V800h843.8c-115.9-33.2-230.8-68.1-347.6-92.2C492.8 707.1 489.4 706.5 486 705.8z'/%3E%3Cpath fill='%231866c1' d='M1600 0H0v719.8c49-16.8 99.5-27.8 150.7-33.5c111.9-12.7 226-2.4 335.3 19.4c3.4 0.7 6.8 1.4 10.2 2c116.8 24 231.7 59 347.6 92.2H1600V0z'/%3E%3Cpath fill='%231c75d2' d='M478.4 581c3.2 0.8 6.4 1.7 9.5 2.5c196.2 52.5 388.7 133.5 593.5 176.6c174.2 36.6 349.5 29.2 518.6-10.2V0H0v574.9c52.3-17.6 106.5-27.7 161.1-30.9C268.4 537.4 375.7 554.2 478.4 581z'/%3E%3Cpath fill='%231f86e2' d='M0 0v429.4c55.6-18.4 113.5-27.3 171.4-27.7c102.8-0.8 203.2 22.7 299.3 54.5c3 1 5.9 2 8.9 3c183.6 62 365.7 146.1 562.4 192.1c186.7 43.7 376.3 34.4 557.9-12.6V0H0z'/%3E%3Cpath fill='%232196f3' d='M181.8 259.4c98.2 6 191.9 35.2 281.3 72.1c2.8 1.1 5.5 2.3 8.3 3.4c171 71.6 342.7 158.5 531.3 207.7c198.8 51.8 403.4 40.8 597.3-14.8V0H0v283.2C59 263.6 120.6 255.7 181.8 259.4z'/%3E%3Cpath fill='%2355a4f5' d='M1600 0H0v136.3c62.3-20.9 127.7-27.5 192.2-19.2c93.6 12.1 180.5 47.7 263.3 89.6c2.6 1.3 5.1 2.6 7.7 3.9c158.4 81.1 319.7 170.9 500.3 223.2c210.5 61 430.8 49 636.6-16.6V0z'/%3E%3Cpath fill='%2374b2f7' d='M454.9 86.3C600.7 177 751.6 269.3 924.1 325c208.6 67.4 431.3 60.8 637.9-5.3c12.8-4.1 25.4-8.4 38.1-12.9V0H288.1c56 21.3 108.7 50.6 159.7 82C450.2 83.4 452.5 84.9 454.9 86.3z'/%3E%3Cpath fill='%238ec0f8' d='M1600 0H498c118.1 85.8 243.5 164.5 386.8 216.2c191.8 69.2 400 74.7 595 21.1c40.8-11.2 81.1-25.2 120.3-41.7V0z'/%3E%3Cpath fill='%23a5cffa' d='M1397.5 154.8c47.2-10.6 93.6-25.3 138.6-43.8c21.7-8.9 43-18.8 63.9-29.5V0H643.4c62.9 41.7 129.7 78.2 202.1 107.4C1020.4 178.1 1214.2 196.1 1397.5 154.8z'/%3E%3Cpath fill='%23bbdefb' d='M1315.3 72.4c75.3-12.6 148.9-37.1 216.8-72.4h-723C966.8 71 1144.7 101 1315.3 72.4z'/%3E%3C/g%3E%3C/svg%3E");
250+
background-attachment: fixed;
264251
background-size: cover;
252+
/* background by SVGBackgrounds.com */
253+
opacity: .5;
265254
top: 0;
266255
left: 0;
267256
width: 100vw;
268257
height: 100vh;
269-
270-
@include until($tablet) {
271-
display: none;
272-
}
273258
}
274259
275260
&::after {
276261
content: '';
277262
position: absolute;
278-
background-image: linear-gradient(to bottom, rgba(mc('blue', '800'), 1) 0%, rgba(mc('blue', '800'), 0) 100%);
263+
background-image: linear-gradient(to bottom, rgba(mc('blue', '800'), .9) 0%, rgba(mc('blue', '800'), 0) 100%);
279264
top: 0;
280265
left: 0;
281266
width: 100vw;
@@ -332,11 +317,11 @@ export default {
332317
}
333318
334319
@include until($tablet) {
335-
width: 100%;
320+
width: 95vw;
336321
border-radius: 0;
337322
338323
&.is-expanded {
339-
width: 100%;
324+
width: 95vw;
340325
}
341326
}
342327
}
@@ -365,7 +350,6 @@ export default {
365350
// border-top: 1px solid rgba(mc('light-blue', '900'), .5);
366351
background: linear-gradient(to right, rgba(0,0,0, .5), rgba(0,0,0, .7));
367352
border-top: 1px solid rgba(0,0,0, .2);
368-
font-family: $core-font-standard;
369353
font-weight: 600;
370354
text-align: left;
371355
min-height: 40px;

client/scss/app.scss

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
@import "global";
22

33
@import "base/base";
4-
@import 'base/icons';
54

65
@import "../libs/animate/animate";
76

87
@import 'components/markdown-content';
9-
@import 'components/btn';
10-
@import 'components/data-table';
11-
@import 'components/dialog';
8+
@import 'components/v-btn';
9+
@import 'components/v-data-table';
10+
@import 'components/v-dialog';
11+
@import 'components/vue-tree-navigation';
1212

1313
// @import '../libs/twemoji/twemoji-awesome';
1414
@import '../libs/prism/prism.css';
1515
@import '~vue-tour/dist/vue-tour.css';
16+
@import '~vue-status-indicator/styles.css';
1617
// @import 'node_modules/diff2html/dist/diff2html.min';
1718

1819
@import 'pages/welcome';

client/scss/base/base.scss

+1-66
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
html {
22
box-sizing: border-box;
3-
font-family: $core-font-standard;
43
height: 100%;
54
}
65
*, *:before, *:after {
@@ -11,75 +10,11 @@ html {
1110
display: none;
1211
}
1312

14-
#app {
13+
#root {
1514
position: relative;
1615
min-height: 100%;
1716

1817
&.is-fullscreen {
1918
height: 100vh;
2019
}
2120
}
22-
23-
// Container
24-
25-
.container {
26-
position: relative;
27-
}
28-
29-
.content {
30-
padding: 20px;
31-
}
32-
33-
.datatable {
34-
th, td {
35-
vertical-align: middle;
36-
}
37-
}
38-
39-
// Visibility
40-
41-
.is-hidden {
42-
display: none !important;
43-
}
44-
45-
.is-hidden-mobile {
46-
@include mobile {
47-
display: none !important;
48-
}
49-
}
50-
51-
.is-hidden-tablet {
52-
@include tablet {
53-
display: none !important;
54-
}
55-
}
56-
57-
.is-hidden-tablet-only {
58-
@include tablet-only {
59-
display: none !important;
60-
}
61-
}
62-
63-
.is-hidden-touch {
64-
@include touch {
65-
display: none !important;
66-
}
67-
}
68-
69-
.is-hidden-desktop {
70-
@include desktop {
71-
display: none !important;
72-
}
73-
}
74-
75-
.is-hidden-desktop-only {
76-
@include desktop-only {
77-
display: none !important;
78-
}
79-
}
80-
81-
.is-hidden-widescreen {
82-
@include widescreen {
83-
display: none !important;
84-
}
85-
}

client/scss/base/icons.scss

-39
This file was deleted.

client/scss/base/variables.scss

-25
This file was deleted.

0 commit comments

Comments
 (0)