Fix urls
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
{% set path = body | split(pat="href=") | slice(start=1) | first | split(pat=">") | first | trim_start_matches(pat='"')
|
||||
| trim_end_matches(pat='"') %}
|
||||
{% set base = config.base_url %}
|
||||
|
||||
{% if 'https' in path %}
|
||||
<button onclick="window.open('{{path}}', '_blank');"
|
||||
@@ -8,8 +7,9 @@
|
||||
{{ body | trim_start_matches(pat="<p>") | safe}}
|
||||
</button>
|
||||
|
||||
{% elif '/www_threefold_io' in base %}
|
||||
<button onclick="window.location='{{base}}/{{path}}'"
|
||||
{% elif current_url is containing('www_threefold_io') %}
|
||||
{% set btn_path = 'www_threefold_io' ~ path%}
|
||||
<button onclick="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>
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
class="text-5xl font-extrabold uppercase">Store</a>
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
{% if base is containing("/www_threefold_io")%}
|
||||
{% set path = base ~ "images/cloud_header_seprated.png"%}
|
||||
{% if current_url is containing("www_threefold_io")%}
|
||||
{% set path = "www_threefold_io/images/cloud_header_seprated.png"%}
|
||||
<img class="mx-auto sm:w-1/2 lg:w-full" src="{{path}}" alt="TF Cloud" />
|
||||
{% else %}
|
||||
<img class="mx-auto sm:w-1/2 lg:w-full" src="images/cloud_header_seprated.png" alt="TF Cloud" />
|
||||
|
||||
Reference in New Issue
Block a user