Add word+character count

This commit is contained in:
kngako
2022-06-19 02:17:55 +02:00
parent 3f7a120600
commit 95df947054
6 changed files with 465 additions and 12 deletions

View File

@@ -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

View 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