<commit_before><template name="top_banner">
  <div class="home-top top-banner {{#if slim}}slim{{else}}fat{{/if}}">
    <div class="left">
      <div class="logo-title {{#if slim}}slim{{else}}fat{{/if}}">
        {{#linkTo route="home"}}
        <div class="title {{#if slim}}slim{{else}}fat{{/if}}">
          <img src="{{c.url 'static/foldtitle.svg'}}">
        </div>
        {{/linkTo}}
      </div>
      {{#if showFilters}}
        <div class="filter {{#if slim}}slim{{else}}fat{{/if}}">
          {{> filters slim=slim}}
          <!--{{> filters}} in {{> categories}}-->
        </div>
        <div class="search {{#if slim}}slim{{else}}fat{{/if}}">
          {{> search slim=slim}}
        </div>
      {{/if}}
    </div>
    {{> banner_buttons slim=slim hideMakeAStory=hideMakeAStory}}
  </div>
</template>


<template name="top_banner_simple_no_links">
  <div class="home-top not-sticky top-banner {{#if slim}}slim{{else}}fat{{/if}}">
    <div class="left">
      <div class="logo-title {{#if slim}}slim{{else}}fat{{/if}}">
        <!--{{#linkTo route="home"}}-->
          <div class="title {{#if slim}}slim{{else}}fat{{/if}}">
            <img src="{{c.url 'static/foldtitle.svg'}}">
          </div>
        <!--{{/linkTo}}-->
      </div>
    </div>
  </div>
</template>

<template name="top_banner_simple">
  <div class="home-top top-banner {{#if slim}}slim{{else}}fat{{/if}}">
    <div class="left">
      <div class="logo-title {{#if slim}}slim{{else}}fat{{/if}}">
        {{#linkTo route="home"}}
          <div class="title {{#if slim}}slim{{else}}fat{{/if}}">
            <img src="{{c.url 'static/foldtitle.svg'}}">
          </div>
        {{/linkTo}}
      </div>
    </div>
  </div>
</template>

<template name="banner_buttons">
  <div class="banner-buttons {{#if slim}}slim{{else}}fat{{/if}}">
    <div class="action-items {{#if slim}}slim{{else}}fat{{/if}}">
      <ol>
        {{#unless isPhone}}
          {{#unless hideMakeAStory}}
            <li class="create-story">
              {{> create_story}}
            </li>
          {{/unless}}
        {{/unless}}
        {{#unless isPhone}}
          {{> login_buttons }}

          <li class="about-fold">
            <!--{{#linkTo route="about"}}-->
            <a href="/read/FOLD/what-is-fold-TiyWEK6C">
              <button>
                <span class="text">About FOLD</span>
              </button>
            </a>
            <!--{{/linkTo}}-->
          </li>
        {{/unless}}
      </ol>
    </div>
    {{#unless isPhone}}
    {{#unless slim}}
      <ol class="social-links">
        <li>
          <a href="https://www.facebook.com/atFOLD" target="_blank">{{> facebook_social_icon}}</a>
        </li>
        <li>
          <a href="https://www.twitter.com/readFOLD" target="_blank">{{> twitter_social_icon}}</a>
        </li>
      </ol>
    {{/unless}}
    {{/unless}}
  </div>
</template>

<template name="login_buttons">
  <li class="user-action">

    {{#if currentUser}}
      <a href="/profile/{{currentUser.displayUsername}}">

        <button>
          <img class="profile-picture" src="{{profileImage currentUser}}"/>
          <span class="text">{{currentUser.profile.name}}</span>
        </button>
      </a>
      {{#if showUserInfo}}
        <ol class="user-menu">
          <li>
            {{#linkTo route="my_story_profile"}}<button>My stories</button>{{/linkTo}}
          </li>
          <li>
            <button class="logout">Logout</button>
          </li>
        </ol>
      {{/if}}
    {{else}}
      <button class="signin"> Log in / Sign up</button>
    {{/if}}
  </li>
</template>

<template name="create_story">
  <button class="create-story" href="javascript:void(0);">
    <span class="text">Make a Story</span>
  </button>
</template>

<template name="home">
  {{> top_banner showFilters="true"}}
  <div class="stories">
    <section>
      <div class="story-container">
        {{> all_stories}}
      </div>
    </section>
  </div>
</template>


<template name="search">
  <input class="story-search" type="search" placeholder="Search">
</template>

<template name="filters">
  <span class="filters">
    <select data-custom-id="custom" data-custom-class="custom" value="{{initialFilterValue}}">
      {{#each filters}}
        <option value="{{this.value}}" {{conditionallySelected}}>
          {{this.label}}
        </option>
      {{/each}}
    </select>
  </span>
</template>

<template name="categories">
  <span class="categories">
    <select>
      {{#each categories}}
        <option class="category {{#if selected}}selected{{/if}}" data-category="{{this}}">
          {{this}}
        </option>
      {{/each}}
    </select>
  </span>
</template>

<template name="all_stories">
  {{#unless loggingIn}}
    {{#unless currentUser}}
      {{#unless boxDismissed}}

      <div class="what-is-fold-box" style="background-image: url({{c.url 'static/homepage_hero_image'}})">
        <div class="overlay"></div>
        <div class="text">
          <div class="tagline">Create. Remix. Discover.</div>
          <div class="description">FOLD is an open publishing platform that makes it easy to explain and explore new ideas.</div>
          <div class="description-link"><a href="/read/FOLD/what-is-fold-TiyWEK6C">Learn more about us.</a></div>
        </div>
        <button class="dismiss-box">✕</button>

      </div>
      {{/unless}}
    {{/unless}}
  {{/unless}}

  {{#each stories}}
    {{> story_preview story=this }}
  {{/each}}
  <div class="home-loading-footer">
    {{#if storiesLoading}}
      {{> loading_icon}}
    {{else}}
      {{#if moreToShow}}
        <button class="show-more">Show more</button>
      {{/if}}
    {{/if}}
  </div>

</template>

<template name="story_preview">
  {{#with story}}
    <div class="story" data-story-id="{{_id}}">
      {{> _story_preview_content}}
      {{> edit_or_read_bar}}
    </div>
  {{/with}}
</template>

<template name="_story_preview_content">
  {{#with story}}
    <div class="context-count">
      {{#if contextCountOfType 'video'}}
        <div class="context-count-icon">
          {{> video_icon }}
          <div class="context-count-text">
            {{contextCountOfType 'video'}}
          </div>
        </div>
      {{/if}}
      {{#if contextCountOfType 'image'}}
        <div class="context-count-icon">
          {{> image_icon }}
          <div class="context-count-text">
            {{contextCountOfType 'image'}}
          </div>
        </div>
      {{/if}}
      {{#if contextCountOfType 'gif'}}
        <div class="context-count-icon">
          {{> gif_icon }}
          <div class="context-count-text">
            {{contextCountOfType 'gif'}}
          </div>
        </div>
      {{/if}}
      {{#if contextCountOfType 'map'}}
        <div class="context-count-icon">
          {{> map_icon }}
          <div class="context-count-text">
            {{contextCountOfType 'map'}}
          </div>
        </div>
      {{/if}}
      {{#if contextCountOfType 'twitter'}}
        <div class="context-count-icon">
          {{> twitter_icon }}
          <div class="context-count-text">
            {{contextCountOfType 'twitter'}}
          </div>
        </div>
      {{/if}}
      {{#if contextCountOfType 'audio'}}
        <div class="context-count-icon">
          {{> audio_icon }}
          <div class="context-count-text">
            {{contextCountOfType 'audio'}}
          </div>
        </div>
      {{/if}}
      {{#if contextCountOfType 'text'}}
        <div class="context-count-icon">
          {{> text_icon }}
          <div class="context-count-text">
            {{contextCountOfType 'text'}}
          </div>
        </div>
      {{/if}}
      {{#if contextCountOfType 'link'}}
        <div class="context-count-icon">
          {{> link_icon }}
          <div class="context-count-text">
            {{contextCountOfType 'link'}}
          </div>
        </div>
      {{/if}}
      <!--TODO - add remix check-->
    </div>

    {{#linkTo route=linkRoute data=this}}
      <div class="overlay-image">
        {{#with headerImageVideoObject 'small'}}
          {{> looping_video}}
        {{else}}
          <img src="{{headerImageUrl 'small'}}" />
        {{/with}}
      </div>
    {{/linkTo}}

    {{#linkTo route=linkRoute data=this}}
      <div class="story-card">
      </div>
    {{/linkTo}}

    {{#linkTo route=linkRoute data=this}}
      <div class="headline">
        {{title}}
      </div>
    {{/linkTo}}

    <div class="byline">
      <a class="author-profile-link" href="{{profileUrl}}">
        <div class="pull-left">
          <div class="author-image">
           <img class="profile-picture" src="{{profileImage author}}"/>
          </div>

          <div class="author-name-date">
            <div class="author-name">By <span>{{authorName}}</span></div>
            <div class="publish-date">{{lastPublishDate}}</div>
          </div>
        </div>
      </a>

      <div class="pull-right">
        {{> favorite_button }}
        {{#if adminMode}}
          {{> editors_pick_button }}
        {{/if}}
      </div>
    </div>
  {{/with}}

</template>

<template name="edit_or_read_bar">
  <div class="edit-or-read">

  </div>
</template>
<commit_msg>message when no stories found<commit_after><template name="top_banner">
  <div class="home-top top-banner {{#if slim}}slim{{else}}fat{{/if}}">
    <div class="left">
      <div class="logo-title {{#if slim}}slim{{else}}fat{{/if}}">
        {{#linkTo route="home"}}
        <div class="title {{#if slim}}slim{{else}}fat{{/if}}">
          <img src="{{c.url 'static/foldtitle.svg'}}">
        </div>
        {{/linkTo}}
      </div>
      {{#if showFilters}}
        <div class="filter {{#if slim}}slim{{else}}fat{{/if}}">
          {{> filters slim=slim}}
          <!--{{> filters}} in {{> categories}}-->
        </div>
        <div class="search {{#if slim}}slim{{else}}fat{{/if}}">
          {{> search slim=slim}}
        </div>
      {{/if}}
    </div>
    {{> banner_buttons slim=slim hideMakeAStory=hideMakeAStory}}
  </div>
</template>


<template name="top_banner_simple_no_links">
  <div class="home-top not-sticky top-banner {{#if slim}}slim{{else}}fat{{/if}}">
    <div class="left">
      <div class="logo-title {{#if slim}}slim{{else}}fat{{/if}}">
        <!--{{#linkTo route="home"}}-->
          <div class="title {{#if slim}}slim{{else}}fat{{/if}}">
            <img src="{{c.url 'static/foldtitle.svg'}}">
          </div>
        <!--{{/linkTo}}-->
      </div>
    </div>
  </div>
</template>

<template name="top_banner_simple">
  <div class="home-top top-banner {{#if slim}}slim{{else}}fat{{/if}}">
    <div class="left">
      <div class="logo-title {{#if slim}}slim{{else}}fat{{/if}}">
        {{#linkTo route="home"}}
          <div class="title {{#if slim}}slim{{else}}fat{{/if}}">
            <img src="{{c.url 'static/foldtitle.svg'}}">
          </div>
        {{/linkTo}}
      </div>
    </div>
  </div>
</template>

<template name="banner_buttons">
  <div class="banner-buttons {{#if slim}}slim{{else}}fat{{/if}}">
    <div class="action-items {{#if slim}}slim{{else}}fat{{/if}}">
      <ol>
        {{#unless isPhone}}
          {{#unless hideMakeAStory}}
            <li class="create-story">
              {{> create_story}}
            </li>
          {{/unless}}
        {{/unless}}
        {{#unless isPhone}}
          {{> login_buttons }}

          <li class="about-fold">
            <!--{{#linkTo route="about"}}-->
            <a href="/read/FOLD/what-is-fold-TiyWEK6C">
              <button>
                <span class="text">About FOLD</span>
              </button>
            </a>
            <!--{{/linkTo}}-->
          </li>
        {{/unless}}
      </ol>
    </div>
    {{#unless isPhone}}
    {{#unless slim}}
      <ol class="social-links">
        <li>
          <a href="https://www.facebook.com/atFOLD" target="_blank">{{> facebook_social_icon}}</a>
        </li>
        <li>
          <a href="https://www.twitter.com/readFOLD" target="_blank">{{> twitter_social_icon}}</a>
        </li>
      </ol>
    {{/unless}}
    {{/unless}}
  </div>
</template>

<template name="login_buttons">
  <li class="user-action">

    {{#if currentUser}}
      <a href="/profile/{{currentUser.displayUsername}}">

        <button>
          <img class="profile-picture" src="{{profileImage currentUser}}"/>
          <span class="text">{{currentUser.profile.name}}</span>
        </button>
      </a>
      {{#if showUserInfo}}
        <ol class="user-menu">
          <li>
            {{#linkTo route="my_story_profile"}}<button>My stories</button>{{/linkTo}}
          </li>
          <li>
            <button class="logout">Logout</button>
          </li>
        </ol>
      {{/if}}
    {{else}}
      <button class="signin"> Log in / Sign up</button>
    {{/if}}
  </li>
</template>

<template name="create_story">
  <button class="create-story" href="javascript:void(0);">
    <span class="text">Make a Story</span>
  </button>
</template>

<template name="home">
  {{> top_banner showFilters="true"}}
  <div class="stories">
    <section>
      <div class="story-container">
        {{> all_stories}}
      </div>
    </section>
  </div>
</template>


<template name="search">
  <input class="story-search" type="search" placeholder="Search">
</template>

<template name="filters">
  <span class="filters">
    <select data-custom-id="custom" data-custom-class="custom" value="{{initialFilterValue}}">
      {{#each filters}}
        <option value="{{this.value}}" {{conditionallySelected}}>
          {{this.label}}
        </option>
      {{/each}}
    </select>
  </span>
</template>

<template name="categories">
  <span class="categories">
    <select>
      {{#each categories}}
        <option class="category {{#if selected}}selected{{/if}}" data-category="{{this}}">
          {{this}}
        </option>
      {{/each}}
    </select>
  </span>
</template>

<template name="all_stories">
  {{#unless loggingIn}}
    {{#unless currentUser}}
      {{#unless boxDismissed}}

      <div class="what-is-fold-box" style="background-image: url({{c.url 'static/homepage_hero_image'}})">
        <div class="overlay"></div>
        <div class="text">
          <div class="tagline">Create. Remix. Discover.</div>
          <div class="description">FOLD is an open publishing platform that makes it easy to explain and explore new ideas.</div>
          <div class="description-link"><a href="/read/FOLD/what-is-fold-TiyWEK6C">Learn more about us.</a></div>
        </div>
        <button class="dismiss-box">✕</button>

      </div>
      {{/unless}}
    {{/unless}}
  {{/unless}}

  {{#each stories}}
    {{> story_preview story=this }}
  {{else}}
    {{#unless storiesLoading}}
      Oops, no stories found
    {{/unless}}
  {{/each}}
  <div class="home-loading-footer">
    {{#if storiesLoading}}
      {{> loading_icon}}
    {{else}}
      {{#if moreToShow}}
        <button class="show-more">Show more</button>
      {{/if}}
    {{/if}}
  </div>

</template>

<template name="story_preview">
  {{#with story}}
    <div class="story" data-story-id="{{_id}}">
      {{> _story_preview_content}}
      {{> edit_or_read_bar}}
    </div>
  {{/with}}
</template>

<template name="_story_preview_content">
  {{#with story}}
    <div class="context-count">
      {{#if contextCountOfType 'video'}}
        <div class="context-count-icon">
          {{> video_icon }}
          <div class="context-count-text">
            {{contextCountOfType 'video'}}
          </div>
        </div>
      {{/if}}
      {{#if contextCountOfType 'image'}}
        <div class="context-count-icon">
          {{> image_icon }}
          <div class="context-count-text">
            {{contextCountOfType 'image'}}
          </div>
        </div>
      {{/if}}
      {{#if contextCountOfType 'gif'}}
        <div class="context-count-icon">
          {{> gif_icon }}
          <div class="context-count-text">
            {{contextCountOfType 'gif'}}
          </div>
        </div>
      {{/if}}
      {{#if contextCountOfType 'map'}}
        <div class="context-count-icon">
          {{> map_icon }}
          <div class="context-count-text">
            {{contextCountOfType 'map'}}
          </div>
        </div>
      {{/if}}
      {{#if contextCountOfType 'twitter'}}
        <div class="context-count-icon">
          {{> twitter_icon }}
          <div class="context-count-text">
            {{contextCountOfType 'twitter'}}
          </div>
        </div>
      {{/if}}
      {{#if contextCountOfType 'audio'}}
        <div class="context-count-icon">
          {{> audio_icon }}
          <div class="context-count-text">
            {{contextCountOfType 'audio'}}
          </div>
        </div>
      {{/if}}
      {{#if contextCountOfType 'text'}}
        <div class="context-count-icon">
          {{> text_icon }}
          <div class="context-count-text">
            {{contextCountOfType 'text'}}
          </div>
        </div>
      {{/if}}
      {{#if contextCountOfType 'link'}}
        <div class="context-count-icon">
          {{> link_icon }}
          <div class="context-count-text">
            {{contextCountOfType 'link'}}
          </div>
        </div>
      {{/if}}
      <!--TODO - add remix check-->
    </div>

    {{#linkTo route=linkRoute data=this}}
      <div class="overlay-image">
        {{#with headerImageVideoObject 'small'}}
          {{> looping_video}}
        {{else}}
          <img src="{{headerImageUrl 'small'}}" />
        {{/with}}
      </div>
    {{/linkTo}}

    {{#linkTo route=linkRoute data=this}}
      <div class="story-card">
      </div>
    {{/linkTo}}

    {{#linkTo route=linkRoute data=this}}
      <div class="headline">
        {{title}}
      </div>
    {{/linkTo}}

    <div class="byline">
      <a class="author-profile-link" href="{{profileUrl}}">
        <div class="pull-left">
          <div class="author-image">
           <img class="profile-picture" src="{{profileImage author}}"/>
          </div>

          <div class="author-name-date">
            <div class="author-name">By <span>{{authorName}}</span></div>
            <div class="publish-date">{{lastPublishDate}}</div>
          </div>
        </div>
      </a>

      <div class="pull-right">
        {{> favorite_button }}
        {{#if adminMode}}
          {{> editors_pick_button }}
        {{/if}}
      </div>
    </div>
  {{/with}}

</template>

<template name="edit_or_read_bar">
  <div class="edit-or-read">

  </div>
</template>

{'fraction_non_alphanumeric': 0.20947805904895558, 'fraction_numerical': 0.00032385167593242293, 'mean_word_length': 2.2155501561957656, 'pattern_counts': {'":': 0, '<': 441, '<?xml version=': 0, '>': 493, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3899046', 'n_tokens_mistral': 6100, 'n_tokens_neox': 5973, 'n_words': 1118}