mirror of https://github.com/Requarks/wiki.git
13 changed files with 226 additions and 43 deletions
Split View
Diff Options
-
11.travis.yml
-
2assets/css/app.css
-
2assets/js/app.js
-
32client/js/app.js
-
18client/js/pages/edit.js
-
1client/scss/app.scss
-
13client/scss/layout/_content.scss
-
19client/scss/layout/_header.scss
-
85client/scss/layout/_mixins.scss
-
1gulpfile.js
-
1views/common/header.pug
-
24views/pages/edit.pug
-
60views/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
@ -1 +1 @@ |
|||
"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})}}); |
|||
"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 a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),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]),a=_.nth(t.mdl.children,n);n>=0&&a&&(a.class+=" exit",t.mdl.children.$set(n,a),_.delay(function(){t.mdl.children.$remove(a)},500))}}]),e}();jQuery(document).ready(function(e){e("a").smoothScroll({speed:400,offset:-20});new Sticky(".stickyscroll");e(window).bind("beforeunload",function(){e("#notifload").addClass("active")}),e(document).ajaxSend(function(){e("#notifload").addClass("active")}).ajaxComplete(function(){e("#notifload").removeClass("active")});var t=new Alerts;if(alertsData&&_.forEach(alertsData,function(e){t.push(e)}),1===e("#mk-editor").length){new SimpleMDE({autofocus:!0,autoDownloadFontAwesome:!1,element:e("#mk-editor").get(0),hideIcons:["heading","quote"],placeholder:"Enter Markdown formatted content here...",showIcons:["strikethrough","heading-1","heading-2","heading-3","code","table","horizontal-rule"],spellChecker:!1,status:!1})}e("#page-type-edit").length&&(e(".btn-edit-discard").on("click",function(t){e("#modal-edit-discard").toggleClass("is-active")}),e(".btn-edit-save").on("click",function(e){}))}); |
@ -0,0 +1,18 @@ |
|||
|
|||
if($('#page-type-edit').length) { |
|||
|
|||
//-> Discard
|
|||
|
|||
$('.btn-edit-discard').on('click', (ev) => { |
|||
$('#modal-edit-discard').toggleClass('is-active'); |
|||
}); |
|||
|
|||
//-> Save
|
|||
|
|||
$('.btn-edit-save').on('click', (ev) => { |
|||
|
|||
|
|||
|
|||
}); |
|||
|
|||
} |
@ -0,0 +1,85 @@ |
|||
/** |
|||
* Clearfix |
|||
* |
|||
* @return {string} Clearfix attribute |
|||
*/ |
|||
@mixin clearfix { |
|||
&:after { |
|||
content: ""; |
|||
display: table; |
|||
clear: both; |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* Placeholder attribute for inputs |
|||
* |
|||
* @return {string} Placeholder attributes |
|||
*/ |
|||
@mixin placeholder { |
|||
&::-webkit-input-placeholder {@content}; |
|||
&::-moz-placeholder {@content} |
|||
&:-ms-input-placeholder {@content} |
|||
&:placeholder-shown {@content}; |
|||
} |
|||
|
|||
/** |
|||
* Spinner element |
|||
* |
|||
* @param {string} $color - Color |
|||
* @param {string} $dur - Animation Duration |
|||
* @param {int} $width - Width |
|||
* @param {int} $height [$width] - height |
|||
* |
|||
* @return {string} Spinner element |
|||
*/ |
|||
@mixin spinner($color,$dur,$width,$height:$width) { |
|||
width: $width; |
|||
height: $height; |
|||
border-radius: 50%; |
|||
box-shadow:0 0 0 1px rgba(0,0,0,0.1), 2px 1px 0 $color; |
|||
@include prefix(animation, spin $dur linear infinite); |
|||
@include keyframes(spin) { |
|||
100%{ |
|||
@include prefix(transform, rotate(360deg)); |
|||
} |
|||
}; |
|||
} |
|||
|
|||
/** |
|||
* Prefixes for keyframes |
|||
* |
|||
* @param {string} $animation-name - The animation name |
|||
* |
|||
* @return {string} Prefixed keyframes attributes |
|||
*/ |
|||
@mixin keyframes($animation-name) { |
|||
@-webkit-keyframes #{$animation-name} { |
|||
@content; |
|||
} |
|||
@-moz-keyframes #{$animation-name} { |
|||
@content; |
|||
} |
|||
@-o-keyframes #{$animation-name} { |
|||
@content; |
|||
} |
|||
@keyframes #{$animation-name} { |
|||
@content; |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* Prefix function for browser compatibility |
|||
* |
|||
* @param {string} $property - Property name |
|||
* @param {any} $value - Property value |
|||
* |
|||
* @return {string} Prefixed attributes |
|||
*/ |
|||
@mixin prefix($property, $value) { |
|||
-webkit-#{$property}: #{$value}; |
|||
-moz-#{$property}: #{$value}; |
|||
-ms-#{$property}: #{$value}; |
|||
-o-#{$property}: #{$value}; |
|||
#{$property}: #{$value}; |
|||
} |
Write
Preview
Loading…
Cancel
Save