Fix btn path
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# The URL the site will be built for
|
||||
base_url = "https://threefoldfoundation.github.io/www_threefold_io/"
|
||||
base_url = "https://threefoldfoundation.github.io/www_threefold_io"
|
||||
# Change this to your own URL! Please note this variable **must** be uncommented.
|
||||
|
||||
title = "ThreeFold"
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
{{link_label}}
|
||||
</a>
|
||||
{% elif base is containing("/www_threefold_io/") %}
|
||||
<a href="/www_threefold_io/{{link_path[1]}}" target="_blank" class="text-lg leading-6 font-medium text-gray-900 hover:text-gray-500 focus:outline-none focus:text-gray-900 transition ease-in-out duration-150 mt-0">
|
||||
<a href="/www_threefold_io/{{link_path[1]}}" class="text-lg leading-6 font-medium text-gray-900 hover:text-gray-500 focus:outline-none focus:text-gray-900 transition ease-in-out duration-150 mt-0">
|
||||
{{link_label}}
|
||||
</a>
|
||||
{% else %}
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
{% 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');"
|
||||
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 '/www_threefold_io/' in base %}
|
||||
<button onclick="window.location='{{base}}{{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 %}
|
||||
<button onclick="window.location='{{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">
|
||||
|
||||
Reference in New Issue
Block a user