Add extra info for publish and search

This commit is contained in:
Christian Bundy 2019-12-14 16:32:28 -08:00
parent f9e22ae2a5
commit 7cdf74c558
No known key found for this signature in database
GPG Key ID: EB541AAEF4366237
2 changed files with 18 additions and 3 deletions

View File

@ -1,10 +1,13 @@
'use strict'
const {
a,
button,
form,
label,
section,
header,
strong,
textarea
} = require('hyperaxe')
const template = require('./components/template')
@ -17,7 +20,16 @@ module.exports = ({ messages, prefix = null }) => {
prefix,
section(
form({ action: publishForm, method: 'post' },
label({ for: 'text' }, 'Publish a public message (cannot be edited or deleted)'),
header(strong('Publish')),
label(
{ for: 'text' },
'Write a new message in ',
a({
href: 'https://commonmark.org/help/',
target: '_blank'
}, 'Markdown'),
'. Messages cannot be edited or deleted.'
),
textarea({ required: true, name: 'text' }),
button({ type: 'submit' }, 'submit')
)

View File

@ -7,13 +7,16 @@ const {
input,
button,
label,
section
section,
strong,
header
} = require('hyperaxe')
module.exports = ({ messages, query }) => template(
section(
form({ action: '/search', method: 'get' },
label({ for: 'query' }, 'Search for messages that contain some word(s)'),
header(strong('Search')),
label({ for: 'query' }, 'Add word(s) to look for in downloaded messages.'),
input({ required: true, type: 'search', name: 'query', value: query }),
button({
type: 'submit'