<|start_filename|>layouts/_default/search.html<|end_filename|>
{{ define "main" }}
{{ if .Site.Params.enablesearch }}
<main class="container">
  <div class="row row-grid justify-content-center">
    <div class="col col-12">
      <div id="ntp-contents">
        <div id="fakebox-container">
          <div id="fakebox">
            <i class="iconfont icon-search search-icon"></i>
            <form action="{{ "search" | absURL }}">
              <input id="search-query" class="fakebox-input" autocomplete="off" tabindex="-1" aria-hidden="true" name="s" />
            </form>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col" id="search-results">
        </div>
      </div>
    </div>
  </div>
</main>

<!-- this template is sucked in by search.js and appended to the search-results div above. So editing here will adjust style -->
<script id="search-result-template" type="text/x-js-template">
  <div id="summary-${key}" class="card shadow-none">
    <div class="card-body">
        <h5 class="card-title"><a href="${link}">${title}</a></h5>
        <p>${snippet}</p>
        ${ isset tags }<p><strong>Tags</strong>: ${tags}</p>${ end }
        ${ isset categories }<p><strong>Categories</strong>: ${categories}</p>${ end }
      </div>
    </div>
  </div>
</script>
{{ end }}

{{- /* jQuery */ -}}
{{- if .Site.Params.useCDN -}}
    <script
    src="https://code.jquery.com/jquery-3.4.1.min.js"
    integrity="<KEY>
    crossorigin="anonymous"></script>
{{- else -}}
    {{- $jquery := resources.Get "js/jquery.min.js" -}}
    {{- $securejquery := slice $jquery | resources.Concat "jquery.js" | resources.Minify | resources.Fingerprint "sha512" -}}
    <script type="text/javascript" src="{{ $securejquery.RelPermalink }}" integrity="{{ $securejquery.Data.Integrity }}"></script>
{{- end -}}

{{- /* bootstrap */ -}}
{{- if .Site.Params.useCDN -}}
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="<KEY>" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="<KEY>" crossorigin="anonymous"></script>
{{- else -}}
    {{- $bootstrap := resources.Get "js/bootstrap.min.js" -}}
    {{- $securebootstrap := slice $bootstrap | resources.Concat "bootstrap.js" | resources.Minify | resources.Fingerprint "sha512" -}}
    <script type="text/javascript" src="{{ $securebootstrap.RelPermalink }}" integrity="{{ $securebootstrap.Data.Integrity }}"></script>
{{- end -}}

{{- /* Search */ -}}
{{- if .Site.Params.useCDN -}}
    <script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.0/fuse.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js"></script>
    {{- $search := resources.Get "js/search.js" -}}
    {{- $securesearch := slice $search | resources.Concat "search.js" | resources.Minify | resources.Fingerprint "sha512" -}}
    <script type="text/javascript" src="{{ $securesearch.RelPermalink }}" integrity="{{ $securesearch.Data.Integrity }}"></script>
{{- else -}}
    {{ $fuse := resources.Get "js/fuse.js" }}
    {{ $mark := resources.Get "js/mark.js" }}
    {{ $search := resources.Get "js/search.js" }}
    {{- $securesearch := slice $mark $fuse $search | resources.Concat "search.js" | resources.Minify | resources.Fingerprint "sha512" -}}
    <script type="text/javascript" src="{{ $securesearch.RelPermalink }}" integrity="{{ $securesearch.Data.Integrity }}"></script>
{{ end }}

{{ end }}

<|start_filename|>layouts/partials/head.html<|end_filename|>
{{ hugo.Generator }}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="author" content="{{ if .Params.author }}{{ .Params.author }}{{ else }}{{ range .Site.Author }}{{ . }} {{ end }}{{ end }}">
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.homeSubtitle }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
<meta name="keywords" content="{{ .Site.Params.keywords }}" />
<meta name="robots" content="noodp" />
{{ with .Site.Params.themeColor }}
<meta name="theme-color" content="{{.}}">
<meta name="msapplication-TileColor" content="{{.}}">
{{ end }}
<link rel="canonical" href="{{ .Permalink }}" />

{{ template "_internal/schema.html" . }}
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/twitter_cards.html" . }}

{{ partial "favicon.html" }}

<title>{{- .Title -}}</title>

{{ partial "stylesheets.html" . }}

<|start_filename|>layouts/_default/portal.html<|end_filename|>
{{ define "main" }}

<div id="content" class="my-3">
  <div class="card-dwg-hrefc">
    {{ range .Params.portal }}
    <div class="card-dwg-title">
      <h4>{{ .name }}</h4>
    </div>
    <div class="card-dwg-content">
      {{ range .sites }}
      <a class="card-dwg-href" href="{{ .url }}" target="_blank">
        <div class="card-dwg-href-div">
          <div
            class="card-dwg-href-img"
            style="background-image: url('{{ relURL .icon }}');"
          ></div>
          <div class="card-dwg-href-name">{{.name}}</div>
          <div class="card-dwg-href-abstract">{{.describe}}</div>
        </div>
      </a>
      {{ end }}
    </div>
    {{ end }}
  </div>
</div>

{{ end }}


<|start_filename|>layouts/partials/stylesheets.html<|end_filename|>
{{/* Iconfont */}}
<link rel="stylesheet" href="//at.alicdn.com/t/font_1559566_wk214kwa2dn.css">
{{/* KaTeX */}}
{{ if .Site.Params.useCDN }}
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="<KEY>" crossorigin="anonymous">
{{ else }}
    <link rel="stylesheet" href="/katex.css" integrity="<KEY>">
{{ end }}

{{ if .Site.Params.useCDN }}
    {{/* Normalize */}}
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.css" integrity="sha256-WAgYcAck1C1/zEl5sBl5cfyhxtLgKGdpI3oKyJffVRI=" crossorigin="anonymous" />
    {{/* Animate */}}
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.css" integrity="sha256-a2tobsqlbgLsWs7ZVUGgP5IvWZsx8bTNQpzsqCSm5mk=" crossorigin="anonymous" />
    {{/* Bootswatch */}}
   <link href="https://stackpath.bootstrapcdn.com/bootswatch/4.4.1/materia/bootstrap.min.css" rel="stylesheet" integrity="<KEY>" crossorigin="anonymous">
    {{/* Custom */}}
    {{ $style:= resources.Get "sass/main_cdn.scss" | toCSS | minify | fingerprint | resources.ToCSS | minify | fingerprint }}
    <link rel="stylesheet" href="{{ relURL $style.Permalink }}" integity="{{$style.Data.Integrity}}">
{{ else }}
    {{ $style:= resources.Get "sass/main.scss" | toCSS | minify | fingerprint | resources.ToCSS | minify | fingerprint }}
    <link rel="stylesheet" href="{{ relURL $style.Permalink }}" integity="{{$style.Data.Integrity}}">
{{ end }}