link target fixes

This commit is contained in:
timurgordon
2022-09-12 15:13:24 +03:00
parent 6e2ebf873a
commit d93ef78139
18 changed files with 4863 additions and 174 deletions

View File

@@ -7,164 +7,4 @@ draft: false
extra: extra:
author: Your name here author: Your name here
imgPath: images/threefold_globe.png imgPath: images/threefold_globe.png
--- ---
<!-- section 1 (header) -->
{% row(style="center narrow") %}
<br/>
<br/>
![Image](images/black_threefold_header.png#mx-auto#medium)
<br/>
## Planet & People-First **Internet.**
We are a global movement together building an open-source, community-driven, decentralized Internet from the ground up.
{% end %}
{% row(style="center narrow") %}
<button>[Build](/cloud)</button>
|||
<button>[Get TFT](https://library.threefold.me/info/threefold#/tokens/threefold__how_to_buy)</button>
|||
<button>[TF Chat](https://t.me/threefold)</button>
{% end %}
<!-- section 2 (Map) -->
{% grid_stats() %}
### The ThreeFold Grid v3.6
## **Live and Operational**
{% end %}
<!-- section 3 (EXPAND) -->
{% row(style="center margin") %}
### Expand Our New Internet <br> **and Earn TFT**
By connecting hardware at your home or office, support the growth of a decentralized Internet and earn a new digital currency, TFT.
<button>[Buy a 3Node](http://marketplace.3node.global/)</button>
<button>[Build a 3Node](https://library.threefold.me/info/threefold#/tfgrid/farming/threefold__diy_guide)</button>
<br>
![Image](images/become_farmer_new.jpg#mx-auto)
|||
### Decentralize Your <br> **Data and Workloads**
The community has already started using ThreeFold for its autonomous, decentralization and privacy features.
<button>[Deploy on ThreeFold](https://dashboard.grid.tf/)</button>
<button>[The Manual](https://library.threefold.me/info/manual/#/manual__manual3_home_new)</button>
<br>
![Image](images/network_new.jpg#mx-auto)
{% end %}
<!-- section 4 (FEATURED STORIES) -->
{% featured_stories() %}
## Featured Stories
{% end %}
<!-- section 5 (THE TEAM) -->
{% team_sec() %}
## **The Team**
{% end %}
<!-- section 6 (PARTNERS) -->
{% row(style="center margin") %}
## Believers and Collaborators <br> **In a Better Internet**
We are truly proud to be trusted by some of the biggest names in the industry.
![Image](images/ourpartners.png#mx-auto)
<button>[Check All Partners](partners)</button>
{% end %}
<br>
<br>
<!-- section 7 (IN THE NEWS) -->
{% row(style="center") %}
## **In the News**
{% end %}
{% row(style="center between") %}
[![forbes](images/forbes.png#mx-auto)](https://www.forbes.com/sites/johnkoetsier/2020/06/20/largest-distributed-peer-to-peer-grid-on-the-planet-laying-foundation-for-a-decentralized-internet/?fbclid=IwAR1WKCpqLcWPRWg5bPD6RCQE5JJjRPt6ey5vbEnu3db2FvJnp6-YKeVZNW8#79aa340e6798)
|||
[![cointelegraph](images/cointelegraph.png#mx-auto)](https://cointelegraph.com/news/peer-to-peer-internet-has-lofty-goal-to-bring-true-decentralization)
|||
[![yahoo_news](images/yahoo_news.png#mx-auto)](https://news.yahoo.com/news/threefold-set-disrupt-status-quo-051457787.html?guccounter=1)
{% end %}
{% row(style="center between") %}
[![hackernoon](images/hackernoon.png#mx-auto)](https://hackernoon.com/is-it-possible-to-create-a-decentralized-internet-this-startup-and-its-farmers-think-so-ey2e3ycf)
|||
[![smartereum](images/smartereum.png#mx-auto)](https://smartereum.com/189750/threefold-is-audaciously-building-a-new-decentralized-internet/)
|||
[![tga_daily](images/tga_daily.png#mx-auto)](https://tgdaily.com/web/6-dfinity-threefold-are-leading-an-internet-decentralization-revolution/)
{% end %}
{% row(style="center between") %}
[![cointelegraph](images/cointelegraph.png#mx-auto)](https://cointelegraph-com.cdn.ampproject.org/c/s/cointelegraph.com/news/is-a-new-decentralized-internet-or-web-3-0-possible/amp)
|||
[![banklesstimes](images/banklesstimes.png#mx-auto)](https://www.banklesstimes.com/2021/06/14/threefolds-green-technology-strategy-to-a-fairer-more-sustainable-world/)
|||
[![grit_daily](images/grit_daily.png#mx-auto)](https://gritdaily.com/belarus-governments-control-internet/)
{% end %}

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

168
content/home/index.md Normal file
View File

@@ -0,0 +1,168 @@
---
title: "Home"
description: "A global movement together building an open-source, community-driven, decentralized Internet from the ground up." # quotation marks to allow colons where used
date: 2018-09-14T21:00:00-05:00
updated: 2021-02-20T14:40:00-06:00
draft: false
extra:
author: Your name here
imgPath: images/threefold_globe.png
---
<!-- section 1 (header) -->
{% row(style="center narrow") %}
<br/>
<br/>
![Image](black_threefold_header.png#mx-auto#medium)
<br/>
## Planet & People-First **Internet.**
We are a global movement together building an open-source, community-driven, decentralized Internet from the ground up.
{% end %}
{% row(style="center narrow") %}
<button>[Build](/cloud)</button>
|||
<button>[Get TFT](https://library.threefold.me/info/threefold#/tokens/threefold__how_to_buy)</button>
|||
<button>[TF Chat](https://t.me/threefold)</button>
{% end %}
<!-- section 2 (Map) -->
{% grid_stats() %}
### The ThreeFold Grid v3.6
## **Live and Operational**
{% end %}
<!-- section 3 (EXPAND) -->
{% row(style="center margin") %}
### Expand Our New Internet <br> **and Earn TFT**
By connecting hardware at your home or office, support the growth of a decentralized Internet and earn a new digital currency, TFT.
<button>[Buy a 3Node](http://marketplace.3node.global/)</button>
<button>[Build a 3Node](https://library.threefold.me/info/threefold#/tfgrid/farming/threefold__diy_guide)</button>
<br>
![Image](become_farmer_new.jpg#mx-auto)
|||
### Decentralize Your <br> **Data and Workloads**
The community has already started using ThreeFold for its autonomous, decentralization and privacy features.
<button>[Deploy on ThreeFold](https://dashboard.grid.tf/)</button>
<button>[The Manual](https://library.threefold.me/info/manual/#/manual__manual3_home_new)</button>
<br>
![Image](network_new.jpg#mx-auto)
{% end %}
<!-- section 4 (FEATURED STORIES) -->
{% featured_stories() %}
## Featured Stories
{% end %}
<!-- section 5 (THE TEAM) -->
{% team_sec() %}
## **The Team**
{% end %}
<!-- section 6 (PARTNERS) -->
{% row(style="center margin") %}
## Believers and Collaborators <br> **In a Better Internet**
We are truly proud to be trusted by some of the biggest names in the industry.
![Image](ourpartners.png#mx-auto)
<button>[Check All Partners](partners)</button>
{% end %}
<br>
<br>
<!-- section 7 (IN THE NEWS) -->
{% row(style="center") %}
## **In the News**
{% end %}
{% row(style="center between") %}
[![forbes](forbes.png#mx-auto)](https://www.forbes.com/sites/johnkoetsier/2020/06/20/largest-distributed-peer-to-peer-grid-on-the-planet-laying-foundation-for-a-decentralized-internet/?fbclid=IwAR1WKCpqLcWPRWg5bPD6RCQE5JJjRPt6ey5vbEnu3db2FvJnp6-YKeVZNW8#79aa340e6798)
|||
[![cointelegraph](cointelegraph.png#mx-auto)](https://cointelegraph.com/news/peer-to-peer-internet-has-lofty-goal-to-bring-true-decentralization)
|||
[![yahoo_news](yahoo_news.png#mx-auto)](https://news.yahoo.com/news/threefold-set-disrupt-status-quo-051457787.html?guccounter=1)
{% end %}
{% row(style="center between") %}
[![hackernoon](hackernoon.png#mx-auto)](https://hackernoon.com/is-it-possible-to-create-a-decentralized-internet-this-startup-and-its-farmers-think-so-ey2e3ycf)
|||
[![smartereum](smartereum.png#mx-auto)](https://smartereum.com/189750/threefold-is-audaciously-building-a-new-decentralized-internet/)
|||
[![tga_daily](tga_daily.png#mx-auto)](https://tgdaily.com/web/6-dfinity-threefold-are-leading-an-internet-decentralization-revolution/)
{% end %}
{% row(style="center between") %}
[![cointelegraph](cointelegraph.png#mx-auto)](https://cointelegraph-com.cdn.ampproject.org/c/s/cointelegraph.com/news/is-a-new-decentralized-internet-or-web-3-0-possible/amp)
|||
[![banklesstimes](banklesstimes.png#mx-auto)](https://www.banklesstimes.com/2021/06/14/threefolds-green-technology-strategy-to-a-fairer-more-sustainable-world/)
|||
[![grit_daily](grit_daily.png#mx-auto)](https://gritdaily.com/belarus-governments-control-internet/)
{% end %}

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" charset="utf-8"> <html lang="en" charset="utf-8">
{% include "partials/head.html" %} {% include "partials/head.html" %}
{% include "partials/header.html" %} {% include "partials/header.html" %}
<body> <body>
@@ -27,18 +26,24 @@
// makes all links outside of hostname open in new tab // makes all links outside of hostname open in new tab
// from: https://stackoverflow.com/a/4425214 // from: https://stackoverflow.com/a/4425214
var links = document.links; var links = document.links;
console.log(links) var internal_hosts = [
'www.threefold.io',
'threefold.io',
'www2.threefold.io',
'localhost',
'127.0.0.1'
]
for (var i = 0, linksLength = links.length; i < linksLength; i++) { for (var i = 0, linksLength = links.length; i < linksLength; i++) {
if (internal_hosts.includes(links[i].hostname)) {
if (links[i].hostname != window.location.hostname) {
links[i].target = '_blank'; links[i].target = '_blank';
console.log(links[i])
} }
} }
</script> </script>
<!-- End Twitter universal website tag code --> <!-- End Twitter universal website tag code -->
{% include "partials/header.html" %}
<div id="content" class="p-4 pt-12 sm:p-12 md:p-16 lg:p-20 overflow-hidden"> <div id="content" class="p-4 pt-12 sm:p-12 md:p-16 lg:p-20 overflow-hidden">
{% block content %}{% endblock %} {% block content %}{% endblock %}
</div> </div>

225
templates/header.html Normal file
View File

@@ -0,0 +1,225 @@
<!--
Tailwind UI components require Tailwind CSS v1.8 and the @tailwindcss/ui plugin.
Read the documentation to get started: https://tailwindui.com/documentation
--><!-- This example requires Tailwind CSS v1.4.0+ -->
<script type="text/javascript">
var displayedMenu = "";
var hamburgerShown = false;
let width = screen.width;
var isMobile = width < 1024;
function toggleMenu(button) {
if (displayedMenu === button.id.split("-")[0]) {
button.className = button.className.replace(" text-blue-500 bg-stone-200 sm:bg-transparent", " text-gray-900");
hideMenu(button.id.split("-")[0]);
button.lastElementChild.className = button.lastElementChild.className.replace("rotate-0", "-rotate-90")
displayedMenu = "";
}
else {
showMenu(button.id.split("-")[0]);
button.lastElementChild.className = button.lastElementChild.className.replace("-rotate-90", "rotate-0")
button.className = button.className.replace(" text-gray-900", " text-blue-500 bg-stone-200 sm:bg-transparent");
displayedMenu = button.id.split("-")[0]
}
}
function handleClick(button) {
if (button.id === "hamburger-btn" || button.id === "close-hamburger-btn") { toggleHamburger() }
if (button.id.indexOf("menu") !== -1 ) {
toggleMenu(button)
}
}
function toggleHamburger() {
if (hamburgerShown) {
hideHamburger();
hamburgerShown = false;
}
else {
showHamburger();
hamburgerShown = true;
}
}
function showMenu(menuName) {
var menuId = menuName + (isMobile ? '-mobile-menu' : '-menu');
var menuBtnId = menuName + (isMobile ? '-mobile-menu' : '-menu');
var menuElement = document.getElementById(menuId)
menuElement.className = menuElement.className.replace(" hidden" , "");
setTimeout(function() { menuElement.className = menuElement.className.replace("duration-200 ease-in opacity-0 -translate-y-1", "duration-150 ease-out opacity-1 -translate-y-0"); }, 10);
}
function hideMenu(menuName) {
var menuId = menuName + (isMobile ? '-mobile-menu' : '-menu');
var menuElement = document.getElementById(menuId)
menuElement.className = menuElement.className.replace("duration-150 ease-out opacity-1 -translate-y-0", "duration-200 ease-in opacity-0 -translate-y-1");
setTimeout(function() { menuElement.className = menuElement.className + " hidden" }, 300);
}
function showHamburger() {
document.getElementById('header-container').className = "overflow-hidden";
document.getElementById('hamburger').className = "fixed mt-16 z-20 top-0 inset-x-0 transition transform origin-top-right";
document.getElementById('hamburger-btn').className = "hidden lg:hidden inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 focus:text-gray-500 transition duration-150 ease-in-out my-2";
document.getElementById('close-hamburger-btn').className = "inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 focus:text-gray-500 transition duration-150 ease-in-out my-2";
}
function hideHamburger() {
document.getElementById('header-container').className = "";
document.getElementById('hamburger').className = "hidden absolute z-20 top-0 inset-x-0 transition transform origin-top-right lg:hidden";
document.getElementById('hamburger-btn').className = "inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 focus:text-gray-500 transition duration-150 ease-in-out my-2";
document.getElementById('close-hamburger-btn').className = "hidden lg:hidden inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 focus:text-gray-500 transition duration-150 ease-in-out my-2";
if (displayedMenu !== "") { hideMenu(displayedMenu); }
}
window.onload = function(){
let elements = document.getElementsByTagName("button");
let buttons = [...elements]
buttons.forEach((button) => {
button.addEventListener( 'click', function() { handleClick(button) });
})
document.getElementById("mobile-learn-btn").addEventListener( 'click', toggleMenu);
}
</script>
<!-- set variables used for header template -->
{% set section = get_section(path="_index.md") %}
{% set subsections_str = section.subsections | join(sep=" ") %}
{% set logo_path = get_url(path=section.extra.logo_path | default(value='')) %}
{% if "header/_index.md" in subsections_str %}
{% set section = get_section(path="header/_index.md") %}
{% set header_items = section.content | safe | split(pat="<li>") %}
{% include "partials/header_custom.html" %}
{% else %}
<header id="header-container">
{% set header_class = config.extra.header_class | default(value='') %}
<div class="{{'z-10 bg-white fixed w-screen ' ~ header_class}}">
<div class="relative z-50 shadow">
<div class="mx-auto flex z-50 shadow justify-between items-center pl-6 pr-2 md:pr-0 lg:py-5 md:px-12 py-2 lg:px-20 lg:justify-start lg:space-x-20">
<div>
<a href="/" class="flex">
<img class="w-48 h-auto sm:w-15" src="{{logo_path}}" alt="FreeFlow Logo" />
</a>
</div>
<div class="-mr-2 -my-2 lg:hidden">
<button id="hamburger-btn" type="button" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 focus:text-gray-500 transition duration-150 ease-in-out my-2">
<!-- Heroicon name: menu -->
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
</svg>
</button>
<button id="close-hamburger-btn" type="button" class="hidden lg:hidden inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 focus:text-gray-500 transition duration-150 ease-in-out my-2">
<!-- Heroicon name: x -->
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
</div>
<div class="hidden lg:flex-1 lg:flex lg:items-center lg:justify-end lg:space-x-12">
<nav class="flex space-x-10">
{% for page in section.pages %}
{% if page.relative_path == "home/index.md" %} {% continue %} {% endif %}
<a href="{{page.permalink}}" class="text-lg leading-6 text-gray-900 focus:outline-none focus:text-gray-900 transition ease-in-out duration-150 mt-0">
{{page.title}}
</a>
<div class="relative">
</div>
{% endfor %}
{% for subsection in section.subsections %}
{% if subsection == "footer/_index.md" %} {% continue %} {% endif %}
{% set button_id = subsection ~ "-menu-btn" | slugify %}
<div class="relative">
<button type="button" id="{{button_id}}" class="nav_btn text-gray-900 group inline-flex items-center space-x-2 text-lg leading-6 hover:text-blue-300 focus:outline-none transition ease-in-out duration-150">
<span>{{ subsection }}</span>
<div class="-rotate-90 transition-transform"><svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0z" fill="none"/><path d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/></svg></div>
</button>
</div>
{% endfor %}
</nav>
</div>
</div>
</div>
{% for subsection in section.subsections %}
{% if subsection == "footer/_index.md" %} {% continue %} {% endif %}
{% set submenu_id = subsection ~ "-menu" | slugify %}
<nav>
<div id="{{submenu_id}}" class="mt-16 sm:mt-0 md:mt-0 lg:mt-0 xl:mt-0 2xl:mt-0 z-30 absolute inset-x-0 transform shadow-lg lg:backdrop-blur xl:backdrop-blur transition duration-200 ease-in opacity-0 -translate-y-1 hidden">
<div class="bg-white lg:bg-semi-white md:bg-semi-white xl:bg-semi-white">
<div class="mx-8 lg:mx-20 xl:mx-20 px-6 py-4 sm:p-6 md:p-8 lg:p-12 xl:p-12">
{{subsection | safe }}
</div>
</div>
</div>
</nav>
{% endfor %}
<!--
Mobile menu, show/hide based on mobile menu state.
Entering: "duration-200 ease-out"
From: "opacity-0 scale-95"
To: "opacity-100 scale-100"
Leaving: "duration-100 ease-in"
From: "opacity-100 scale-100"
To: "opacity-0 scale-95"
-->
<div id="hamburger" class="hidden fixed mt-16 z-20 top-0 inset-x-0 transition transform origin-top-right lg:hidden">
<div>
<div class="shadow-xs h-screen bg-white divide-y-2 divide-gray-50">
<div class="pb-6 sm:px-12 md:px-16 lg:px-20 space-y-6 sm:space-y-8 sm:pb-8 max-h-screen overflow-y-auto">
<nav class="flex flex-col justify-around pb-12">
{% for page in section.pages %}
{% if page.relative_path == "home/index.md" %} {% continue %} {% endif %}
<a href="{{page.permalink}}" 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">
{{page.title}}
</a>
<hr/>
{% endfor %}
{% for subsection in section.subsections %}
{% if subsection == "footer/_index.md" %} {% continue %} {% endif %}
{% set button_id = subsection ~ "-mobile-menu-btn" | slugify %}
{% set menu_id = subsection ~ "-mobile-menu" | slugify %}
<button type="button" id="{{button_id}}" class="flex flex px-8 py-3 items-start text-left text-gray-900 group inline-flex space-x-2 text-lg leading-6 font-normal hover:text-gray-900 focus:outline-none focus:text-gray-900 transition ease-in-out duration-150">
<span>{{ subsection }}</span>
<div class="-rotate-90 transition-transform"><svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0z" fill="none"/><path d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/></svg></div>
</button>
<div id="{{menu_id}}" class="z-50 leading-3 pl-12 pt-6 pb-4 inset-x-0 text-sm transform duration-200 ease-in opacity-0 -translate-y-1 hidden">
{{ subsection | safe }}
</div>
<hr/>
{% endfor %}
{% if "footer/_index.md" in subsections_str %}
{% set section = get_section(path="footer/_index.md")%}
<div class="mx-8 mt-8">
<div class="space-y-8 lg:max-w-lg xl:max-w-lg lg:mr-8 lg:mb-8 xl:col-span-1">
<img class="w-48 h-auto" src="{{logo_path}}" alt="Company name" />
<p class="text-gray-500 text-base leading-6 ">
{{section.description}}
</p>
</div>
{% endif %}
</nav>
</div>
</div>
</div>
</div>
</header>
{% endif %}

View File

@@ -1,9 +1,9 @@
{% extends "_default/base.html" %} {% extends "_default/base.html" %}
{% block content %} {% block content %}
<!-- Landing page template, has a banner and rows of page summaries --> <!-- home page template, has a banner and rows of page summaries -->
<main> <div>
{{section.content | safe}} {% set page = get_page(path="home/index.md") %}
{{page.content | safe}}
</main> </div>
{% endblock content %} {% endblock content %}