mirror of https://github.com/requarks/wiki
parent
dd73b036d2
commit
52630127cd
After Width: | Height: | Size: 297 KiB |
Before Width: | Height: | Size: 138 KiB |
Before Width: | Height: | Size: 144 KiB |
Before Width: | Height: | Size: 134 KiB |
@ -1,17 +1,4 @@
|
|||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
let logic = document.documentElement.dataset.logic
|
require('./scss/app.scss')
|
||||||
|
require('./js/app.js')
|
||||||
switch (logic) {
|
|
||||||
case 'error':
|
|
||||||
require('./scss/error.scss')
|
|
||||||
break
|
|
||||||
case 'login':
|
|
||||||
require('./scss/login.scss')
|
|
||||||
require('./js/login.js')
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
require('./scss/app.scss')
|
|
||||||
require('./js/app.js')
|
|
||||||
break
|
|
||||||
}
|
|
||||||
|
@ -0,0 +1,153 @@
|
|||||||
|
'use strict'
|
||||||
|
|
||||||
|
/* global $, siteConfig */
|
||||||
|
/* eslint-disable no-new */
|
||||||
|
|
||||||
|
import Vue from 'vue'
|
||||||
|
import VueResource from 'vue-resource'
|
||||||
|
import VueClipboards from 'vue-clipboards'
|
||||||
|
import VueLodash from 'vue-lodash'
|
||||||
|
import store from './store'
|
||||||
|
import i18next from 'i18next'
|
||||||
|
import i18nextXHR from 'i18next-xhr-backend'
|
||||||
|
import VueI18Next from '@panter/vue-i18next'
|
||||||
|
import 'jquery-contextmenu'
|
||||||
|
import 'jquery-simple-upload'
|
||||||
|
import 'jquery-smooth-scroll'
|
||||||
|
import 'jquery-sticky'
|
||||||
|
|
||||||
|
// ====================================
|
||||||
|
// Load Helpers
|
||||||
|
// ====================================
|
||||||
|
|
||||||
|
import helpers from './helpers'
|
||||||
|
import _ from './helpers/lodash'
|
||||||
|
|
||||||
|
// ====================================
|
||||||
|
// Load Vue Components
|
||||||
|
// ====================================
|
||||||
|
|
||||||
|
import alertComponent from './components/alert.vue'
|
||||||
|
import anchorComponent from './components/anchor.vue'
|
||||||
|
import colorPickerComponent from './components/color-picker.vue'
|
||||||
|
import editorCodeblockComponent from './components/editor-codeblock.vue'
|
||||||
|
import editorFileComponent from './components/editor-file.vue'
|
||||||
|
import editorVideoComponent from './components/editor-video.vue'
|
||||||
|
import historyComponent from './components/history.vue'
|
||||||
|
import loadingSpinnerComponent from './components/loading-spinner.vue'
|
||||||
|
import modalCreatePageComponent from './components/modal-create-page.vue'
|
||||||
|
import modalCreateUserComponent from './components/modal-create-user.vue'
|
||||||
|
import modalDeleteUserComponent from './components/modal-delete-user.vue'
|
||||||
|
import modalDiscardPageComponent from './components/modal-discard-page.vue'
|
||||||
|
import modalMovePageComponent from './components/modal-move-page.vue'
|
||||||
|
import modalProfile2faComponent from './components/modal-profile-2fa.vue'
|
||||||
|
import modalUpgradeSystemComponent from './components/modal-upgrade-system.vue'
|
||||||
|
import pageLoaderComponent from './components/page-loader.vue'
|
||||||
|
import searchComponent from './components/search.vue'
|
||||||
|
import toggleComponent from './components/toggle.vue'
|
||||||
|
import treeComponent from './components/tree.vue'
|
||||||
|
|
||||||
|
import adminEditUserComponent from './pages/admin-edit-user.component.js'
|
||||||
|
import adminProfileComponent from './pages/admin-profile.component.js'
|
||||||
|
import adminSettingsComponent from './pages/admin-settings.component.js'
|
||||||
|
import adminThemeComponent from './pages/admin-theme.component.js'
|
||||||
|
import contentViewComponent from './pages/content-view.component.js'
|
||||||
|
import editorComponent from './components/editor.component.js'
|
||||||
|
import sourceViewComponent from './pages/source-view.component.js'
|
||||||
|
|
||||||
|
// ====================================
|
||||||
|
// Initialize Vue Modules
|
||||||
|
// ====================================
|
||||||
|
|
||||||
|
Vue.use(VueResource)
|
||||||
|
Vue.use(VueClipboards)
|
||||||
|
Vue.use(VueI18Next)
|
||||||
|
Vue.use(VueLodash, _)
|
||||||
|
Vue.use(helpers)
|
||||||
|
|
||||||
|
// ====================================
|
||||||
|
// Register Vue Components
|
||||||
|
// ====================================
|
||||||
|
|
||||||
|
Vue.component('alert', alertComponent)
|
||||||
|
Vue.component('adminEditUser', adminEditUserComponent)
|
||||||
|
Vue.component('adminProfile', adminProfileComponent)
|
||||||
|
Vue.component('adminSettings', adminSettingsComponent)
|
||||||
|
Vue.component('adminTheme', adminThemeComponent)
|
||||||
|
Vue.component('anchor', anchorComponent)
|
||||||
|
Vue.component('colorPicker', colorPickerComponent)
|
||||||
|
Vue.component('contentView', contentViewComponent)
|
||||||
|
Vue.component('editor', editorComponent)
|
||||||
|
Vue.component('editorCodeblock', editorCodeblockComponent)
|
||||||
|
Vue.component('editorFile', editorFileComponent)
|
||||||
|
Vue.component('editorVideo', editorVideoComponent)
|
||||||
|
Vue.component('history', historyComponent)
|
||||||
|
Vue.component('loadingSpinner', loadingSpinnerComponent)
|
||||||
|
Vue.component('modalCreatePage', modalCreatePageComponent)
|
||||||
|
Vue.component('modalCreateUser', modalCreateUserComponent)
|
||||||
|
Vue.component('modalDeleteUser', modalDeleteUserComponent)
|
||||||
|
Vue.component('modalDiscardPage', modalDiscardPageComponent)
|
||||||
|
Vue.component('modalMovePage', modalMovePageComponent)
|
||||||
|
Vue.component('modalProfile2fa', modalProfile2faComponent)
|
||||||
|
Vue.component('modalUpgradeSystem', modalUpgradeSystemComponent)
|
||||||
|
Vue.component('pageLoader', pageLoaderComponent)
|
||||||
|
Vue.component('search', searchComponent)
|
||||||
|
Vue.component('sourceView', sourceViewComponent)
|
||||||
|
Vue.component('toggle', toggleComponent)
|
||||||
|
Vue.component('tree', treeComponent)
|
||||||
|
|
||||||
|
// ====================================
|
||||||
|
// Load Localization strings
|
||||||
|
// ====================================
|
||||||
|
|
||||||
|
i18next
|
||||||
|
.use(i18nextXHR)
|
||||||
|
.init({
|
||||||
|
backend: {
|
||||||
|
loadPath: siteConfig.path + '/js/i18n/{{lng}}.json'
|
||||||
|
},
|
||||||
|
lng: siteConfig.lang,
|
||||||
|
fallbackLng: siteConfig.lang
|
||||||
|
})
|
||||||
|
|
||||||
|
$(() => {
|
||||||
|
// ====================================
|
||||||
|
// Notifications
|
||||||
|
// ====================================
|
||||||
|
|
||||||
|
$(window).bind('beforeunload', () => {
|
||||||
|
store.dispatch('startLoading')
|
||||||
|
})
|
||||||
|
$(document).ajaxSend(() => {
|
||||||
|
store.dispatch('startLoading')
|
||||||
|
}).ajaxComplete(() => {
|
||||||
|
store.dispatch('stopLoading')
|
||||||
|
})
|
||||||
|
|
||||||
|
// ====================================
|
||||||
|
// Bootstrap Vue
|
||||||
|
// ====================================
|
||||||
|
|
||||||
|
const i18n = new VueI18Next(i18next)
|
||||||
|
if (document.querySelector('#root')) {
|
||||||
|
window.wikijs = new Vue({
|
||||||
|
mixins: [helpers],
|
||||||
|
components: {},
|
||||||
|
store,
|
||||||
|
i18n,
|
||||||
|
el: '#root',
|
||||||
|
methods: {
|
||||||
|
changeTheme(opts) {
|
||||||
|
this.$el.className = `has-stickynav is-primary-${opts.primary} is-alternate-${opts.alt}`
|
||||||
|
this.$refs.header.className = `nav is-${opts.primary}`
|
||||||
|
this.$refs.footer.className = `footer is-${opts.footer}`
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
$('a:not(.toc-anchor)').smoothScroll({ speed: 500, offset: -50 })
|
||||||
|
$('#header').sticky({ topSpacing: 0 })
|
||||||
|
$('.sidebar-pagecontents').sticky({ topSpacing: 15, bottomSpacing: 75 })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
@ -1,7 +0,0 @@
|
|||||||
'use strict'
|
|
||||||
|
|
||||||
/* global $ */
|
|
||||||
|
|
||||||
$(() => {
|
|
||||||
$('#login-user').focus()
|
|
||||||
})
|
|
@ -1,306 +1,161 @@
|
|||||||
|
.login {
|
||||||
body {
|
background-size: cover;
|
||||||
padding: 0;
|
background-position: center center;
|
||||||
margin: 0;
|
background-image: url('../images/bg.jpg');
|
||||||
font-family: $core-font-standard;
|
width: 100%;
|
||||||
font-size: 14px;
|
height: 100%;
|
||||||
}
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
a {
|
justify-content: center;
|
||||||
color: #FFF;
|
|
||||||
transition: color 0.4s ease;
|
&-container {
|
||||||
text-decoration: none;
|
display: flex;
|
||||||
|
width: 650px;
|
||||||
&:hover {
|
align-items: stretch;
|
||||||
color: mc('orange','600');
|
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
|
||||||
text-decoration: underline;
|
}
|
||||||
}
|
|
||||||
|
&-providers {
|
||||||
}
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
#bg {
|
width: 200px;
|
||||||
position: fixed;
|
border: 1px solid #FFF;
|
||||||
top: 0;
|
background-color: mc('grey', '900');
|
||||||
left: 0;
|
z-index: 1;
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
button {
|
||||||
z-index: 1;
|
flex: 1 1;
|
||||||
background-color: #000;
|
padding: 0 15px;
|
||||||
|
border: none;
|
||||||
> div {
|
color: #FFF;
|
||||||
background-size: cover;
|
background-color: mc('grey', '800');
|
||||||
background-position: center center;
|
border-top: 1px solid mc('grey', '900');
|
||||||
width: 100%;
|
font-family: $core-font-standard;
|
||||||
height: 100%;
|
font-weight: 600;
|
||||||
position: absolute;
|
text-align: left;
|
||||||
top: 0;
|
min-height: 40px;
|
||||||
left: 0;
|
|
||||||
opacity: 0;
|
&:first-child {
|
||||||
visibility: hidden;
|
border-top: none;
|
||||||
transition: opacity 3s ease, visibility 3s;
|
}
|
||||||
animation: bg 30s linear infinite;
|
|
||||||
|
&.is-active {
|
||||||
&:nth-child(1) {
|
background-color: mc('grey', '100');
|
||||||
animation-delay: 10s;
|
background-image: radial-gradient(circle at top left, rgba(mc('grey', '200'),1) 0%,rgba(255,255,255,1) 100%);
|
||||||
}
|
color: mc('grey', '700');
|
||||||
|
}
|
||||||
&:nth-child(2) {
|
|
||||||
animation-delay: 20s;
|
i {
|
||||||
}
|
margin-right: 10px;
|
||||||
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
span {
|
||||||
|
font-weight: 600;
|
||||||
#root {
|
}
|
||||||
position: fixed;
|
}
|
||||||
top: 15vh;
|
}
|
||||||
left: 10vw;
|
|
||||||
z-index: 2;
|
&-frame {
|
||||||
color: #FFF;
|
background-image: radial-gradient(circle at top left, rgba(255,255,255,1) 0%,rgba(240,240,240,.6) 100%);
|
||||||
display: flex;
|
border: 1px solid #FFF;
|
||||||
flex-direction: column;
|
width: 450px;
|
||||||
|
padding: 1rem;
|
||||||
h1 {
|
color: mc('grey', '700');
|
||||||
font-size: 4rem;
|
display: flex;
|
||||||
font-weight: bold;
|
justify-content: center;
|
||||||
color: #FFF;
|
flex-direction: column;
|
||||||
padding: 0;
|
text-align: center;
|
||||||
margin: 0;
|
|
||||||
animation: headerIntro 3s ease;
|
h1 {
|
||||||
}
|
font-size: 2rem;
|
||||||
|
font-weight: 600;
|
||||||
h2 {
|
color: mc('grey', '700');
|
||||||
font-size: 1.5rem;
|
padding: 0;
|
||||||
font-weight: normal;
|
margin: 0;
|
||||||
color: rgba(255,255,255,0.7);
|
}
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 25px 0;
|
h2 {
|
||||||
animation: headerIntro 3s ease;
|
font-size: 1.5rem;
|
||||||
}
|
font-weight: 300;
|
||||||
|
color: mc('grey', '700');
|
||||||
h3 {
|
padding: 0;
|
||||||
font-size: 1.25rem;
|
margin: 0 0 25px 0;
|
||||||
font-weight: normal;
|
}
|
||||||
color: #FB8C00;
|
|
||||||
padding: 0;
|
h3 {
|
||||||
margin: 0;
|
font-size: 1.25rem;
|
||||||
animation: shake 1s ease;
|
font-weight: normal;
|
||||||
|
color: #FB8C00;
|
||||||
> .fa {
|
padding: 0;
|
||||||
margin-right: 7px;
|
margin: 0;
|
||||||
}
|
animation: shake 1s ease;
|
||||||
|
|
||||||
}
|
> .fa {
|
||||||
|
margin-right: 7px;
|
||||||
h4 {
|
}
|
||||||
font-size: 0.8rem;
|
|
||||||
font-weight: normal;
|
}
|
||||||
color: rgba(255,255,255,0.7);
|
|
||||||
padding: 0;
|
h4 {
|
||||||
margin: 0 0 15px 0;
|
font-size: .8rem;
|
||||||
animation: fadeIn 3s ease;
|
font-weight: normal;
|
||||||
}
|
color: rgba(255,255,255,0.7);
|
||||||
|
padding: 0;
|
||||||
form {
|
margin: 0 0 15px 0;
|
||||||
display: flex;
|
animation: fadeIn 3s ease;
|
||||||
flex-direction: column;
|
}
|
||||||
}
|
|
||||||
|
form {
|
||||||
input[type=text], input[type=password] {
|
display: flex;
|
||||||
width: 350px;
|
flex-direction: column;
|
||||||
max-width: 80vw;
|
}
|
||||||
border: 1px solid rgba(255,255,255,0.3);
|
|
||||||
border-radius: 3px;
|
input[type=text], input[type=password] {
|
||||||
background-color: rgba(0,0,0,0.2);
|
width: 100%;
|
||||||
padding: 0 15px;
|
border: 1px solid #FFF;
|
||||||
height: 40px;
|
border-radius: 3px;
|
||||||
margin: 0 0 10px 0;
|
background-color: rgba(255,255,255,.7);
|
||||||
color: #FFF;
|
padding: 0 15px;
|
||||||
font-weight: bold;
|
height: 40px;
|
||||||
font-size: 14px;
|
margin: 0 0 10px 0;
|
||||||
transition: all 0.4s ease;
|
color: mc('grey', '700');
|
||||||
|
font-weight: 600;
|
||||||
&:focus {
|
font-size: .8rem;
|
||||||
outline: none;
|
transition: all 0.4s ease;
|
||||||
border-color: mc('orange','600');
|
text-align: center;
|
||||||
}
|
|
||||||
|
&:focus {
|
||||||
}
|
outline: none;
|
||||||
|
border-color: mc('grey','400');
|
||||||
button {
|
}
|
||||||
background-color: mc('orange','600');
|
|
||||||
color: #FFF;
|
}
|
||||||
border: 1px solid lighten(mc('orange','600'), 10%);
|
|
||||||
border-radius: 3px;
|
}
|
||||||
height: 40px;
|
|
||||||
width: 125px;
|
&-copyright {
|
||||||
padding: 0;
|
display: flex;
|
||||||
font-weight: bold;
|
align-items: center;
|
||||||
margin: 15px 0 0 0;
|
justify-content: center;
|
||||||
transition: all 0.4s ease;
|
position: absolute;
|
||||||
cursor: pointer;
|
left: 0;
|
||||||
|
bottom: 10vh;
|
||||||
span {
|
width: 100%;
|
||||||
font-weight: bold;
|
z-index: 2;
|
||||||
}
|
color: #FFF;
|
||||||
|
font-weight: 400;
|
||||||
&:focus {
|
text-shadow: 1px 1px 0 #000;
|
||||||
outline: none;
|
|
||||||
border-color: #FFF;
|
.icon {
|
||||||
}
|
font-size: 1.2rem;
|
||||||
|
margin: 0 8px;
|
||||||
&:hover {
|
}
|
||||||
background-color: darken(mc('orange','600'), 10%);
|
|
||||||
}
|
a {
|
||||||
|
font-weight: 600;
|
||||||
}
|
color: #FFF;
|
||||||
|
}
|
||||||
#social {
|
|
||||||
margin-top: 25px;
|
}
|
||||||
|
|
||||||
> span {
|
|
||||||
display: block;
|
|
||||||
font-weight: bold;
|
|
||||||
color: rgba(255,255,255,0.7);
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
margin-right: 5px;
|
|
||||||
width: auto;
|
|
||||||
padding: 0 15px;
|
|
||||||
|
|
||||||
> i {
|
|
||||||
margin-right: 10px;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.ms {
|
|
||||||
background-color: mc('blue','600');
|
|
||||||
border-color: lighten(mc('blue','600'), 10%);
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
border-color: #FFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background-color: darken(mc('blue','600'), 10%);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
&.google {
|
|
||||||
background-color: mc('light-blue','600');
|
|
||||||
border-color: lighten(mc('light-blue','600'), 10%);
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
border-color: #FFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background-color: darken(mc('light-blue','600'), 10%);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
&.facebook {
|
|
||||||
background-color: mc('indigo','600');
|
|
||||||
border-color: lighten(mc('indigo','600'), 10%);
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
border-color: #FFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background-color: darken(mc('indigo','600'), 10%);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
&.github {
|
|
||||||
background-color: mc('blue-grey','700');
|
|
||||||
border-color: lighten(mc('blue-grey','700'), 10%);
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
border-color: #FFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background-color: darken(mc('blue-grey','700'), 10%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.slack {
|
|
||||||
background-color: mc('purple','700');
|
|
||||||
border-color: lighten(mc('purple','700'), 10%);
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
border-color: #FFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background-color: darken(mc('purple','700'), 10%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#copyright {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: flex-start;
|
|
||||||
position: absolute;
|
|
||||||
left: 10vw;
|
|
||||||
bottom: 10vh;
|
|
||||||
z-index: 2;
|
|
||||||
color: rgba(255,255,255,0.5);
|
|
||||||
font-weight: bold;
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
font-size: 1.2rem;
|
|
||||||
margin: 0 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
opacity: 0.75;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@include keyframes(bg) {
|
|
||||||
0% {
|
|
||||||
@include prefix(transform, scale(1,1));
|
|
||||||
visibility: visible;
|
|
||||||
opacity: 0;
|
|
||||||
},
|
|
||||||
5% {
|
|
||||||
opacity: 0.5;
|
|
||||||
},
|
|
||||||
33% {
|
|
||||||
opacity: 0.5;
|
|
||||||
},
|
|
||||||
38% {
|
|
||||||
@include prefix(transform, scale(1.2, 1.2));
|
|
||||||
opacity: 0;
|
|
||||||
},
|
|
||||||
39% {
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
visibility: hidden;
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@include keyframes(headerIntro) {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,75 +1,54 @@
|
|||||||
doctype html
|
extends ../master.pug
|
||||||
html(data-logic='login')
|
|
||||||
head
|
|
||||||
meta(http-equiv='X-UA-Compatible', content='IE=edge')
|
|
||||||
meta(charset='UTF-8')
|
|
||||||
meta(name='viewport', content='width=device-width, initial-scale=1')
|
|
||||||
meta(name='theme-color', content='#009688')
|
|
||||||
meta(name='msapplication-TileColor', content='#009688')
|
|
||||||
meta(name='msapplication-TileImage', content='/favicons/ms-icon-144x144.png')
|
|
||||||
title= appconfig.title
|
|
||||||
|
|
||||||
// Favicon
|
|
||||||
each favsize in [57, 60, 72, 76, 114, 120, 144, 152, 180]
|
|
||||||
link(rel='apple-touch-icon', sizes=favsize + 'x' + favsize, href='/favicons/apple-icon-' + favsize + 'x' + favsize + '.png')
|
|
||||||
link(rel='icon', type='image/png', sizes='192x192', href='/favicons/android-icon-192x192.png')
|
|
||||||
each favsize in [32, 96, 16]
|
|
||||||
link(rel='icon', type='image/png', sizes=favsize + 'x' + favsize, href='/favicons/favicon-' + favsize + 'x' + favsize + '.png')
|
|
||||||
link(rel='manifest', href='/manifest.json')
|
|
||||||
|
|
||||||
// JS / CSS
|
|
||||||
script(type='text/javascript', src=appconfig.host + '/js/vendor.js')
|
|
||||||
script(type='text/javascript', src=appconfig.host + '/js/app.js')
|
|
||||||
|
|
||||||
|
block body
|
||||||
body
|
body
|
||||||
#bg
|
.login#root
|
||||||
each bg in _.sampleSize([1, 2, 3],3)
|
.login-container
|
||||||
div(style='background-image:url(/images/bg_' + bg + '.jpg);')
|
if config.authStrategies.socialEnabled
|
||||||
#root
|
.login-providers
|
||||||
h1= appconfig.title
|
button.is-active(onclick='window.location.assign("/login/ms")')
|
||||||
h2= t('auth:loginrequired')
|
i.nc-icon-outline.ui-1_database
|
||||||
if appflash.length > 0
|
span= t('auth:providers.local')
|
||||||
h3
|
if config.auth.microsoft && config.auth.microsoft.enabled
|
||||||
i.icon-warning-outline
|
button(onclick='window.location.assign("/login/ms")')
|
||||||
= appflash[0].title
|
i.icon-windows2
|
||||||
h4= appflash[0].message
|
span= t('auth:providers.windowslive')
|
||||||
if appconfig.auth.local.enabled
|
if config.auth.azure && config.auth.azure.enabled
|
||||||
form(method='post', action='/login')
|
button(onclick='window.location.assign("/login/azure")')
|
||||||
input#login-user(type='text', name='email', placeholder=t('auth:fields.emailuser'))
|
i.icon-windows2
|
||||||
input#login-pass(type='password', name='password', placeholder=t('auth:fields.password'))
|
span= t('auth:providers.azure')
|
||||||
button(type='submit')= t('auth:actions.login')
|
if config.auth.google && config.auth.google.enabled
|
||||||
if appconfig.authStrategies.socialEnabled
|
button(onclick='window.location.assign("/login/google")')
|
||||||
#social
|
i.icon-google
|
||||||
if appconfig.auth.local.enabled
|
span= t('auth:providers.google')
|
||||||
span= t('auth:loginusingalt')
|
if config.auth.facebook && config.auth.facebook.enabled
|
||||||
else
|
button(onclick='window.location.assign("/login/facebook")')
|
||||||
span= t('auth:loginusing')
|
i.icon-facebook
|
||||||
if appconfig.auth.microsoft && appconfig.auth.microsoft.enabled
|
span= t('auth:providers.facebook')
|
||||||
button.ms(onclick='window.location.assign("/login/ms")')
|
if config.auth.github && config.auth.github.enabled
|
||||||
i.icon-windows2
|
button(onclick='window.location.assign("/login/github")')
|
||||||
span= t('auth:providers.windowslive')
|
i.icon-github
|
||||||
if appconfig.auth.azure && appconfig.auth.azure.enabled
|
span= t('auth:providers.github')
|
||||||
button.ms(onclick='window.location.assign("/login/azure")')
|
if config.auth.slack && config.auth.slack.enabled
|
||||||
i.icon-windows2
|
button(onclick='window.location.assign("/login/slack")')
|
||||||
span= t('auth:providers.azure')
|
i.icon-slack
|
||||||
if appconfig.auth.google && appconfig.auth.google.enabled
|
span= t('auth:providers.slack')
|
||||||
button.google(onclick='window.location.assign("/login/google")')
|
.login-frame
|
||||||
i.icon-google
|
h1= config.site.title
|
||||||
span= t('auth:providers.google')
|
h2= t('auth:loginrequired')
|
||||||
if appconfig.auth.facebook && appconfig.auth.facebook.enabled
|
if appflash.length > 0
|
||||||
button.facebook(onclick='window.location.assign("/login/facebook")')
|
h3
|
||||||
i.icon-facebook
|
i.icon-warning-outline
|
||||||
span= t('auth:providers.facebook')
|
= appflash[0].title
|
||||||
if appconfig.auth.github && appconfig.auth.github.enabled
|
h4= appflash[0].message
|
||||||
button.github(onclick='window.location.assign("/login/github")')
|
if config.auth.local.enabled
|
||||||
i.icon-github
|
form(method='post', action='/login')
|
||||||
span= t('auth:providers.github')
|
input#login-user(type='text', name='email', placeholder=t('auth:fields.emailuser'))
|
||||||
if appconfig.auth.slack && appconfig.auth.slack.enabled
|
input#login-pass(type='password', name='password', placeholder=t('auth:fields.password'))
|
||||||
button.slack(onclick='window.location.assign("/login/slack")')
|
button.button.is-light-green.is-fullwidth(type='submit')
|
||||||
i.icon-slack
|
span= t('auth:actions.login')
|
||||||
span= t('auth:providers.slack')
|
.login-copyright
|
||||||
#copyright
|
= t('footer.poweredby') + ' '
|
||||||
= t('footer.poweredby') + ' '
|
a.icon(href='https://github.com/Requarks/wiki')
|
||||||
a.icon(href='https://github.com/Requarks/wiki')
|
i.icon-github
|
||||||
i.icon-github
|
a(href='https://wiki.requarks.io/') Wiki.js
|
||||||
a(href='https://wiki.requarks.io/') Wiki.js
|
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
doctype html
|
||||||
|
html
|
||||||
|
head
|
||||||
|
meta(http-equiv='X-UA-Compatible', content='IE=edge')
|
||||||
|
meta(charset='UTF-8')
|
||||||
|
meta(name='viewport', content='width=device-width, initial-scale=1')
|
||||||
|
meta(name='theme-color', content='#009688')
|
||||||
|
meta(name='msapplication-TileColor', content='#009688')
|
||||||
|
meta(name='msapplication-TileImage', content=config.site.path + '/favicons/ms-icon-144x144.png')
|
||||||
|
title= config.title
|
||||||
|
|
||||||
|
//- Favicon
|
||||||
|
each favsize in [57, 60, 72, 76, 114, 120, 144, 152, 180]
|
||||||
|
link(rel='apple-touch-icon', sizes=favsize + 'x' + favsize, href=config.site.path + '/favicons/apple-icon-' + favsize + 'x' + favsize + '.png')
|
||||||
|
link(rel='icon', type='image/png', sizes='192x192', href=config.site.path + '/favicons/android-icon-192x192.png')
|
||||||
|
each favsize in [32, 96, 16]
|
||||||
|
link(rel='icon', type='image/png', sizes=favsize + 'x' + favsize, href=config.site.path + '/favicons/favicon-' + favsize + 'x' + favsize + '.png')
|
||||||
|
link(rel='manifest', href=config.site.path + '/manifest.json')
|
||||||
|
|
||||||
|
//- Site Lang
|
||||||
|
script.
|
||||||
|
var siteConfig = !{JSON.stringify(config.site)}
|
||||||
|
|
||||||
|
//- JS / CSS
|
||||||
|
script(type='text/javascript', src=config.site.path + '/js/vendor.js')
|
||||||
|
script(type='text/javascript', src=config.site.path + '/js/app.js')
|
||||||
|
|
||||||
|
block head
|
||||||
|
|
||||||
|
block body
|
Loading…
Reference in new issue