Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
fc7e7d3d
Commit
fc7e7d3d
authored
Nov 20, 2016
by
NGPixel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modals styling + Fix for gapless first <p>
parent
98576155
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
41 additions
and
45 deletions
+41
-45
app.css
assets/css/app.css
+0
-0
login.css
assets/css/login.css
+0
-0
markdown.js
libs/markdown.js
+11
-3
create-discard.pug
views/modals/create-discard.pug
+7
-10
create.pug
views/modals/create.pug
+7
-10
edit-discard.pug
views/modals/edit-discard.pug
+7
-10
move.pug
views/modals/move.pug
+9
-12
No files found.
assets/css/app.css
View file @
fc7e7d3d
This source diff could not be displayed because it is too large. You can
view the blob
instead.
assets/css/login.css
View file @
fc7e7d3d
This diff is collapsed.
Click to expand it.
libs/markdown.js
View file @
fc7e7d3d
...
...
@@ -152,9 +152,17 @@ const parseContent = (content) => {
let
output
=
mkdown
.
render
(
content
);
let
cr
=
cheerio
.
load
(
output
);
//-> Style table headers
//cr('table').addClass('table is-bordered is-striped is-narrow');
//-> Check for empty first element
let
firstElm
=
cr
.
root
().
children
().
first
()[
0
];
if
(
firstElm
.
type
===
'tag'
&&
firstElm
.
name
===
'p'
)
{
let
firstElmChildren
=
firstElm
.
children
;
if
(
firstElmChildren
.
length
<
1
)
{
firstElm
.
remove
();
}
else
if
(
firstElmChildren
.
length
===
1
&&
firstElmChildren
[
0
].
type
===
'tag'
&&
firstElmChildren
[
0
].
name
===
'img'
)
{
cr
(
firstElm
).
addClass
(
'is-gapless'
);
}
}
//-> Remove links in headers
...
...
views/modals/create-discard.pug
View file @
fc7e7d3d
...
...
@@ -2,12 +2,9 @@
.modal-background
.modal-container
.modal-content
.card.is-fullwidth
header.card-header.is-warning
p.card-header-title Discard?
.card-content
.content
| Are you sure you want to leave this page and loose anything you wrote so far?
footer.card-footer
a.card-footer-item.btn-create-discard Stay on page
a.card-footer-item(href='/') Discard
\ No newline at end of file
header.is-orange Discard?
section
span Are you sure you want to leave this page and loose anything you wrote so far?
footer
a.button.is-grey.is-outlined.btn-create-discard Stay on page
a.button.is-orange(href='/') Discard
\ No newline at end of file
views/modals/create.pug
View file @
fc7e7d3d
...
...
@@ -3,15 +3,12 @@
.modal-background
.modal-container
.modal-content
.card.is-fullwidth
header.card-header
p.card-header-title Create New Page
.card-content
.content
header.is-light-blue Create New Document
section
label.label Enter the new document path:
p.control
p.control.is-fullwidth
input.input(type='text', placeholder='page-name')#txt-create-prompt
span.help.is-danger.is-hidden This document path is invalid!
footer.card-footer
a.card-footer-item.btn-create-prompt Discard
a.card-footer-item.btn-create-go Create
\ No newline at end of file
footer
a.button.is-grey.is-outlined.btn-create-prompt Discard
a.button.is-light-blue.btn-create-go Create
\ No newline at end of file
views/modals/edit-discard.pug
View file @
fc7e7d3d
...
...
@@ -3,12 +3,9 @@
.modal-background
.modal-container
.modal-content
.card.is-fullwidth
header.card-header.is-warning
p.card-header-title Discard?
.card-content
.content
| Are you sure you want to leave this page and loose any modifications?
footer.card-footer
a.card-footer-item.btn-edit-discard Stay on page
a.card-footer-item(href='/' + pageData.meta.path) Discard
\ No newline at end of file
header.is-orange Discard?
section
span Are you sure you want to leave this page and loose any modifications?
footer
a.button.is-grey.is-outlined.btn-edit-discard Stay on page
a.button.is-orange(href='/' + pageData.meta.path) Discard
\ No newline at end of file
views/modals/move.pug
View file @
fc7e7d3d
...
...
@@ -3,16 +3,13 @@
.modal-background
.modal-container
.modal-content
.card.is-fullwidth
header.card-header.is-info
p.card-header-title Move document
.card-content
.content
header.is-indigo Move document
section
label.label Enter the new document path:
p.control
p.control.is-fullwidth
input.input(type='text', placeholder='page-name')#txt-move-prompt
span.help.is-danger.is-hidden This document path is invalid or not allowed!
span Note that moving or renaming documents can lead to broken links. Make sure to edit any page that links to this document afterwards!
footer.card-footer
a.card-footer-item.btn-move-prompt Discard
a.card-footer-item.btn-move-go Move
\ No newline at end of file
span.help.is-red.is-hidden This document path is invalid or not allowed!
span.note Note that moving or renaming documents can lead to broken links. Make sure to edit any page that links to this document afterwards!
footer
a.button.is-grey.is-outlined.btn-move-prompt Discard
a.button.is-indigo.btn-move-go Move
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment