hummingbird-me/hummingbird

View on GitHub
frontend/app/templates/dashboard.hbs

Summary

Maintainability
Test Coverage
{{quick-update}}

<div class="user-dashboard">
  <div class="feed-head-advert">
    {{ad-unit adId="1293413" adClass="257f81e798bd68dd81e60f42838f361f"}}
    <div class="ad-background">
      {{#link-to 'pro'}}<img src="../assets/pro-banner.jpg">{{/link-to}}
    </div>
  </div>
  <a id="left-column" class="mobile-tab btn btn-default" href="#left-column"> Show Sidebar</a>
  <a id="right-column" class="mobile-tab btn btn-default" href="#right-column"> Show Activity Feed</a>

  <div class="row">
    <div class="secondary-info">
      {{!
      <div class="community-widget-panel">
        <div class="panel-heading">
          <h3 class="panel-title">Trending Anime</h3>
        </div>

        <div class="panel-body">
          <ul class="latest-post-list">

              <li class="latest-post">
                <span class="trend-rank">1</span>
                <div class="trend-poster">
                  <img class="responsive-image" src="http://static.hummingbird.me/anime/poster_images/000/000/181/large/x_ee93c42c.jpg?1398474350">
                </div>
                <div class="trend-info">
                  <h4>Samurai Champloo</h4>
                  <!-- Only show 3 genres -->
                  <div class="trend-categories">
                    <span class="badge">
                      <a>action</a>
                    </span>
                    <span class="badge">
                      <a>comedy</a>
                    </span>
                    <span class="badge">
                      <a>fantasy</a>
                    </span>
                  </div>
                </div>
              </li>


              <li class="latest-post">
                <span class="trend-rank">2</span>
                <div class="trend-poster">
                  <img class="responsive-image" src="http://static.hummingbird.me/anime/poster_images/000/000/181/large/x_ee93c42c.jpg?1398474350">
                </div>
                <div class="trend-info">
                  <h4>Samurai Champloo</h4>
                  <!-- Only show 3 genres -->
                  <div class="trend-categories">
                    <span class="badge">
                      <a>action</a>
                    </span>
                    <span class="badge">
                      <a>comedy</a>
                    </span>
                    <span class="badge">
                      <a>fantasy</a>
                    </span>
                  </div>
                </div>
              </li>


              <li class="latest-post">
                <span class="trend-rank">3</span>
                <div class="trend-poster">
                  <img class="responsive-image" src="http://static.hummingbird.me/anime/poster_images/000/000/181/large/x_ee93c42c.jpg?1398474350">
                </div>
                <div class="trend-info">
                  <h4>Samurai Champloo</h4>

                  <!-- Only show 3 genres -->
                  <div class="trend-categories">
                    <span class="badge">
                      <a>action</a>
                    </span>
                    <span class="badge">
                      <a>comedy</a>
                    </span>
                    <span class="badge">
                      <a>fantasy</a>
                    </span>
                  </div>
                </div>
              </li>
          </ul>
        </div>
      </div>
      }}

      <div class="community-widget-panel trending-group-panel">
        <div class="panel-heading">
          <h3 class="panel-title">Trending groups</h3>
        </div>
        <div class="panel-body">
          <ul class="latest-post-list">
            {{#each trendingGroups as |group|}}
              <li class="clearfix">
                {{group-box group=group}}
              </li>
            {{/each}}
            <li class="latest-post-more">
              {{#link-to 'groups'}}Show all{{/link-to}}
            </li>
          </ul>
        </div>
      </div>

      {{community-widget title="Industry news" showMoreURL="https://forums.hummingbird.me/c/industry-news" apiCall="https://forums.hummingbird.me/c/industry-news.json"}}
      <div class="feed-sm-sidebar-advert">
        {{ad-unit adId="1298407" adClass="257f81e798bd68dd81e60f42838f361f"}}
      </div>
      {{community-widget title="Community discussions" showMoreURL="https://forums.hummingbird.me/" apiCall="https://forums.hummingbird.me/latest.json?exclude_category=industry%20news"}}
      <div class="feed-sidebar-advert">
        {{ad-unit adId="1298406" adClass="257f81e798bd68dd81e60f42838f361f"}}
      </div>

      <div class="feed-sidebar-footer">
        {{#if showBreakCounter}}
          We've gone <strong>{{breakCounter}}</strong> since
          the last significant site feature broke.<br /><br />
        {{/if}}
        {{!--
          {{#link-to 'about'}}About{{/link-to}} &bull;
          {{#link-to 'terms'}}Terms{{/link-to}} &bull;
        --}}
        {{#link-to 'privacy'}}Privacy{{/link-to}} &middot;
        {{#link-to 'apps'}}Apps{{/link-to}} &middot;
        <a href="mailto:josh@hummingbird.me">Contact</a> &middot;
        <a href="https://github.com/hummingbird-me/hummingbird">GitHub</a>

        {{!--
          <br /><br />
          Except where otherwise noted, content on this site is licensed under
          <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>.
        --}}
      </div>
    </div>

    <div class="user-feed">
      {{post-comment action="postComment" currentUser=currentUser}}

      {{#if newStories}}
        <div class="alert alert-info" style="cursor: pointer; text-align: center" {{action "showNewStories"}}>
          {{pluralize newStories.length "new story" "new stories"}}.
        </div>
      {{/if}}

      <div class="user-feed-filter">
        <span {{bind-attr class=":user-feed-tab highlightDasboard:active-tab" }}>
          <a {{action 'setCurrentTab' 'dashboard'}}>Timeline</a>
        </span>
        <span {{bind-attr class=":user-feed-tab highlightPosts:active-tab" }}>
          <a {{action 'setCurrentTab' 'posts'}}>User Activity</a>
        </span>
        <span {{bind-attr class=":user-feed-tab highlightGroups:active-tab"}}>
          <a {{action 'setCurrentTab' 'groups'}}>Group Activity</a>
        </span>
        <span {{bind-attr class=":user-feed-tab highlightMedia:active-tab" }}>
          <a {{action 'setCurrentTab' 'media'}}>Library Updates</a>
        </span>
      </div>

      {{#each arrangedContent itemController="story" as |story|}}
        {{#with story as |story|}}
          {{view "story" content=story}}
        {{/with}}
      {{/each}}

      {{#if canLoadMore}}
        {{load-more classNames="light" action="loadNextPage"}}
      {{/if}}
    </div>
  </div>
</div>