- Rework page edit layout
- Add project template to bit-badger theme - Add code styling to bit-badger theme
This commit is contained in:
parent
664704d3d5
commit
7219b65f4f
|
@ -11,7 +11,7 @@
|
|||
value="{{ model.title }}">
|
||||
<label for="title">Title</label>
|
||||
</div>
|
||||
<div class="form-floating">
|
||||
<div class="form-floating pb-3">
|
||||
<input type="text" name="permalink" id="permalink" class="form-control" required
|
||||
value="{{ model.permalink }}">
|
||||
<label for="permalink">Permalink</label>
|
||||
|
@ -20,6 +20,18 @@
|
|||
<span class="form-text"><a href="{{ perm_edit | relative_link }}">Manage Permalinks</a></span>
|
||||
{% endif -%}
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<label for="text">Text</label>
|
||||
<input type="radio" name="source" id="source_html" class="btn-check" value="HTML"
|
||||
{%- if model.source == "HTML" %} checked="checked"{% endif %}>
|
||||
<label class="btn btn-sm btn-outline-secondary" for="source_html">HTML</label>
|
||||
<input type="radio" name="source" id="source_md" class="btn-check" value="Markdown"
|
||||
{%- if model.source == "Markdown" %} checked="checked"{% endif %}>
|
||||
<label class="btn btn-sm btn-outline-secondary" for="source_md">Markdown</label>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<textarea name="text" id="text" class="form-control">{{ model.text }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<div class="form-floating pb-3">
|
||||
|
@ -39,22 +51,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col">
|
||||
<label for="text">Text</label>
|
||||
<input type="radio" name="source" id="source_html" class="btn-check" value="HTML"
|
||||
{%- if model.source == "HTML" %} checked="checked"{% endif %}>
|
||||
<label class="btn btn-sm btn-outline-secondary" for="source_html">HTML</label>
|
||||
<input type="radio" name="source" id="source_md" class="btn-check" value="Markdown"
|
||||
{%- if model.source == "Markdown" %} checked="checked"{% endif %}>
|
||||
<label class="btn btn-sm btn-outline-secondary" for="source_md">Markdown</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col">
|
||||
<textarea name="text" id="text" class="form-control" rows="10">{{ model.text }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col">
|
||||
<button type="submit" class="btn btn-primary">Save Changes</button>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<h2 class="my-3">{{ page_title }}</h2>
|
||||
<article class="container">
|
||||
<a href="{{ "/admin/post/new/edit" | relative_link }}" class="btn btn-primary btn-sm mb-3">Write a New Post</a>
|
||||
<a href="{{ "admin/post/new/edit" | relative_link }}" class="btn btn-primary btn-sm mb-3">Write a New Post</a>
|
||||
<table class="table table-sm table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -27,7 +27,7 @@
|
|||
<span class="text-muted"> • </span>
|
||||
<a href="{{ post | edit_post_link }}">Edit</a>
|
||||
<span class="text-muted"> • </span>
|
||||
{%- capture post_del %}admin/post/{{ pg.id }}/delete{% endcapture -%}
|
||||
{%- capture post_del %}admin/post/{{ post.id }}/delete{% endcapture -%}
|
||||
{%- capture post_del_link %}{{ post_del | relative_link }}{% endcapture -%}
|
||||
<a href="{{ post_del_link }}" class="text-danger"
|
||||
onclick="return Admin.deletePost('{{ post.title }}', '{{ post_del_link }}')">
|
||||
|
|
19
src/MyWebLog/themes/bit-badger/project-page.liquid
Normal file
19
src/MyWebLog/themes/bit-badger/project-page.liquid
Normal file
|
@ -0,0 +1,19 @@
|
|||
<article class="content auto">
|
||||
{%- assign parts = page.title | split: ' » ' -%}
|
||||
{%- assign parts_count = parts | size -%}
|
||||
{% if parts_count == 1 -%}
|
||||
<h1>{{ page.title }}</h1>
|
||||
{%- else -%}
|
||||
<h1><small><small>{{ parts[0] }}</small></small><br>{{ parts[1] }}</h1>
|
||||
{%- endif %}
|
||||
{{ page.text }}
|
||||
{% if parts_count > 1 -%}
|
||||
{%- assign project = parts[0] | downcase | replace: '\.', '-' -%}
|
||||
{%- capture project_url %}open-source/{{ project }}/{% endcapture -%}
|
||||
{% comment %}{{ project_url | relative_link }}{% endcomment %}
|
||||
<p><br><a href="." title="{{ parts[0] }} Home">« {{ parts[0] }} Home</a></p>
|
||||
{%- endif %}
|
||||
{% if logged_on -%}
|
||||
<p><small><a href="{{ page | edit_page_link }}">Edit This Page</a></small></p>
|
||||
{%- endif %}
|
||||
</article>
|
|
@ -51,6 +51,9 @@ textarea {
|
|||
font-family: monospace;
|
||||
font-size: .8rem !important;
|
||||
}
|
||||
#text {
|
||||
min-height: 50vh;
|
||||
}
|
||||
.no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
|
|
@ -44,6 +44,28 @@ h2, h3 {
|
|||
p {
|
||||
margin: 1rem 0;
|
||||
}
|
||||
code, pre {
|
||||
font-family: "JetBrains Mono","SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,monospace;
|
||||
font-size: 80%;
|
||||
}
|
||||
code {
|
||||
background-color: rgba(0, 0, 0, .1);
|
||||
padding: 0 .25rem;
|
||||
white-space: pre;
|
||||
}
|
||||
pre {
|
||||
background-color: rgba(0, 0, 0, .9);
|
||||
color: rgba(255, 255, 255, .9);
|
||||
padding: .5rem;
|
||||
border-radius: .5rem;
|
||||
overflow: auto;
|
||||
}
|
||||
pre > code {
|
||||
background-color: unset;
|
||||
}
|
||||
div[style="color:#DADADA;background-color:#1E1E1E;"] {
|
||||
background-color: unset !important;
|
||||
}
|
||||
#content {
|
||||
margin: 0 1rem;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user