|
@@ -21,22 +21,27 @@
|
|
{{ end }}
|
|
{{ end }}
|
|
<main class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
|
|
<main class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
|
|
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 border-bottom">
|
|
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 border-bottom">
|
|
- <h2 class="h2">{{ .title }}</h2>
|
|
|
|
|
|
+ <h3 class="h3">{{ .title }}</h3>
|
|
</div>
|
|
</div>
|
|
<form method="post" class="mb-5">
|
|
<form method="post" class="mb-5">
|
|
<div class="row mb-3 mt-3">
|
|
<div class="row mb-3 mt-3">
|
|
- <label class="col-sm-2 col-form-label">Статья активна</label>
|
|
|
|
|
|
+ <label class="col-sm-2 col-form-label col-form-label-sm">Статья активна</label>
|
|
<div class="col-sm-10">
|
|
<div class="col-sm-10">
|
|
<div class="form-check form-switch pt-2">
|
|
<div class="form-check form-switch pt-2">
|
|
<input class="form-check-input" type="checkbox" name="is_active" {{ if .form.IsActive }}checked{{ end }}>
|
|
<input class="form-check-input" type="checkbox" name="is_active" {{ if .form.IsActive }}checked{{ end }}>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
<div class="row mb-3 mt-3">
|
|
<div class="row mb-3 mt-3">
|
|
- <label class="col-sm-2 col-form-label">Название</label>
|
|
|
|
|
|
+ <label class="col-sm-2 col-form-label col-form-label-sm">Название</label>
|
|
<div class="col-sm-10">
|
|
<div class="col-sm-10">
|
|
{{ $titleErr := index .errors "ArticleForm.Title" }}
|
|
{{ $titleErr := index .errors "ArticleForm.Title" }}
|
|
- <input type="text" class="form-control {{ if $titleErr }}is-invalid{{ end }}" name="title" value="{{ .form.Title }}">
|
|
|
|
|
|
+ <input type="text" class="form-control form-control-sm {{ if $titleErr }}is-invalid{{ end }}" name="title" value="{{ .form.Title }}">
|
|
{{ if $titleErr }}
|
|
{{ if $titleErr }}
|
|
<div class="invalid-feedback">
|
|
<div class="invalid-feedback">
|
|
{{ $titleErr }}
|
|
{{ $titleErr }}
|
|
@@ -45,10 +50,10 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3 mt-3">
|
|
<div class="row mb-3 mt-3">
|
|
- <label class="col-sm-2 col-form-label">Картинка</label>
|
|
|
|
|
|
+ <label class="col-sm-2 col-form-label col-form-label-sm">Картинка</label>
|
|
<div class="col-sm-10">
|
|
<div class="col-sm-10">
|
|
{{ $imageErr := index .errors "ArticleForm.Image" }}
|
|
{{ $imageErr := index .errors "ArticleForm.Image" }}
|
|
- <input type="text" class="form-control {{ if $imageErr }}is-invalid{{ end }}" name="title" value="{{ .form.Image }}">
|
|
|
|
|
|
+ <input type="text" class="form-control form-control-sm {{ if $imageErr }}is-invalid{{ end }}" name="title" value="{{ .form.Image }}">
|
|
{{ if $imageErr }}
|
|
{{ if $imageErr }}
|
|
<div class="invalid-feedback">
|
|
<div class="invalid-feedback">
|
|
{{ $imageErr }}
|
|
{{ $imageErr }}
|
|
@@ -57,10 +62,10 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3 mt-3">
|
|
<div class="row mb-3 mt-3">
|
|
- <label class="col-sm-2 col-form-label">URL</label>
|
|
|
|
|
|
+ <label class="col-sm-2 col-form-label col-form-label-sm">URL</label>
|
|
<div class="col-sm-10">
|
|
<div class="col-sm-10">
|
|
{{ $urlErr := index .errors "ArticleForm.URL" }}
|
|
{{ $urlErr := index .errors "ArticleForm.URL" }}
|
|
- <input type="text" class="form-control {{ if $urlErr }}is-invalid{{ end }}" name="url" value="{{ .form.URL }}">
|
|
|
|
|
|
+ <input type="text" class="form-control form-control-sm {{ if $urlErr }}is-invalid{{ end }}" name="url" value="{{ .form.URL }}">
|
|
{{ if $urlErr }}
|
|
{{ if $urlErr }}
|
|
<div class="invalid-feedback">
|
|
<div class="invalid-feedback">
|
|
{{ $urlErr }}
|
|
{{ $urlErr }}
|
|
@@ -69,10 +74,10 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3 mt-3">
|
|
<div class="row mb-3 mt-3">
|
|
- <label class="col-sm-2 col-form-label">Дата публикации</label>
|
|
|
|
|
|
+ <label class="col-sm-2 col-form-label col-form-label-sm">Дата публикации</label>
|
|
<div class="col-sm-10">
|
|
<div class="col-sm-10">
|
|
{{ $dateErr := index .errors "ArticleForm.PublishTime" }}
|
|
{{ $dateErr := index .errors "ArticleForm.PublishTime" }}
|
|
- <input type="date" class="form-control col-auto {{ if $dateErr }}is-invalid{{ end }}" name="publish_time" value="{{ .form.PublishTime }}">
|
|
|
|
|
|
+ <input type="date" class="form-control form-control-sm {{ if $dateErr }}is-invalid{{ end }}" name="publish_time" value="{{ .form.PublishTime }}">
|
|
{{ if $dateErr }}
|
|
{{ if $dateErr }}
|
|
<div class="invalid-feedback">
|
|
<div class="invalid-feedback">
|
|
{{ $dateErr }}
|
|
{{ $dateErr }}
|
|
@@ -81,10 +86,10 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3 mt-3">
|
|
<div class="row mb-3 mt-3">
|
|
- <label class="col-sm-2 col-form-label">Краткий текст</label>
|
|
|
|
|
|
+ <label class="col-sm-2 col-form-label col-form-label-sm">Краткий текст</label>
|
|
<div class="col-sm-10">
|
|
<div class="col-sm-10">
|
|
{{ $ptErr := index .errors "ArticleForm.PreviewText" }}
|
|
{{ $ptErr := index .errors "ArticleForm.PreviewText" }}
|
|
- <textarea id="editor-preview" class="form-control {{ if $ptErr }}is-invalid{{ end }}" name="preview_text">{{ .form.PreviewText }}</textarea>
|
|
|
|
|
|
+ <textarea id="editor-preview" class="form-control form-control-sm {{ if $ptErr }}is-invalid{{ end }}" name="preview_text">{{ .form.PreviewText }}</textarea>
|
|
{{ if $ptErr }}
|
|
{{ if $ptErr }}
|
|
<div class="invalid-feedback">
|
|
<div class="invalid-feedback">
|
|
{{ $ptErr }}
|
|
{{ $ptErr }}
|
|
@@ -93,10 +98,10 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3 mt-3">
|
|
<div class="row mb-3 mt-3">
|
|
- <label class="col-sm-2 col-form-label">Текст</label>
|
|
|
|
|
|
+ <label class="col-sm-2 col-form-label col-form-label-sm">Текст</label>
|
|
<div class="col-sm-10">
|
|
<div class="col-sm-10">
|
|
{{ $tErr := index .errors "ArticleForm.Text" }}
|
|
{{ $tErr := index .errors "ArticleForm.Text" }}
|
|
- <textarea id="editor-text" class="form-control {{ if $tErr }}is-invalid{{ end }}" name="text">{{ .form.Text }}</textarea>
|
|
|
|
|
|
+ <textarea id="editor-text" class="form-control form-control-sm {{ if $tErr }}is-invalid{{ end }}" name="text">{{ .form.Text }}</textarea>
|
|
{{ if $tErr }}
|
|
{{ if $tErr }}
|
|
<div class="invalid-feedback">
|
|
<div class="invalid-feedback">
|
|
{{ $tErr }}
|
|
{{ $tErr }}
|
|
@@ -105,10 +110,10 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3 mt-3">
|
|
<div class="row mb-3 mt-3">
|
|
- <label class="col-sm-2 col-form-label">Meta keywords</label>
|
|
|
|
|
|
+ <label class="col-sm-2 col-form-label col-form-label-sm">Meta keywords</label>
|
|
<div class="col-sm-10">
|
|
<div class="col-sm-10">
|
|
{{ $mkErr := index .errors "ArticleForm.MetaKeywords" }}
|
|
{{ $mkErr := index .errors "ArticleForm.MetaKeywords" }}
|
|
- <input type="text" class="form-control {{ if $mkErr }}is-invalid{{ end }}" name="meta_keywords" value="{{ .form.MetaKeywords }}">
|
|
|
|
|
|
+ <input type="text" class="form-control form-control-sm {{ if $mkErr }}is-invalid{{ end }}" name="meta_keywords" value="{{ .form.MetaKeywords }}">
|
|
{{ if $mkErr }}
|
|
{{ if $mkErr }}
|
|
<div class="invalid-feedback">
|
|
<div class="invalid-feedback">
|
|
{{ $mkErr }}
|
|
{{ $mkErr }}
|
|
@@ -117,10 +122,10 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3 mt-3">
|
|
<div class="row mb-3 mt-3">
|
|
- <label class="col-sm-2 col-form-label">Meta description</label>
|
|
|
|
|
|
+ <label class="col-sm-2 col-form-label col-form-label-sm">Meta description</label>
|
|
<div class="col-sm-10">
|
|
<div class="col-sm-10">
|
|
{{ $mdErr := index .errors "ArticleForm.MetaDescription" }}
|
|
{{ $mdErr := index .errors "ArticleForm.MetaDescription" }}
|
|
- <input type="text" class="form-control {{ if $mdErr }}is-invalid{{ end }}" name="meta_description" value="{{ .form.MetaDescription }}">
|
|
|
|
|
|
+ <input type="text" class="form-control form-control-sm {{ if $mdErr }}is-invalid{{ end }}" name="meta_description" value="{{ .form.MetaDescription }}">
|
|
{{ if $mdErr }}
|
|
{{ if $mdErr }}
|
|
<div class="invalid-feedback">
|
|
<div class="invalid-feedback">
|
|
{{ $mdErr }}
|
|
{{ $mdErr }}
|
|
@@ -129,7 +134,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3 mt-3 border-bottom">
|
|
<div class="row mb-3 mt-3 border-bottom">
|
|
- <label class="col-sm-2 col-form-label">Теги</label>
|
|
|
|
|
|
+ <label class="col-sm-2 col-form-label col-form-label-sm">Теги</label>
|
|
<div class="col-sm-10">
|
|
<div class="col-sm-10">
|
|
{{ $tags := .form.Tags }}
|
|
{{ $tags := .form.Tags }}
|
|
{{ range .tags }}
|
|
{{ range .tags }}
|
|
@@ -142,7 +147,7 @@
|
|
{{ end }}
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <a href="/admin" class="btn btn-secondary">Назад</a>
|
|
|
|
- <button type="submit" class="btn btn-primary">Сохранить</button>
|
|
|
|
|
|
+ <a href="/admin" class="btn btn-sm btn-secondary">Назад</a>
|
|
|
|
+ <button type="submit" class="btn btn-sm btn-primary">Сохранить</button>
|
|
</form>
|
|
</form>
|
|
</main>
|
|
</main>
|