<div id="sidebar-wrapper-left" class="sidebar-wrapper sidebar-wrapper-left">
  <div class="sidebar-bg" id="sidebar-bg-left"></div>
  <div class="side-bar">
    <% cache("main-sidebar-nav--#{user_signed_in?}-#{ApplicationConfig['DEPLOYMENT_SIGNATURE']}", expires_in: 5.days) do %>
      <%= render "articles/sidebar_nav" %>
      <div class="widget sponsorship-widget <%= "showing" unless user_signed_in? %>" id="sponsorship-widget">
        <header>
          <a href="/sponsors"><h4>community sponsors</h4></a>
          <span class="emoji">
            <img src="<%= asset_path "emoji/emoji-one-heart.png" %>" alt="emoji heart" />
          </span>
        </header>
        <% @sponsorships = Sponsorship.gold.live.includes(:organization).order(featured_number: :asc) %>
        <% if @sponsorships.any? %>
          <div class="widget-body">
            <% @sponsorships.each do |sponsorship| %>
              <%= render "articles/single_sponsor", sponsorship: sponsorship %>
            <% end %>
            <div class="sponsors-love-message">
              We are grateful for wonderful sponsors who help sustain the <%= ApplicationConfig["COMMUNITY_NAME"] %> community.
            </div>
            <div class="sponsor-footer">
              <p>
                <a href="/sponsorship-info">Sponsorship Info/Policy</a>
              </p>
            </div>
          </div>
        <% end %>
      </div>
      <div class="widget">
        <header>
          <h4>key links</h4>
        </header>
        <div class="widget-body">
          <a href="https://twitter.com/<%= ApplicationConfig["SITE_TWITTER_HANDLE"] %>" target="_blank" rel="noopener"><img src="<%= asset_path("twitter-logo.svg") %>" alt="Twitter logo" class="social-icon" /></a>
          <a href="https://github.com/<%= ApplicationConfig["SITE_TWITTER_HANDLE"] %>" target="_blank" rel="noopener"><img src="<%= asset_path("github-logo.svg") %>" alt="GitHub logo" class="social-icon" /></a>
          <a href="https://instagram.com/<%= ApplicationConfig["SITE_TWITTER_HANDLE"] %>" target="_blank" rel="noopener"><img src="<%= asset_path("instagram-logo.svg") %>" alt="Instagram logo" class="social-icon" /></a>
          <a href="https://facebook.com/<%= ApplicationConfig["SITE_TWITTER_HANDLE"] %>" target="_blank" rel="noopener"><img src="<%= asset_path("facebook-logo.svg") %>" alt="Facebook logo" class="social-icon" /></a>
          <a href="https://twitch.tv/<%= ApplicationConfig["SITE_TWITTER_HANDLE"] %>" target="_blank" rel="noopener"><img src="<%= asset_path("twitch-logo.svg") %>" alt="Twitch logo" class="social-icon" /></a>
        </div>
        <div class="side-footer">
          <a href="/about">About</a>
          <a href="/sponsors">Sponsors</a>
          <a href="https://shop.dev.to/"><%= ApplicationConfig["COMMUNITY_NAME"] %> Shop</a>
          <a href="/privacy">Privacy Policy</a>
          <a href="/terms">Terms of Use</a>
          <a href="/contact">Contact</a>
          <a href="/faq">FAQ</a>
          <a href="/code-of-conduct">Code of Conduct</a>
        </div>
      </div>
    <% end %>
    <% cache("display-area-left-#{rand(5)}", expires_in: 5.minutes) do %>
      <% @left_sidebar_ad = DisplayAd.where(approved: true, published: true, placement_area: "sidebar_left").order(Arel.sql("RANDOM()")).first %>
      <% if @left_sidebar_ad %>
        <div class="widget">
          <div class="widget-body" style="margin-top:-6px">
            <%= @left_sidebar_ad.processed_html.html_safe %>
          </div>
        </div>
      <% end %>
    <% end %>
  </div>
</div>
