mirror of https://github.com/requarks/wiki
parent
75eb277401
commit
7e62c01ed1
@ -1,6 +0,0 @@
|
||||
query($locale: String!, $namespace: String!) {
|
||||
translations(locale:$locale, namespace:$namespace) {
|
||||
key
|
||||
value
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
query($locale: String!, $namespace: String!) {
|
||||
localization {
|
||||
translations(locale:$locale, namespace:$namespace) {
|
||||
key
|
||||
value
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
.notfound {
|
||||
background: linear-gradient(to bottom, darken(mc('red', '900'), 25%) 0%, mc('red', '600') 100%);
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: mc('grey', '50');
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
display:block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-image: url('../static/svg/motif-circuit.svg');
|
||||
background-position: center center;
|
||||
background-repeat: repeat;
|
||||
background-size: 200px;
|
||||
z-index: 0;
|
||||
opacity: .75;
|
||||
animation: onboardingBgReveal 80s linear infinite;
|
||||
|
||||
@include keyframes(onboardingBgReveal) {
|
||||
0% {
|
||||
background-position-y: 0;
|
||||
}
|
||||
100% {
|
||||
background-position-y: -2000px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
background-color: transparent;
|
||||
background-image: url('../static/svg/motif-overlay.svg');
|
||||
background-attachment: fixed;
|
||||
background-size: cover;
|
||||
opacity: .5;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
&-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
img {
|
||||
height: 250px;
|
||||
margin-bottom: 3rem;
|
||||
z-index: 2;
|
||||
animation-duration: 2s;
|
||||
|
||||
@include until($tablet) {
|
||||
height: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 1rem;
|
||||
z-index: 2;
|
||||
}
|
||||
h2 {
|
||||
margin-bottom: 3rem;
|
||||
z-index: 2;
|
||||
}
|
||||
.v-btn {
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
|
||||
/* global WIKI */
|
||||
|
||||
module.exports = {
|
||||
Query: {
|
||||
documents(obj, args, context, info) {
|
||||
return WIKI.models.Document.findAll({ where: args })
|
||||
}
|
||||
},
|
||||
Mutation: {
|
||||
createDocument(obj, args) {
|
||||
return WIKI.models.Document.create(args)
|
||||
},
|
||||
deleteDocument(obj, args) {
|
||||
return WIKI.models.Document.destroy({
|
||||
where: {
|
||||
id: args.id
|
||||
},
|
||||
limit: 1
|
||||
})
|
||||
},
|
||||
modifyDocument(obj, args) {
|
||||
return WIKI.models.Document.update({
|
||||
title: args.title,
|
||||
subtitle: args.subtitle
|
||||
}, {
|
||||
where: { id: args.id }
|
||||
})
|
||||
},
|
||||
moveDocument(obj, args) {
|
||||
return WIKI.models.Document.update({
|
||||
path: args.path
|
||||
}, {
|
||||
where: { id: args.id }
|
||||
})
|
||||
}
|
||||
},
|
||||
Document: {
|
||||
comments(doc) {
|
||||
return doc.getComments()
|
||||
},
|
||||
tags(doc) {
|
||||
return doc.getTags()
|
||||
}
|
||||
}
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
|
||||
/* global WIKI */
|
||||
|
||||
const gql = require('graphql')
|
||||
|
||||
module.exports = {
|
||||
Query: {
|
||||
rights(obj, args, context, info) {
|
||||
return WIKI.models.Right.findAll({ where: args })
|
||||
}
|
||||
},
|
||||
Mutation: {
|
||||
addRightToGroup(obj, args) {
|
||||
return WIKI.models.Group.findById(args.groupId).then(grp => {
|
||||
if (!grp) {
|
||||
throw new gql.GraphQLError('Invalid Group ID')
|
||||
}
|
||||
return WIKI.models.Right.create({
|
||||
path: args.path,
|
||||
role: args.role,
|
||||
exact: args.exact,
|
||||
allow: args.allow,
|
||||
group: grp
|
||||
})
|
||||
})
|
||||
},
|
||||
removeRightFromGroup(obj, args) {
|
||||
return WIKI.models.Right.destroy({
|
||||
where: {
|
||||
id: args.rightId
|
||||
},
|
||||
limit: 1
|
||||
})
|
||||
},
|
||||
modifyRight(obj, args) {
|
||||
return WIKI.models.Right.update({
|
||||
path: args.path,
|
||||
role: args.role,
|
||||
exact: args.exact,
|
||||
allow: args.allow
|
||||
}, {
|
||||
where: {
|
||||
id: args.id
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
Right: {
|
||||
group(rt) {
|
||||
return rt.getGroup()
|
||||
}
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
|
||||
/* global WIKI */
|
||||
|
||||
const _ = require('lodash')
|
||||
|
||||
module.exports = {
|
||||
Query: {
|
||||
settings(obj, args, context, info) {
|
||||
return WIKI.models.Setting.findAll({ where: args, raw: true }).then(entries => {
|
||||
return _.map(entries, entry => {
|
||||
entry.config = JSON.stringify(entry.config)
|
||||
return entry
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
Mutation: {
|
||||
setConfigEntry(obj, args) {
|
||||
return WIKI.models.Setting.update({
|
||||
value: args.value
|
||||
}, { where: { key: args.key } })
|
||||
}
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
|
||||
/* global WIKI */
|
||||
|
||||
module.exports = {
|
||||
Query: {
|
||||
translations (obj, args, context, info) {
|
||||
return WIKI.lang.getByNamespace(args.locale, args.namespace)
|
||||
}
|
||||
},
|
||||
Mutation: {},
|
||||
Translation: {}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
extends master.pug
|
||||
|
||||
block body
|
||||
#root.is-fullscreen
|
||||
v-app
|
||||
.notfound
|
||||
.notfound-content
|
||||
img.animated.fadeIn(src='/svg/icon-delete-file.svg', alt='Not Found')
|
||||
.headline= t('notfound.title')
|
||||
.subheading.mt-3= t('notfound.subtitle')
|
||||
v-btn.mt-5(color='red lighten-4', href='/', large, outline)
|
||||
v-icon(left) home
|
||||
span= t('notfound.gohome')
|
Loading…
Reference in new issue