WIP on local Bootstrap lib support
- Sort categories case-insensitively - Strip HTML from category description
This commit is contained in:
parent
f106f2b10e
commit
e2f94edb9e
|
@ -178,7 +178,7 @@ module Category =
|
||||||
let! cats = rethink<Category list> {
|
let! cats = rethink<Category list> {
|
||||||
withTable Table.Category
|
withTable Table.Category
|
||||||
getAll [ webLogId ] (nameof webLogId)
|
getAll [ webLogId ] (nameof webLogId)
|
||||||
orderBy "name"
|
orderByFunc (fun it -> it.G("name").Downcase () :> obj)
|
||||||
result; withRetryDefault conn
|
result; withRetryDefault conn
|
||||||
}
|
}
|
||||||
let ordered = orderByHierarchy cats None None []
|
let ordered = orderByHierarchy cats None None []
|
||||||
|
|
|
@ -65,6 +65,18 @@
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
|
||||||
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
|
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
|
||||||
crossorigin="anonymous"></script>
|
crossorigin="anonymous"></script>
|
||||||
|
<script>
|
||||||
|
const cssLoaded = [...document.styleSheets].filter(it => it.href.indexOf("bootstrap.min.css") > -1).length > 0
|
||||||
|
if (!cssLoaded) {
|
||||||
|
const local = document.createElement("link")
|
||||||
|
local.rel = "stylesheet"
|
||||||
|
local.href = "/themes/admin/bootstrap.min.css"
|
||||||
|
document.getElementsByTagName("link")[0].prepend(local)
|
||||||
|
}
|
||||||
|
setTimeout(function () {
|
||||||
|
if (!bootstrap) document.write('<script src=\"/script/bootstrap.bundle.min.js\"><\/script>')
|
||||||
|
}, 2000)
|
||||||
|
</script>
|
||||||
<script src="/themes/admin/admin.js"></script>
|
<script src="/themes/admin/admin.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -125,7 +125,7 @@
|
||||||
<input type="checkbox" name="categoryIds" id="categoryId_{{ cat.id }}" class="form-check-input"
|
<input type="checkbox" name="categoryIds" id="categoryId_{{ cat.id }}" class="form-check-input"
|
||||||
value="{{ cat.id }}" {% if model.category_ids contains cat.id %} checked="checked"{% endif %}>
|
value="{{ cat.id }}" {% if model.category_ids contains cat.id %} checked="checked"{% endif %}>
|
||||||
<label for="categoryId_{{ cat.id }}" class="form-check-label"
|
<label for="categoryId_{{ cat.id }}" class="form-check-label"
|
||||||
{%- if cat.description %} title="{{ cat.description.value | escape }}"{% endif %}>
|
{%- if cat.description %} title="{{ cat.description.value | strip_html | escape }}"{% endif %}>
|
||||||
{%- for it in cat.parent_names %} ⟩ {% endfor %}{{ cat.name }}
|
{%- for it in cat.parent_names %} ⟩ {% endfor %}{{ cat.name }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -42,3 +42,15 @@
|
||||||
{%- if logged_on %}<small><a href="/post/{{ post.id }}/edit">Edit Post</a></small>{% endif %}
|
{%- if logged_on %}<small><a href="/post/{{ post.id }}/edit">Edit Post</a></small>{% endif %}
|
||||||
</article>
|
</article>
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
<div class="bottom-nav" role="navigation">
|
||||||
|
<div class="nav-previous">
|
||||||
|
{% if model.newer_link -%}
|
||||||
|
<a href="/{{ model.newer_link.value }}">« Newer Posts</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<div class="nav-next">
|
||||||
|
{% if model.older_link -%}
|
||||||
|
<a href="/{{ model.older_link.value }}">Older Posts »</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
|
@ -8,12 +8,13 @@
|
||||||
}
|
}
|
||||||
html {
|
html {
|
||||||
background-color: lightgray;
|
background-color: lightgray;
|
||||||
|
scroll-behavior: smooth;
|
||||||
}
|
}
|
||||||
body, .entry-meta {
|
body, .entry-meta {
|
||||||
font-family: "Raleway", "Segoe UI", Ubuntu, Tahoma, "DejaVu Sans", "Liberation Sans", Arial, sans-serif;
|
font-family: "Raleway", "Segoe UI", Ubuntu, Tahoma, "DejaVu Sans", "Liberation Sans", Arial, sans-serif;
|
||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
margin: 0px;
|
margin: 0;
|
||||||
background-color: #FFFAFA;
|
background-color: #FFFAFA;
|
||||||
}
|
}
|
||||||
a {
|
a {
|
||||||
|
@ -28,6 +29,7 @@ a img {
|
||||||
}
|
}
|
||||||
acronym {
|
acronym {
|
||||||
border-bottom:dotted 1px black;
|
border-bottom:dotted 1px black;
|
||||||
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
header, h1, h2, h3, footer a, .home-lead a, .highlight {
|
header, h1, h2, h3, footer a, .home-lead a, .highlight {
|
||||||
font-family: "Oswald", "Segoe UI", Ubuntu, "DejaVu Sans", "Liberation Sans", Arial, sans-serif;
|
font-family: "Oswald", "Segoe UI", Ubuntu, "DejaVu Sans", "Liberation Sans", Arial, sans-serif;
|
||||||
|
@ -61,6 +63,20 @@ code, pre {
|
||||||
code {
|
code {
|
||||||
background-color: rgba(0, 0, 0, .1);
|
background-color: rgba(0, 0, 0, .1);
|
||||||
padding: 0 .25rem;
|
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 {
|
#content {
|
||||||
margin: 0 1rem;
|
margin: 0 1rem;
|
||||||
|
@ -224,7 +240,8 @@ li {
|
||||||
}
|
}
|
||||||
@media all and (min-width: 80rem) {
|
@media all and (min-width: 80rem) {
|
||||||
.blog-sidebar {
|
.blog-sidebar {
|
||||||
width: 12rem;
|
min-width: 12rem;
|
||||||
|
max-width: 16rem;
|
||||||
border-top: none;
|
border-top: none;
|
||||||
border-left: dotted 1px lightgray;
|
border-left: dotted 1px lightgray;
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user