Initial commit
This commit is contained in:
		
							
								
								
									
										147
									
								
								templates/newsPage.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										147
									
								
								templates/newsPage.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,147 @@
 | 
			
		||||
{% extends "_default/base.html" %}
 | 
			
		||||
{% block content %}
 | 
			
		||||
 | 
			
		||||
{% set split = page.content | split(pat="threefold.io") %}
 | 
			
		||||
{% if split | length < 2 %}
 | 
			
		||||
    {% set content = page.content %}
 | 
			
		||||
{% else %}
 | 
			
		||||
    {% set content = "" %}
 | 
			
		||||
    {% for part in split %}
 | 
			
		||||
        {% if part is starting_with("/blog") %}
 | 
			
		||||
            {% set split_part = part | split(pat='/">') %}
 | 
			
		||||
            {% set link = split_part[0] %}
 | 
			
		||||
            {% set link = link | replace(from="/blog/post", to="/blog") %}
 | 
			
		||||
            {% set link = link | replace(from="_", to="-") %}
 | 
			
		||||
            {% set rest_part = split_part | slice(start=1) | join(sep='/">') %}
 | 
			
		||||
            {% set part = link ~ '/">' ~ rest_part %}
 | 
			
		||||
        {% endif %}
 | 
			
		||||
        {% if part is starting_with("/people") %}
 | 
			
		||||
            {% set split_part = part | split(pat='/">') %}
 | 
			
		||||
            {% set link = split_part[0] %}
 | 
			
		||||
            {% set link = link | replace(from="_", to="-") %}
 | 
			
		||||
            {% set rest_part = split_part | slice(start=1) | join(sep='/">') %}
 | 
			
		||||
            {% set part = link ~ '/">' ~ rest_part %}
 | 
			
		||||
        {% endif %}
 | 
			
		||||
        {% if loop.first %}
 | 
			
		||||
            {% set_global content = part %}
 | 
			
		||||
        {% else %}
 | 
			
		||||
            {% set_global content = content ~ "threefold.io" ~ part %}
 | 
			
		||||
        {% endif %}
 | 
			
		||||
    {% endfor %}
 | 
			
		||||
{% endif %}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<!-- Default page template for news posts and basic informative markdown files -->
 | 
			
		||||
