<!--This page: Side bar of container -->

<link rel="stylesheet" href="{{ .Site.BaseURL }}css/slick-theme.css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/slick.css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/sidebar.css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/split_container.css">

<script type="text/javascript">
  function link(url) {
    location.href = url;
  }
</script>

<div class="sidebar">
  
  <div class="topic_list">

  {{ range $.Site.RegularPages }}
    {{ if (.Param "mkbanner") }}
      {{ if (.Param "bannerimg") }} 
        <div class="topic" onKeyPress="return true" onClick="link('{{ .Site.BaseURL }}{{ .RelPermalink }}')">
          <img src="{{ .Site.BaseURL }}{{ .Params.bannerimg }}">
        </div>
      {{ else }}
        <div class="topic" onKeyPress="return true" onClick="link('{{ .Site.BaseURL }}{{ .RelPermalink }}')" style="background-image: url({{ .Site.BaseURL }}/img/pic1.png);" >
          <h1> {{dateFormat "2 Jan, 2006" .Params.Date }}   </h1><br>
          <h2> {{ .Title }} </h2>
        </div>
      {{ end }}
    {{ end }}
  {{ end }}

 <!-- <h3>recent topics</h3> -->
  {{ range $catkey, $catlist := $.Site.Taxonomies.categories }}
    {{ if eq $catkey "topic" }}
      {{ range .Pages.ByDate.Reverse }}
        {{ if (.Param "bannerimg") }} 
          <div class="topic" onKeyPress="return true" onClick="link('{{ .Site.BaseURL }}{{ .RelPermalink }}')">
            <img src="{{ .Site.BaseURL }}{{ .Params.bannerimg }}">
          </div>
        {{ else if (.Param "image") }} 
          <div class="topic" onKeyPress="return true" onClick="link('{{ .Site.BaseURL }}{{ .RelPermalink }}')" style="background-image: url({{ .Site.BaseURL }}{{ .Params.image }});" >
            <h1> {{dateFormat "2 Jan, 2006" .Params.Date }}   </h1><br>
            <h2> {{ .Title }} </h2>
          </div>
          
        {{ else }}
           <div class="topic" onKeyPress="return true" onClick="link('{{ .Site.BaseURL }}{{ .RelPermalink }}')" style="background-image: url({{ .Site.BaseURL }}/img/pic1.png);" >
             <h1> {{dateFormat "2 Jan, 2006" .Params.Date }}   </h1><br>
             <h2> {{ .Title }} </h2>
           </div>
        {{ end }}
      {{ end }}
    {{ end }}
  {{ end }}

  </div> <!-- topic_list -->
</div> <!-- sidebar -->


<div class="links">
  <a href="https://www.u-tokyo.ac.jp/"><img src="{{ $.Site.BaseURL }}img/utokyo.jpg" width=180px height=auto></a>
  <a href="https://www.s.u-tokyo.ac.jp/"><img src="{{ $.Site.BaseURL }}img/sos_utokyo.jpg" width=230px height=auto></a>
  <a href="{{ .Site.BaseURL }}/link"><h3>{{ .Site.Params.link }}</h3></a>

</div> <!-- links -->
<script type="text/javascript" src="{{ .Site.BaseURL }}js/slick.min.js"></script>
