Disable boost on edit page/post links

- Add transition to solution page collapsible panels
This commit is contained in:
Daniel J. Summers 2022-05-31 21:42:51 -04:00
parent 7bd9b8d35c
commit a050df4378
11 changed files with 39 additions and 15 deletions

View File

@ -3,7 +3,7 @@
"hostname": "data02.bitbadger.solutions",
"database": "myWebLog_dev"
},
"Generator": "myWebLog 2.0-alpha21",
"Generator": "myWebLog 2.0-alpha22",
"Logging": {
"LogLevel": {
"MyWebLog.Handlers": "Debug"

View File

@ -2,7 +2,7 @@
<article class="content auto">
{{ page.text }}
{% if logged_on -%}
<p><small><a href="{{ page | edit_page_link }}">Edit This Page</a></small></p>
<p><small><a hx-boost="false" href="{{ page | edit_page_link }}">Edit This Page</a></small></p>
{% endif %}
</article>
<aside class="app-sidebar">

View File

@ -9,12 +9,12 @@
title="{{ parts[0] }} on GitHub">
View on GitHub
</a>
{% if logged_on %} &bull; <a href="{{ page | edit_page_link }}">Edit Page</a>{% endif %}
{% if logged_on %} &bull; <a hx-boost="false" href="{{ page | edit_page_link }}">Edit Page</a>{% endif %}
</small></small>
{%- else -%}
<small><small>
<a href="." title="{{ parts[0] }} Home">{{ parts[0] }}</a>
{% if logged_on %} &bull; <a href="{{ page | edit_page_link }}">Edit</a>{% endif %}
{% if logged_on %} &bull; <a hx-boost="false" href="{{ page | edit_page_link }}">Edit</a>{% endif %}
</small></small>
<br>
{{ parts[1] }}

View File

@ -3,6 +3,6 @@
{{ page.text }}
<p><br><a href="{{ "" | relative_link }}" title="Home">&laquo; Home</a></p>
{% if logged_on -%}
<p><small><a href="{{ page | edit_page_link }}">Edit This Page</a></small></p>
<p><small><a hx-boost="false" href="{{ page | edit_page_link }}">Edit This Page</a></small></p>
{% endif %}
</article>

View File

@ -59,7 +59,7 @@
<h3 onclick="toggle('techStack')">
The Technology Stack<span id="techStackArrow" class="arrow">&#x25BC;</span>
</h3>
<div id="techStack" style="display:none;">
<div id="techStack" class="collapse-panel hidden">
{% if curr_count > 0 -%}
{% if past_count > 0 -%}
<p><small><strong>Current:</strong></small></p>
@ -93,7 +93,7 @@
{%- endif %}
<p><br><a href="{{ "solutions" | relative_link }}">&laquo; Back to All Solutions</a></p>
{% if logged_on -%}
<p><small><a href="{{ page | edit_page_link }}">Edit This Page</a></small></p>
<p><small><a hx-boost="false" href="{{ page | edit_page_link }}">Edit This Page</a></small></p>
{% endif %}
</article>
</div>
@ -101,11 +101,11 @@
function toggle(id) {
const section = document.getElementById(id)
const arrow = document.getElementById(`${id}Arrow`)
if (section.style.display === "none") {
section.style.display = "block"
if (section.className.indexOf("shown") === -1) {
section.className = section.className.replace(" hidden", " shown")
arrow.innerHTML = "&#x25B2;"
} else {
section.style.display = "none"
section.className = section.className.replace(" shown", " hidden")
arrow.innerHTML = "&#x25BC;"
}
}

View File

@ -25,7 +25,7 @@
</span>
{% if logged_on %}
<span>
<a href="{{ post | edit_post_link }}"><i class="fa fa-pencil-square-o"></i> Edit Post</a>
<a hx-boost="false" href="{{ post | edit_post_link }}"><i class="fa fa-pencil-square-o"></i> Edit Post</a>
</span>
{% endif %}
</h4>

View File

@ -15,7 +15,11 @@
{% endif %}
<span title="Author"><i class="fa fa-user"></i> {{ model.authors | value: post.author_id }}</span>
{% if logged_on %}
<span><a href="{{ post | edit_post_link }}"><i class="fa fa-pencil-square-o"></i> Edit Post</a></span>
<span>
<a hx-boost="false" href="{{ post | edit_post_link }}">
<i class="fa fa-pencil-square-o"></i> Edit Post
</a>
</span>
{% endif %}
</h4>
<div>{{ post.text }}</div>

View File

@ -39,7 +39,7 @@
{%- endfor %}
</small><br>
{%- endif %}
{%- if logged_on %}<small><a href="{{ post | edit_post_link }}">Edit Post</a></small>{% endif %}
{%- if logged_on %}<small><a hx-boost="false" href="{{ post | edit_post_link }}">Edit Post</a></small>{% endif %}
</article>
{%- endfor %}
<div class="bottom-nav" role="navigation">

View File

@ -1,5 +1,7 @@
<article class="auto">
<h1 class="entry-title">{{ page.title }}</h1>
<div class="entry-content">{{ page.text }}</div>
{%- if logged_on %}<p><small><a href="{{ page | edit_page_link }}">Edit Page</a></small></p>{% endif %}
{%- if logged_on %}
<p><small><a hx-boost="false" href="{{ page | edit_page_link }}">Edit Page</a></small></p>
{% endif -%}
</article>

View File

@ -41,7 +41,13 @@
the permalink
</a>
</p>
<p>{%- if logged_on %}Edit: <a href="{{ post | edit_post_link }}">this post</a>{% else %}&nbsp;{% endif %}</p>
<p>
{%- if logged_on %}
Edit: <a hx-boost="false" href="{{ post | edit_post_link }}">this post</a>
{% else %}
&nbsp;
{% endif -%}
</p>
{% if model.newer_link -%}
<p>
Next Newer Post:

View File

@ -286,6 +286,18 @@ blockquote {
font-size: .75rem;
padding-left: 1rem;
}
.collapse-panel {
max-height: 0;
transition: max-height .5s ease-in-out;
overflow: hidden;
}
.collapse-panel.shown {
max-height: 25rem;
overflow: auto;
}
.collapse-panel p:first-of-type {
margin-top: 0;
}
/* Footer */
.project-footer {
padding-top: 1rem;