update btns
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
{% set base = config.base_url %}
|
|
||||||
|
|
||||||
{% set path = body | split(pat="href=") | slice(start=1) | first | split(pat=">") | first | trim_start_matches(pat='"')
|
{% set path = body | split(pat="href=") | slice(start=1) | first | split(pat=">") | first | trim_start_matches(pat='"')
|
||||||
| trim_end_matches(pat='"') %}
|
| trim_end_matches(pat='"') %}
|
||||||
|
|
||||||
@@ -9,22 +7,8 @@
|
|||||||
{{ body | trim_start_matches(pat="<p>") | safe}}
|
{{ body | trim_start_matches(pat="<p>") | safe}}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{% elif base is containing("www_threefold_io") %}
|
|
||||||
{% set btn_path = base ~ path %}
|
|
||||||
<button onclick="if(event.preventDefault) event.preventDefault(); window.location='{{btn_path}}'"
|
|
||||||
class="leading-6 border-transparent flex flex-col border-2 w-full items-start rounded transition hover:first:text-gray-500 hover:border-stone-200 hover:bg-stone-100 p-2 text-left">
|
|
||||||
{{ body | trim_start_matches(pat="<p>") | safe}}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
{% elif path is starting_with("/") %}
|
|
||||||
{% set btn_path = base ~ path %}
|
|
||||||
<button onclick="if(event.preventDefault) event.preventDefault(); window.location='{{btn_path}}'"
|
|
||||||
class="leading-6 border-transparent flex flex-col border-2 w-full items-start rounded transition hover:first:text-gray-500 hover:border-stone-200 hover:bg-stone-100 p-2 text-left">
|
|
||||||
{{ body | trim_start_matches(pat="<p>") | safe}}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<button onclick="window.location='{{path}}'"
|
<button onclick="window.location={{get_url(path=path)}}"
|
||||||
class="leading-6 border-transparent flex flex-col border-2 w-full items-start rounded transition hover:first:text-gray-500 hover:border-stone-200 hover:bg-stone-100 p-2 text-left">
|
class="leading-6 border-transparent flex flex-col border-2 w-full items-start rounded transition hover:first:text-gray-500 hover:border-stone-200 hover:bg-stone-100 p-2 text-left">
|
||||||
{{ body | trim_start_matches(pat="<p>") | safe}}
|
{{ body | trim_start_matches(pat="<p>") | safe}}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user