Add word+character count
This commit is contained in:
@@ -41,7 +41,10 @@ block content
|
||||
if isOwnedByUser
|
||||
.divider
|
||||
.row
|
||||
a.btn.black(href=`/v/${artifactVersion.id}/chapters/add`) add chapter
|
||||
.col.s12
|
||||
a.btn.black(href=`/v/${artifactVersion.id}/chapters/add`) add chapter
|
||||
.col.s12
|
||||
a.btn.black(href=`/v/${artifactVersion.id}/chapters/upload`) upload chapter(s)
|
||||
|
||||
if artifactVersion.chapters.length == 0
|
||||
p.flow-text No chapters added
|
||||
|
||||
21
server/views/chapters-upload.pug
Normal file
21
server/views/chapters-upload.pug
Normal file
@@ -0,0 +1,21 @@
|
||||
extend templates/layout.pug
|
||||
|
||||
block content
|
||||
.container
|
||||
.center
|
||||
h1 Chapter in #{artifactVersion.name}
|
||||
|
||||
.row
|
||||
.col.s12
|
||||
form.row(action=`/v/${artifactVersion.id}/chapters/upload`, method="post", encType="multipart/form-data")
|
||||
//- .col.s12.input-field
|
||||
textarea#textarea.materialize-textarea(name="text")
|
||||
label(for="textarea") Entire chapter text (markdown)
|
||||
.file-field.input-field.col.s12
|
||||
.btn
|
||||
span File
|
||||
input#file-input(type="file", name="chapters" multiple)
|
||||
.file-path-wrapper
|
||||
input.file-path.validate(type="text", placeholder="Upload one or more file with the chapter content")
|
||||
.col.s12
|
||||
button.btn.black(type="submit") upload chapters
|
||||
Reference in New Issue
Block a user