Fix urls
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
# The URL the site will be built for
|
# The URL the site will be built for
|
||||||
base_url = "https://threefoldfoundation.github.io/www_threefold_io"
|
base_url = "www_threefold_io"
|
||||||
# Change this to your own URL! Please note this variable **must** be uncommented.
|
# Change this to your own URL! Please note this variable **must** be uncommented.
|
||||||
|
|
||||||
title = "ThreeFold"
|
title = "ThreeFold"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ title: "Header"
|
|||||||
insert_anchor_links: "left"
|
insert_anchor_links: "left"
|
||||||
template: "partials/header.html"
|
template: "partials/header.html"
|
||||||
extra:
|
extra:
|
||||||
logoPath: "/images/tft_log.svg"
|
logoPath: "images/tft_log.svg"
|
||||||
button_Path: "/images/gettft_white.png"
|
button_Path: "/images/gettft_white.png"
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
{%- set section = get_section(path="header/_index.md") %}
|
{%- set section = get_section(path="header/_index.md") %}
|
||||||
{% set header_items = section.content | safe | split(pat="<li>") %}
|
{% set header_items = section.content | safe | split(pat="<li>") %}
|
||||||
{% set base = config.base_url %}
|
{% set base = config.base_url %}
|
||||||
|
{% set logo_path = base ~ section.extra.logoPath %}
|
||||||
|
|
||||||
<header id="header-container">
|
<header id="header-container">
|
||||||
<div class="z-10 bg-white fixed w-full top-0">
|
<div class="z-10 bg-white fixed w-full top-0">
|
||||||
<div class="relative z-50 shadow">
|
<div class="relative z-50 shadow">
|
||||||
<div class="mx-auto flex z-50 shadow justify-between items-center px-6 sm:px-4 md:px-6 py-2 lg:px-5 lg:justify-start space-x-10 sm:space-x-4 ">
|
<div class="mx-auto flex z-50 shadow justify-between items-center px-6 sm:px-4 md:px-6 py-2 lg:px-5 lg:justify-start space-x-10 sm:space-x-4 ">
|
||||||
<div>
|
<div>
|
||||||
<a href="/" class="flex">
|
<a href="{{base}}" class="flex">
|
||||||
<img class="w-20 h-auto sm:w-15" style="max-width: none;" src="{{section.extra.logoPath}}" alt="Ourworld Logo" />
|
<img class="w-20 h-auto sm:w-15" style="max-width: none;" src="{{logo_path}}" alt="ThreeFold Logo" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="-mr-2 -my-2 lg:hidden">
|
<div class="-mr-2 -my-2 lg:hidden">
|
||||||
@@ -39,8 +40,9 @@
|
|||||||
<a href="{{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="{{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">
|
||||||
{{link_label}}
|
{{link_label}}
|
||||||
</a>
|
</a>
|
||||||
{% elif base is containing("/www_threefold_io") %}
|
{% elif current_url is containing("www_threefold_io") %}
|
||||||
<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">
|
{% set path = current_url ~ link_path[1] %}
|
||||||
|
<a href="{{path}}" 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}}
|
{{link_label}}
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
@@ -108,8 +110,9 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<div class="rounded-full border-2 mt-1 border-gray-400">
|
<div class="rounded-full border-2 mt-1 border-gray-400">
|
||||||
<a href="https://gettft.com/gettft/" target="_blank" class="mt-2">
|
<a href="https://gettft.com/gettft/" target="_blank" class="mt-2">
|
||||||
|
{% set btn_path = base ~ section.extra.button_Path %}
|
||||||
<img
|
<img
|
||||||
src="{{ section.extra.button_Path }}"
|
src="{{ btn_path }}"
|
||||||
class="mr-5"
|
class="mr-5"
|
||||||
style="max-width: none;"
|
style="max-width: none;"
|
||||||
alt=""
|
alt=""
|
||||||
@@ -171,6 +174,11 @@
|
|||||||
<a href="{{link_path[1]}}" target="_blank" class="text-lg px-8 py-3 leading-6 font-normal text-gray-900 hover:text-gray-900 focus:outline-none focus:text-gray-900 transition ease-in-out duration-150">
|
<a href="{{link_path[1]}}" target="_blank" class="text-lg px-8 py-3 leading-6 font-normal text-gray-900 hover:text-gray-900 focus:outline-none focus:text-gray-900 transition ease-in-out duration-150">
|
||||||
{{link_label}}
|
{{link_label}}
|
||||||
</a>
|
</a>
|
||||||
|
{% elif current_url is containing("www_threefold_io") %}
|
||||||
|
{% set path = current_url ~ link_path[1] %}
|
||||||
|
<a href="{{path}}" 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 %}
|
{% else %}
|
||||||
<a href="{{link_path[1]}}" class="text-lg px-8 py-3 leading-6 font-normal text-gray-900 hover:text-gray-900 focus:outline-none focus:text-gray-900 transition ease-in-out duration-150">
|
<a href="{{link_path[1]}}" class="text-lg px-8 py-3 leading-6 font-normal text-gray-900 hover:text-gray-900 focus:outline-none focus:text-gray-900 transition ease-in-out duration-150">
|
||||||
{{link_label}}
|
{{link_label}}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
{% 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='"') %}
|
||||||
{% set base = config.base_url %}
|
|
||||||
|
|
||||||
{% if 'https' in path %}
|
{% if 'https' in path %}
|
||||||
<button onclick="window.open('{{path}}', '_blank');"
|
<button onclick="window.open('{{path}}', '_blank');"
|
||||||
@@ -8,8 +7,9 @@
|
|||||||
{{ body | trim_start_matches(pat="<p>") | safe}}
|
{{ body | trim_start_matches(pat="<p>") | safe}}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{% elif '/www_threefold_io' in base %}
|
{% elif current_url is containing('www_threefold_io') %}
|
||||||
<button onclick="window.location='{{base}}/{{path}}'"
|
{% 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">
|
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>
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
class="text-5xl font-extrabold uppercase">Store</a>
|
class="text-5xl font-extrabold uppercase">Store</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
{% if base is containing("/www_threefold_io")%}
|
{% if current_url is containing("www_threefold_io")%}
|
||||||
{% set path = base ~ "images/cloud_header_seprated.png"%}
|
{% 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" />
|
<img class="mx-auto sm:w-1/2 lg:w-full" src="{{path}}" alt="TF Cloud" />
|
||||||
{% else %}
|
{% else %}
|
||||||
<img class="mx-auto sm:w-1/2 lg:w-full" src="images/cloud_header_seprated.png" alt="TF Cloud" />
|
<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