46 lines
1.3 KiB
Plaintext
46 lines
1.3 KiB
Plaintext
<style>
|
|
.subtag {
|
|
display: inline-block;
|
|
width: 9.636363%;
|
|
}
|
|
</style>
|
|
|
|
<div class="form-group">
|
|
<label for="title">Title</label>
|
|
<input required value="<%= article.title %>" type="text" name="title" id="title" class="form-control">
|
|
</div>
|
|
|
|
<% if (tags[0] != undefined) { %>
|
|
<div class="form-group">
|
|
<label for="tag">Tag</label>
|
|
<input required value="<%= tags[0].name %>" type="text" name="articletags" id="articletags" class="form-control">
|
|
</div>
|
|
<% } else { %>
|
|
<div class="form-group">
|
|
<label for="tag">Tag</label>
|
|
<input required value="" type="text" name="articletags" id="articletags" class="form-control">
|
|
</div>
|
|
<% } %>
|
|
<div class="form-group">
|
|
<div>
|
|
<label for="subtags">Subtags</label>
|
|
</div>
|
|
<% let i = 1; %>
|
|
<% for (i; i < tags.length; i++) { %>
|
|
<input class="subtag" value="<%= tags[i].name %>" type="text" name="articletags" id="articletags" class="form-control">
|
|
<% } %>
|
|
<% for (i; i < 11; i++) { %>
|
|
<input class="subtag" value="" type="text" name="articletags" id="articletags" class="form-control">
|
|
<% } %>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="markdown">Markdown</label>
|
|
<textarea required name="markdown" id="markdown" class="form-control"><%= article.markdown %></textarea>
|
|
</div>
|
|
|
|
<a href="/" class="btn btn-secondary">Cancel</a>
|
|
|
|
<button type="submit" class="btn btn-primary">Save</button>
|