mirror of https://github.com/Requarks/wiki.git
18 changed files with 331 additions and 69 deletions
Unified View
Diff Options
-
2assets/css/app.css
-
2assets/css/libs.css
-
2assets/js/app.js
-
10assets/js/libs.js
-
20client/js/app.js
-
9client/scss/app.scss
-
8client/scss/components/_editor.scss
-
31client/scss/layout/_content.scss
-
5client/scss/layout/_header.scss
-
31controllers/pages.js
-
6gulpfile.js
-
165models/entries.js
-
8models/markdown.js
-
4package.json
-
41views/common/header.pug
-
12views/error.pug
-
24views/pages/edit.pug
-
20views/pages/view.pug
2
assets/css/app.css
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
2
assets/css/libs.css
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1 +1 @@ |
|||||
"use strict";function _classCallCheck(e,s){if(!(e instanceof s))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function e(e,s){for(var t=0;t<s.length;t++){var n=s[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(s,t,n){return t&&e(s.prototype,t),n&&e(s,n),s}}(),Alerts=function(){function e(){_classCallCheck(this,e);var s=this;s.mdl=new Vue({el:"#alerts",data:{children:[]},methods:{acknowledge:function(e){s.close(e)}}}),s.uidNext=1}return _createClass(e,[{key:"push",value:function(e){var s=this,t=_.defaults(e,{_uid:s.uidNext,class:"is-info",message:"---",sticky:!1,title:"---"});s.mdl.children.push(t),t.sticky||_.delay(function(){s.close(t._uid)},5e3),s.uidNext++}},{key:"pushError",value:function(e,s){this.push({class:"is-danger",message:s,sticky:!1,title:e})}},{key:"pushSuccess",value:function(e,s){this.push({class:"is-success",message:s,sticky:!1,title:e})}},{key:"close",value:function(e){var s=this,t=_.findIndex(s.mdl.children,["_uid",e]),n=_.nth(s.mdl.children,t);t>=0&&n&&(n.class+=" exit",s.mdl.children.$set(t,n),_.delay(function(){s.mdl.children.$remove(n)},500))}}]),e}();jQuery(document).ready(function(e){e("a").smoothScroll({speed:400,offset:-20});var s=(new Sticky(".stickyscroll"),new Alerts);alertsData&&_.forEach(alertsData,function(e){s.push(e)})}); |
|
||||
|
"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(t,n,s){return n&&e(t.prototype,n),s&&e(t,s),t}}(),Alerts=function(){function e(){_classCallCheck(this,e);var t=this;t.mdl=new Vue({el:"#alerts",data:{children:[]},methods:{acknowledge:function(e){t.close(e)}}}),t.uidNext=1}return _createClass(e,[{key:"push",value:function(e){var t=this,n=_.defaults(e,{_uid:t.uidNext,class:"is-info",message:"---",sticky:!1,title:"---"});t.mdl.children.push(n),n.sticky||_.delay(function(){t.close(n._uid)},5e3),t.uidNext++}},{key:"pushError",value:function(e,t){this.push({class:"is-danger",message:t,sticky:!1,title:e})}},{key:"pushSuccess",value:function(e,t){this.push({class:"is-success",message:t,sticky:!1,title:e})}},{key:"close",value:function(e){var t=this,n=_.findIndex(t.mdl.children,["_uid",e]),s=_.nth(t.mdl.children,n);n>=0&&s&&(s.class+=" exit",t.mdl.children.$set(n,s),_.delay(function(){t.mdl.children.$remove(s)},500))}}]),e}();jQuery(document).ready(function(e){e("a").smoothScroll({speed:400,offset:-20});var t=(new Sticky(".stickyscroll"),new Alerts);if(alertsData&&_.forEach(alertsData,function(e){t.push(e)}),1===e("#mk-editor").length){new SimpleMDE({autofocus:!0,element:e("#mk-editor").get(0),autoDownloadFontAwesome:!1,placeholder:"Enter Markdown formatted content here...",hideIcons:["heading","quote"],showIcons:["strikethrough","heading-1","heading-2","heading-3","code","table","horizontal-rule"],spellChecker:!1})}}); |
10
assets/js/libs.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,13 +1,20 @@ |
|||||
//@import './layout/_fonts'; |
//@import './layout/_fonts'; |
||||
@import './layout/_base'; |
@import './layout/_base'; |
||||
|
|
||||
$warning: #f68b39; |
|
||||
|
$red: #E53935; |
||||
|
$orange: #FB8C00; |
||||
|
$blue: #039BE5; |
||||
|
$turquoise: #00ACC1; |
||||
|
$green: #7CB342; |
||||
|
|
||||
|
$warning: $orange; |
||||
|
|
||||
@import 'bulma'; |
@import 'bulma'; |
||||
@import './libs/twemoji-awesome'; |
@import './libs/twemoji-awesome'; |
||||
@import './libs/animate.min.css'; |
@import './libs/animate.min.css'; |
||||
|
|
||||
@import './components/_alerts'; |
@import './components/_alerts'; |
||||
|
@import './components/_editor'; |
||||
|
|
||||
@import './layout/_header'; |
@import './layout/_header'; |
||||
@import './layout/_footer'; |
@import './layout/_footer'; |
@ -0,0 +1,8 @@ |
|||||
|
|
||||
|
.editor-toolbar i.separator { |
||||
|
margin-top: 5px; |
||||
|
} |
||||
|
|
||||
|
.editor-toolbar .fa { |
||||
|
font-size: 14px; |
||||
|
} |
@ -0,0 +1,5 @@ |
|||||
|
|
||||
|
h2.nav-item { |
||||
|
font-size: 150%; |
||||
|
color: $orange; |
||||
|
} |
@ -1,30 +1,33 @@ |
|||||
|
|
||||
nav.nav.has-shadow.stickyscroll |
nav.nav.has-shadow.stickyscroll |
||||
.nav-left |
.nav-left |
||||
a.nav-item.is-brand(href='/') |
|
||||
img(src='/favicons/android-icon-96x96.png', alt='Wiki') |
|
||||
a.nav-item(href='/') |
|
||||
h1.title Wiki |
|
||||
|
block rootNavLeft |
||||
|
a.nav-item.is-brand(href='/') |
||||
|
img(src='/favicons/android-icon-96x96.png', alt='Wiki') |
||||
|
a.nav-item(href='/') |
||||
|
h1.title Wiki |
||||
.nav-center |
.nav-center |
||||
p.nav-item |
|
||||
input.input(type='text', placeholder='Search...', style= { 'max-width': '300px', width: '33vw' }) |
|
||||
|
block rootNavCenter |
||||
|
p.nav-item |
||||
|
input.input(type='text', placeholder='Search...', style= { 'max-width': '300px', width: '33vw' }) |
||||
span.nav-toggle |
span.nav-toggle |
||||
span |
span |
||||
span |
span |
||||
span |
span |
||||
.nav-right.nav-menu |
.nav-right.nav-menu |
||||
a.nav-item(href='#') |
|
||||
| History |
|
||||
a.nav-item(href='#') |
|
||||
| Source |
|
||||
span.nav-item |
|
||||
a.button |
|
||||
span.icon |
|
||||
i.fa.fa-edit |
|
||||
span Edit |
|
||||
a.button.is-primary(href='#', onclick='$(".modal").addClass("is-active");') |
|
||||
span.icon |
|
||||
i.fa.fa-plus |
|
||||
span Create |
|
||||
|
block rootNavRight |
||||
|
a.nav-item(href='#') |
||||
|
| History |
||||
|
a.nav-item(href='#') |
||||
|
| Source |
||||
|
span.nav-item |
||||
|
a.button |
||||
|
span.icon |
||||
|
i.fa.fa-edit |
||||
|
span Edit |
||||
|
a.button.is-primary(href='#', onclick='$(".modal").addClass("is-active");') |
||||
|
span.icon |
||||
|
i.fa.fa-plus |
||||
|
span Create |
||||
|
|
||||
|
|
@ -0,0 +1,24 @@ |
|||||
|
extends ../layout |
||||
|
|
||||
|
block rootNavCenter |
||||
|
h2.nav-item= pageData.meta.title |
||||
|
|
||||
|
block rootNavRight |
||||
|
a.nav-item(href='#') |
||||
|
| History |
||||
|
a.nav-item(href='#') |
||||
|
| Source |
||||
|
span.nav-item |
||||
|
a.button.is-danger(href='/' + pageData.meta.path) |
||||
|
span.icon |
||||
|
i.fa.fa-times |
||||
|
span Discard |
||||
|
a.button.is-success(href='#', onclick='$(".modal").addClass("is-active");') |
||||
|
span.icon |
||||
|
i.fa.fa-check |
||||
|
span Save Changes |
||||
|
|
||||
|
block content |
||||
|
|
||||
|
section.section.is-small |
||||
|
textarea#mk-editor= pageData.markdown |
Write
Preview
Loading…
Cancel
Save