<commit_before>{include file='header.tpl'}
{include file='navbar.tpl'}

{if isset($HOME_SESSION_FLASH)}
  <div class="ui success icon message">
    <i class="check icon"></i>
    <div class="content">
      <div class="header">{$SUCCESS_TITLE}</div>
      {$HOME_SESSION_FLASH}
    </div>
  </div>
{/if}

{if isset($HOME_SESSION_ERROR_FLASH)}
  <div class="ui error icon message">
    <i class="x icon"></i>
    <div class="content">
      <div class="header">{$ERROR_TITLE}</div>
      {$HOME_SESSION_ERROR_FLASH}
    </div>
  </div>
{/if}

<div class="ui stackable grid">
  <div class="ui centered row">
    {if count($WIDGETS_LEFT)}
        <div class="ui six wide tablet four wide computer column">
            {foreach from=$WIDGETS_LEFT item=widget}
                {$widget}
            {/foreach}
        </div>
    {/if}
    {if count($NEWS)}
      <div class="ui {if count($WIDGETS_LEFT) && count($WIDGETS_RIGHT) }four wide tablet eight wide computer{elseif count($WIDGETS_LEFT) || count($WIDGETS_RIGHT)}ten wide tablet twelve wide computer{else}sixteen wide{/if} column">
        {foreach from=$NEWS item=item}
          <div class="ui fluid card" id="news-post">
            <div class="content">
              <div class="header">
                {if isset($item.label)}{$item.label}{/if}
                <a href="{$item.url}" data-toggle="popup">{$item.title}</a>
                <div class="ui popup wide transition hidden">
                  <h4 class="ui header">{$item.title}</h4>
                  {$BY|capitalize} <a style="{$item.author_style}" href="{$item.author_url}">{$item.author_name}</a> | {$item.date}
                </div>
              </div>
              <div class="meta" data-toggle="tooltip" data-content="{$item.date}">
                {$item.time_ago}
              </div>
              <div class="description forum_post">
                {$item.content}
              </div>
            </div>
            <div class="extra content">
              <div class="right floated author">
                <img class="ui avatar image" src="{$item.author_avatar}" alt="{$item.author_name}"> <a style="{$item.author_style}" href="{$item.author_url}" data-poload="{$USER_INFO_URL}{$item.author_id}">{$item.author_name}</a>
              </div>
              <a class="ui mini primary button" href="{$item.url}">
                {$READ_FULL_POST}
              </a>
            </div>
          </div>
        {/foreach}
      </div>
    {/if}
    {if count($WIDGETS_RIGHT)}
      <div class="ui six wide tablet four wide computer column">
        {foreach from=$WIDGETS_RIGHT item=widget}
          {$widget}
        {/foreach}
      </div>
    {/if}
  </div>
</div>

{include file='footer.tpl'}<commit_msg>maintain center space when no news posts are there<commit_after>{include file='header.tpl'}
{include file='navbar.tpl'}

{if isset($HOME_SESSION_FLASH)}
  <div class="ui success icon message">
    <i class="check icon"></i>
    <div class="content">
      <div class="header">{$SUCCESS_TITLE}</div>
      {$HOME_SESSION_FLASH}
    </div>
  </div>
{/if}

{if isset($HOME_SESSION_ERROR_FLASH)}
  <div class="ui error icon message">
    <i class="x icon"></i>
    <div class="content">
      <div class="header">{$ERROR_TITLE}</div>
      {$HOME_SESSION_ERROR_FLASH}
    </div>
  </div>
{/if}

<div class="ui stackable grid">
  <div class="ui centered row">
    {if count($WIDGETS_LEFT)}
        <div class="ui six wide tablet four wide computer column">
            {foreach from=$WIDGETS_LEFT item=widget}
                {$widget}
            {/foreach}
        </div>
    {/if}
    <div class="ui {if count($WIDGETS_LEFT) && count($WIDGETS_RIGHT) }four wide tablet eight wide computer{elseif count($WIDGETS_LEFT) || count($WIDGETS_RIGHT)}ten wide tablet twelve wide computer{else}sixteen wide{/if} column">
        {if count($NEWS)}
            {foreach from=$NEWS item=item}
            <div class="ui fluid card" id="news-post">
                <div class="content">
                <div class="header">
                    {if isset($item.label)}{$item.label}{/if}
                    <a href="{$item.url}" data-toggle="popup">{$item.title}</a>
                    <div class="ui popup wide transition hidden">
                    <h4 class="ui header">{$item.title}</h4>
                    {$BY|capitalize} <a style="{$item.author_style}" href="{$item.author_url}">{$item.author_name}</a> | {$item.date}
                    </div>
                </div>
                <div class="meta" data-toggle="tooltip" data-content="{$item.date}">
                    {$item.time_ago}
                </div>
                <div class="description forum_post">
                    {$item.content}
                </div>
                </div>
                <div class="extra content">
                <div class="right floated author">
                    <img class="ui avatar image" src="{$item.author_avatar}" alt="{$item.author_name}"> <a style="{$item.author_style}" href="{$item.author_url}" data-poload="{$USER_INFO_URL}{$item.author_id}">{$item.author_name}</a>
                </div>
                <a class="ui mini primary button" href="{$item.url}">
                    {$READ_FULL_POST}
                </a>
                </div>
            </div>
            {/foreach}
        {/if}
    </div>
    {if count($WIDGETS_RIGHT)}
      <div class="ui six wide tablet four wide computer column">
        {foreach from=$WIDGETS_RIGHT item=widget}
          {$widget}
        {/foreach}
      </div>
    {/if}
  </div>
</div>

{include file='footer.tpl'}
{'fraction_non_alphanumeric': 0.16711301553294056, 'fraction_numerical': 0.0007141581860382074, 'mean_word_length': 2.177538287010777, 'pattern_counts': {'":': 0, '<': 109, '<?xml version=': 0, '>': 109, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '2875901', 'n_tokens_mistral': 1745, 'n_tokens_neox': 1723, 'n_words': 379}