<main class="container mx-auto mt-16">
 | 
			
		||||
 | 
			
		||||
  <div class="article lg:w-4/6 mx-auto">
 | 
			
		||||
 | 
			
		||||
    <div>
 | 
			
		||||
      <section class="post-header px-0 mb-4 border-b border-gray-600">
 | 
			
		||||
        <h2 class="md:text-4xl text-3xl font-medium mb-2 leading-none  text-gray-100">
 | 
			
		||||
          {{ page.title }}
 | 
			
		||||
        </h2>
 | 
			
		||||
        <p class="md:text-lg mb-4 text-base text-gray-300">
 | 
			
		||||
          {{ page.description }}
 | 
			
		||||
        </p>
 | 
			
		||||
      </section>
 | 
			
		||||
      <section class="post-author-list mb-3 mt-2 mx-0">
 | 
			
		||||
        <div class="flex items-center">
 | 
			
		||||
          <div class="flex justify-between items-center">
 | 
			
		||||
            <ul class="list-none pl-0 flex author-list m-0">
 | 
			
		||||
            {% if page.taxonomies.people %}
 | 
			
		||||
                {% for person in page.taxonomies.people %}
 | 
			
		||||
                    {% set author_path = 'people/' ~ person ~ '/index.md' %}
 | 
			
		||||
                    {% set people = get_section(path="people/_index.md") %}           
 | 
			
		||||
                    {% set pages_str = people.pages | json_encode() | as_str %}
 | 
			
		||||
                    {% if pages_str is containing(person) %}
 | 
			
		||||
                        {% set author = get_page(path=author_path) %}
 | 
			
		||||
                        {% set author_img = get_url(path='/' ~ author.relative_path | replace(from='_', to='-') | replace(from='index.md', to=author.extra.imgPath)) %}
 | 
			
		||||
              <li class="author-list-item">
 | 
			
		||||
                <a href="{{author.permalink}}" tooltip="{{author.title}}">
 | 
			
		||||
                  <img src="{{author_img}}" alt="{{ author.title }}" class="
 | 
			
		||||
                    w-8
 | 
			
		||||
                    h-8
 | 
			
		||||
                    sm:h-10
 | 
			
		||||
                    sm:w-10
 | 
			
		||||
                    rounded-full
 | 
			
		||||
                    bg-gray-200
 | 
			
		||||
                    border border-gray-600
 | 
			
		||||
                  " />
 | 
			
		||||
                </a>
 | 
			
		||||
              </li>
 | 
			
		||||
              {% endif %}
 | 
			
		||||
              {% endfor %}
 | 
			
		||||
              {% endif %}
 | 
			
		||||
            </ul>
 | 
			
		||||
          </div>
 | 
			
		||||
 | 
			
		||||
          <div class="pl-3 flex flex-col text-xs leading-none uppercase">
 | 
			
		||||
            <p>
 | 
			
		||||
            {% if page.taxonomies.people %}
 | 
			
		||||
            {% for person in page.taxonomies.people %}
 | 
			
		||||
            {% set author_path = 'people/' ~ person ~ '/index.md' %}
 | 
			
		||||
            {% set people = get_section(path="people/_index.md") %}           
 | 
			
		||||
            {% set pages_str = people.pages | json_encode() | as_str %}
 | 
			
		||||
            {% if pages_str is containing(person) %}
 | 
			
		||||
                {% set author = get_page(path=author_path) %}
 | 
			
		||||
                {% set author_img = get_url(path='/' ~ author.relative_path | replace(from='_', to='-') | replace(from='index.md', to=author.extra.imgPath)) %}
 | 
			
		||||
              <span class="text-xs leading-none uppercase">
 | 
			
		||||
                <a href="{{author.permalink}}" tooltip="{{author.title}}" class="hover:underline text-gray-400">{{ author.title }}</a>
 | 
			
		||||
              </span>
 | 
			
		||||
              {% endif %}
 | 
			
		||||
                {% endfor %}
 | 
			
		||||
            {% endif %}
 | 
			
		||||
            </p>
 | 
			
		||||
            <p class="text-gray-400 text-xs leading-none uppercase">
 | 
			
		||||
              <time datetime="{{page.date}}">
 | 
			
		||||
                {{ page.date | date(format="%B %e, %Y", timezone="America/Chicago") }}
 | 
			
		||||
              </time>
 | 
			
		||||
              {#  ·  {{ page.news.timeToRead }} min read #}
 | 
			
		||||
            </p>
 | 
			
		||||
          </div>
 | 
			
		||||
          <div class="my-2 ml-auto sharethis-inline-share-buttons"></div>
 | 
			
		||||
        </div>
 | 
			
		||||
      </section>
 | 
			
		||||
    </div>
 | 
			
		||||
    <section class="post-image mx-auto w-full">
 | 
			
		||||
        {% if page.extra.imgPath %}
 | 
			
		||||
    {% set img_url = get_url(path='/' ~ page.relative_path | replace(from='_', to='-') | replace(from='index.md', to=page.extra.imgPath)) %}
 | 
			
		||||
    <img src="{{img_url}}" />
 | 
			
		||||
    {%endif%}
 | 
			
		||||
    </section>
 | 
			
		||||
 | 
			
		||||
    <div class="py-12">
 | 
			
		||||
      <section class="
 | 
			
		||||
          post-content
 | 
			
		||||
          container
 | 
			
		||||
          mx-auto
 | 
			
		||||
          relative
 | 
			
		||||
          font-serif
 | 
			
		||||
          text-gray-300
 | 
			
		||||
        ">
 | 
			
		||||
        <div class="post-content-text text-xl">{{ content | safe }}</div>
 | 
			
		||||
      </section>
 | 
			
		||||
 | 
			
		||||
      <section class="post-tags container mx-auto relative py-10">
 | 
			
		||||
        {% for tag in page.taxonomies.tags %}
 | 
			
		||||
        {% set fullpath = "/tags/" ~ tag | replace(from='_', to='-' ) %}
 | 
			
		||||
        <a href="{{fullpath}}" class="
 | 
			
		||||
        text-xs
 | 
			
		||||
        bg-transparent
 | 
			
		||||
        hover:text-gray-100
 | 
			
		||||
        py-2
 | 
			
		||||
        px-4
 | 
			
		||||
        mr-2
 | 
			
		||||
        border
 | 
			
		||||
        hover:border-gray-100
 | 
			
		||||
        border-gray-600
 | 
			
		||||
        text-gray-400
 | 
			
		||||
        rounded-full
 | 
			
		||||
          ">{{ tag }}</a>
 | 
			
		||||
        {% endfor %}
 | 
			
		||||
      </section>
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
</main>
 | 
			
		||||
{% endblock content %}
 | 
			
		||||
		Reference in New Issue
	
	Block a user