diff --git a/.github/workflows/tf_update.yml b/.github/workflows/tf_update.yml index 1bed507..8ed51a9 100644 --- a/.github/workflows/tf_update.yml +++ b/.github/workflows/tf_update.yml @@ -1,22 +1,43 @@ +<<<<<<< HEAD name: Ourworld.tf on: push: branch: [ master ] +======= +name: freeflow.life +on: + push: + branch: [ development ] +>>>>>>> template/master jobs: job_one: name: Deploy runs-on: ubuntu-latest steps: +<<<<<<< HEAD - name: pushing latest change on www.ourworld.tf uses: appleboy/ssh-action@master with: host: www.ourworld.tf +======= + - name: pushing latest change on www2.freeflow.life + uses: appleboy/ssh-action@master + with: + host: www2.freeflow.life +>>>>>>> template/master username: root key: ${{ secrets.TF_SECRET }} port: 22 script: | +<<<<<<< HEAD cd /opt/www_ourworld_tf/ git log -1 git pull npm run build +======= + cd /opt/www_freeflow_life + git log -1 + git pull + bash build.sh +>>>>>>> template/master diff --git a/.gitignore b/.gitignore index 07feb71..e69de29 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +0,0 @@ -/public -/.vscode -# Local Netlify folder -/.netlify -/node_modules -/static/css \ No newline at end of file diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..fae6947 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,7 @@ +# This configuration file was automatically generated by Gitpod. +# Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file) +# and commit this file to your remote git repository to share the goodness with others. + +tasks: + - init: sh build + command: sh build diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..3e11e8e --- /dev/null +++ b/build.sh @@ -0,0 +1,44 @@ +echo "Starting build..." + +# TODO: Check if current version is latest to avoid redundant installation +if [[ -f "tailwindcss" ]] +then + rm tailwindcss +fi + +# checks os and architecture for correct release +# https://stackoverflow.com/a/8597411 +echo "Installing & building tailwind..." +ASSET="tailwindcss" + +if [[ "$OSTYPE" == "linux-gnu"* ]]; then + ASSET="$ASSET-linux" +elif [[ "$OSTYPE" == "darwin"* ]]; then + ASSET="$ASSET-macos" +fi +if [[ "$(uname -m)" == "x86_64"* ]]; then + ASSET="$ASSET-x64" +elif [[ "$(uname -m)" == "arm64"* ]]; then + ASSET="$ASSET-arm64" +fi + +curl -sLO "https://github.com/tailwindlabs/tailwindcss/releases/latest/download/${ASSET}" +chmod +x $ASSET +mv $ASSET tailwindcss + + +# initialized and configures tailwind if not configured +echo "Initializing tailwind..." +if [[ ! -f "tailwind.config.js" ]] +then + ./tailwindcss init + sed -i '' "s| content: \\[\\],| content: \\['./templates/**/*.html'\\],|g" tailwind.config.js +fi + +# compiles tailwind css for prod & builds project +echo "Compiling tailwindcss and building zola project..." +rm -rf public static/css +./tailwindcss -i css/index.css -o ./static/css/index.css --minify +zola build + + diff --git a/config.toml b/config.toml index 205f933..818a2ce 100644 --- a/config.toml +++ b/config.toml @@ -1,5 +1,5 @@ # The URL the site will be built for -base_url = "https://liquiditypool.threefold.io" +base_url = "https://ourworld.tf" # Change this to your own URL! Please note this variable **must** be uncommented. title = "ThreeFold" diff --git a/css/layout.css b/css/layout.css index a8e08b5..574c21b 100644 --- a/css/layout.css +++ b/css/layout.css @@ -2,6 +2,18 @@ main { @apply pt-0; } +<<<<<<< HEAD +======= +#text-1xl { @apply text-xl } +#text-2xl { @apply text-2xl } +#text-3xl { @apply text-3xl } +#text-4xl { @apply text-4xl } +#text-5xl { @apply text-5xl } +#text-6xl { @apply text-6xl } +#text-7xl { @apply text-7xl } +#text-8xl { @apply text-8xl } + +>>>>>>> template/master /* html, body { @apply dark:bg-black; @@ -120,6 +132,7 @@ h5, .h5, h6, .h6 { +<<<<<<< HEAD @apply font-sans leading-none tracking-tight; } @@ -137,6 +150,11 @@ h6, .h6, h1, +======= +} + +h1, +>>>>>>> template/master .h1 { @apply text-4xl font-extrabold; } diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..ac927fd --- /dev/null +++ b/start.sh @@ -0,0 +1,25 @@ +# builds if executable isn't foound +if [[ ! -f "tailwindcss" ]] +then + sh build.sh +fi + +# initialized and configures tailwind if not configured +if [[ ! -f "tailwind.config.js" ]] +then + ./tailwindcss init + sed -i '' "s| content: \\[\\],| content: \\['./templates/**/*.html'\\],|g" tailwind.config.js +fi + +# compiles tailwind css & launches locally +rm -rf public static/css +./tailwindcss -i css/index.css -o ./static/css/index.css --watch & zola serve & + +# compiles tailwind css for prod & builds project +./tailwindcss -i css/index.css -o ./static/css/index.css --minify +zola build + +# kills zola and tw bg processes on interrupt +trap 'kill $(jobs -p); exit 1' INT +wait + diff --git a/templates/_default/base.html b/templates/_default/base.html index 1e64aa0..a21fd71 100644 --- a/templates/_default/base.html +++ b/templates/_default/base.html @@ -1,5 +1,6 @@ +<<<<<<< HEAD {% include "partials/head.html" %} @@ -9,4 +10,16 @@ +======= + + {% include "partials/head.html" %} + + + {% include "partials/header.html" %} +
+ {% block content %}{% endblock %} +
+ {% include "partials/footer.html" %} + +>>>>>>> template/master \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 24ba5b7..179501b 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,8 +1,16 @@ {% extends "_default/base.html" %} {% block content %} +<<<<<<< HEAD
{{section.content | safe}}
+======= + +
+ {% set page = get_page(path="home/index.md") %} + {{page.content | safe}} +
+>>>>>>> template/master {% endblock content %} \ No newline at end of file diff --git a/templates/page.html b/templates/page.html index 5f9cac9..577058f 100644 --- a/templates/page.html +++ b/templates/page.html @@ -5,6 +5,16 @@
+<<<<<<< HEAD {{page.content | safe}} +======= +
+ {% if page %} + {{page.content | safe}} + {% else %} + {{section.content | safe}} + {% endif %} +
+>>>>>>> template/master
{% endblock content %} diff --git a/templates/partials/footer.html b/templates/partials/footer.html index fd2a0fc..bb6a866 100644 --- a/templates/partials/footer.html +++ b/templates/partials/footer.html @@ -3,6 +3,7 @@ Read the documentation to get started: https://tailwindui.com/documentation --> +<<<<<<< HEAD {%- set section = get_section(path="footer/_index.md") %} {%- set logoPath = section.extra.logoPath %} @@ -30,4 +31,22 @@ - \ No newline at end of file + +======= +{%- set section = get_section(path="_index.md") %} + +{% set subsections_str = section.subsections | join(sep=" ") %} + + +>>>>>>> template/master diff --git a/templates/partials/header.html b/templates/partials/header.html index 472ca1b..a94b07c 100644 --- a/templates/partials/header.html +++ b/templates/partials/header.html @@ -84,6 +84,7 @@ +<<<<<<< HEAD {%- set section = get_section(path="header/_index.md") %} {% set header_items = section.content | safe | split(pat="
  • ") %} @@ -224,3 +225,144 @@ +======= + + +{% 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="
  • ") %} + {% include "partials/header_custom.html" %} +{% else %} +
    + {% set header_class = config.extra.header_class | default(value='') %} +
    +
    +
    +
    + + FreeFlow Logo + +
    +
    + + +
    + +
    +
    + {% for subsection in section.subsections %} + {% if subsection == "footer/_index.md" %} {% continue %} {% endif %} + {% set submenu_id = subsection ~ "-menu" | slugify %} + + + + {% endfor %} + + + + + + +
    + +{% endif %} + + +>>>>>>> template/master diff --git a/templates/partials/header_custom.html b/templates/partials/header_custom.html new file mode 100644 index 0000000..a1fca53 --- /dev/null +++ b/templates/partials/header_custom.html @@ -0,0 +1,228 @@ + + + + +{%- set section = get_section(path="header/_index.md") %} +{% set header_items = section.content | safe | split(pat="
  • ") %} + +
    +
    +
    +
    +
    + + Ourworld Logo + +
    +
    + + +
    +
  • ") %} + {% set header_label = header_arr[0] %} + {% if ' + {{link_label}} + + {% else %} +
    + {% set button_id = header_label ~ "-menu-btn" | slugify %} + +
    + + {% endif %} +{% endif %} +{% endfor %} + + + + + + +{% for header_item in header_items %} +{% if not loop.first %} + {% set header_arr = header_item | split(pat="") %} + {% set header_label = header_arr[0] %} + {% set header_menu = header_arr[1] %} + {% set menu_id = header_label ~ "-menu" | slugify %} + + + + +{% endif %} +{% endfor %} + + + + + + + diff --git a/templates/shortcodes/row.html b/templates/shortcodes/row.html index 643881d..ef1233a 100644 --- a/templates/shortcodes/row.html +++ b/templates/shortcodes/row.html @@ -9,8 +9,38 @@ Parameters: - bgPath: if bgPath is passed, the row has a full width background --> +<<<<<<< HEAD {% set columns = body | safe | markdown | split(pat="|||") %} {% set row_class = "relative pt-12 flex flex-col sm:grid sm:grid-cols-2 sm:gap-10 md:flex md:flex-row md:py-4 lg:py-8"%} +======= + + +{% if page %} + {% if "](" in body %} + {% set body_arr = body | split(pat="](") %} + {% set body = body_arr[0] %} + {% for i in body_arr %} + {% set prev_index = loop.index0 - 1 %} + {% if not loop.first %} + {% if "![" in body_arr[prev_index] %} + {% set_global body = body ~ '](' ~ page.permalink ~ i %} + {% else %} + {% if i is not starting_with("http") %} + {% set base_url = get_url(path="") %} + {% set_global body = body ~ '](' ~ base_url ~ i %} + {% else %} + {% set_global body = body ~ '](' ~ i %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} +{% endif %} + +{% set columns = body | safe | markdown | split(pat="

    |||

    ") %} + +{% set row_class = "relative py-12 flex flex-col sm:grid sm:grid-cols-2 sm:gap-10 md:flex md:flex-row flex-wrap max-w-fit "%} +>>>>>>> template/master {% if 2 < columns | length %} @@ -19,7 +49,40 @@ Parameters: {% set row_class = row_class ~ " lg:items-center" %} {% endif %} +<<<<<<< HEAD {% set col_class = "flex-1 mb-20 lg:mb-0 " %} +======= +{% set col_class = "flex-1 mb-4 md:mb-12 lg:mb-0 " %} +{% set col_class = col_class ~ " lg:mx-8 " %} + + + + +{% set margin_class = " mx-4 md:mx-16 lg:mx-24 " %} + +{% if margin %} + {% if "none" in margin %} + {% set margin_class = " mx-0 " %} + {% elif "wide" in margin %} + {% set margin_class = " mx-4 sm:mx-8 md:mx-12 lg:mx-16 xl:mx-20 " %} + {% elif "moderate" in margin %} + {% set margin_class = " mx-8 sm:mx-16 md:mx-24 lg:mx-28 " %} + {% elif "narrow" in margin %} + {% set margin_class = " mx-12 sm:mx-20 md:mx-28 lg:mx-32 " %} + {% elif "tight" in margin %} + {% set margin_class = " mx-20 sm:mx-32 md:mx-60 lg:mx-80 xl:mx-96 " %} + {% endif %} + {% if "lean-left" in margin %} + {% set col_class = col_class ~ " lg:last:px-20 lg:max-w-[50%] lg:mx-0 " %} + {% set row_class = row_class ~ " !ml-0 sm:gap-0 " %} + {% elif "lean-right" in margin %} + {% set col_class = col_class ~ " lg:first:px-20 lg:max-w-[50%] lg:mx-0 " %} + {% set row_class = row_class ~ " !mr-0 sm:gap-0 " %} + {% endif %} +{% endif %} + +{% set row_class = row_class ~ margin_class %} +>>>>>>> template/master {% if style %} @@ -34,22 +97,34 @@ Parameters: {% set col_class = col_class ~ " last:px-20 lg:max-w-[50%] " %} {% set row_class = row_class ~ " sm:gap-0 " %} {% elif "lean-right" in style %} +<<<<<<< HEAD {% set col_class = col_class ~ " first:px-20 lg:max-w-[50%] " %} +======= + {% set col_class = col_class ~ " first:px-20 lg:max-w-[50%] -mr-8 md:-mr-12 lg:-mr-16 xl:-mr-20 " %} +>>>>>>> template/master {% set row_class = row_class ~ " sm:gap-0 " %} {% else %} {% set row_class = row_class ~ " md:py-0 " %} {% set col_class = col_class ~ " lg:m-0" %} {% endif %} {% else %} +<<<<<<< HEAD {% set row_class = row_class ~ " mx-8" %} {% set col_class = col_class ~ " lg:mx-8 " %} +======= + {% set row_class = row_class ~ " w-screen " %} +>>>>>>> template/master {% endif %} {% if "between" in style %} {% set row_class = row_class ~ " lg:max-w-6xl " %} {% elif "moderate" in style %} +<<<<<<< HEAD {% set row_class = row_class ~ " lg:mx-20 " %} +======= + {% set row_class = row_class ~ " " %} +>>>>>>> template/master {% endif %} @@ -58,7 +133,11 @@ Parameters: {% elif "tight" in style %} {% set row_class = row_class ~ " lg:max-w-sm " %} {% elif "moderate" in style %} +<<<<<<< HEAD {% set row_class = row_class ~ " lg:mx-20 " %} +======= + {% set row_class = row_class ~ " mx-20 " %} +>>>>>>> template/master {% endif %} {% if "invert-color" in style %} @@ -66,9 +145,14 @@ Parameters: {% set row_class = row_class ~ " text-white lg:text-white " %} {% endif %} +<<<<<<< HEAD {% else %} {% set row_class = row_class ~ " mx-12 " %} +======= + {% else %} + {% set row_class = row_class ~ " " %} +>>>>>>> template/master {% endif %} {% set anchor_link = ""%} @@ -81,8 +165,15 @@ Parameters: {% set styles = "" %} {% set div_class = " " %} {% if bgPath %} +<<<<<<< HEAD {% set styles = "background: url('" ~ bgPath ~ "'); background-size: cover; background-position: center;" %} {% if "#desktop" in bgPath %} +======= + {% set background_url = page.permalink ~ bgPath %} + {% set styles = "background: url('" ~ background_url ~ "'); background-size: cover; background-position: center;" %} + {% if "#desktop" in bgPath %} + {% set bgStyle = false %} +>>>>>>> template/master {% set div_class = " !bg-[length:0px_0px] !bg-no-repeat lg:!bg-cover " %} {% set row_class = row_class | replace(from='text-white', to='text-black') %} {% if "invert-color" in style %} @@ -95,6 +186,11 @@ Parameters: {% if bgStyle %} {% if "full" in bgStyle %} {% set styles = styles ~ "height: -webkit-fill-available; height: 100vh;" %} +<<<<<<< HEAD +======= + {% elif "hero" in bgStyle %} + {% set div_class = div_class ~ " -mt-24 pt-24 " %} +>>>>>>> template/master {% endif %} {% endif %} {% if bgColor %} @@ -102,9 +198,19 @@ Parameters: {% set row_class = row_class ~ " py-0 " %} {% endif %} +<<<<<<< HEAD
    +======= + +{% set no_margins = " -mx-8 md:-mx-12 lg:-mx-16 xl:-mx-20" %} + + +
    +
    + +>>>>>>> template/master {% for column in columns%} diff --git a/templates/shortcodes/space.html b/templates/shortcodes/space.html index 1a54f83..2799d93 100644 --- a/templates/shortcodes/space.html +++ b/templates/shortcodes/space.html @@ -1 +1,12 @@ -
    \ No newline at end of file +<<<<<<< HEAD +
    +======= + +{% set height = 52 %} +{% if size %} + {% if size == "small" %} + {% set height = 28 %} + {% endif %} +{% endif %} +
    +>>>>>>> template/master