mirror of https://github.com/lxndrblz/anatole.git

alexanderdavide
11.26.2022 e75111904bbabe4d2b1eb0d4a2c657eed61c5ff6
refactor: post-footer
4 files modified
111 ■■■■ changed files
assets/scss/partials/components/_post.scss 63 ●●●●● patch | view | raw | blame | history
layouts/_default/single.html 14 ●●●●● patch | view | raw | blame | history
layouts/index.html 32 ●●●●● patch | view | raw | blame | history
layouts/partials/taxonomy/template.html 2 ●●● patch | view | raw | blame | history
assets/scss/partials/components/_post.scss
@@ -96,65 +96,14 @@
    }
  }
  .post-footer {
    padding: 0 0 10px 0;
  &-footer {
    border-bottom: $border;
    .meta {
      max-width: 100%;
      display: flex;
      color: #bbbbbb;
      .info {
        float: left;
        font-size: 1.2rem;
        margin-bottom: 1em;
        color: $primary;
        .date {
          margin-right: 10px;
          margin-left: 5px;
        }
      }
      a {
        text-decoration: none;
        color: $primary;
        &:hover {
          color: #2660ab;
        }
      }
      i {
        margin-right: 6px;
      }
    }
    .info {
      .separator a {
        margin-right: 0.2em;
      }
    }
    .tags {
      padding-bottom: 15px;
      font-size: 1.3rem;
    font-size: 1.2rem;
    padding: 12px 0;
      ul {
        list-style-type: none;
        display: inline;
        margin: 0;
        padding: 0;
      }
      ul li {
        list-style-type: none;
        margin: 0;
        padding-right: 5px;
        display: inline;
      }
      a {
        text-decoration: none;
        color: $primary;
        font-weight: 400;
        &:hover {
          text-decoration: none;
        }
      }
    &__date {
      margin-right: 10px;
      margin-left: 5px;
    }
  }
}
layouts/_default/single.html
@@ -61,19 +61,17 @@
        {{- end -}}
      </div>
      <div class="post-footer">
        <div class="info">
          {{ with .Page.Params.Categories }}
            {{ partial "taxonomy/categories.html" . }}
        {{ with .Page.Params.Categories }}
          {{ partial "taxonomy/categories.html" . }}
          {{ end }}
        {{ end }}
          {{ with .Page.Params.Tags }}
            {{ partial "taxonomy/tags.html" . }}
        {{ with .Page.Params.Tags }}
          {{ partial "taxonomy/tags.html" . }}
          {{ end }}
        </div>
        {{ end }}
      </div>
      {{ if and (or (eq .Type "post") (eq .Type .Site.Params.postSectionName)) (ne .Page.Params.disableComments true) }}
layouts/index.html
@@ -85,33 +85,29 @@
        <!--  -->
        <div class="post-footer">
          <div class="meta">
            <div class="info">
              <em class="fas fa-calendar-day"></em>
              <span class="date"
                >{{ if isset .Site.Params "indexdateformat" }}
                  {{ .Date.Format .Site.Params.indexDateFormat }}
          <em class="fas fa-calendar-day"></em>
          <span class="post-footer__date"
            >{{ if isset .Site.Params "indexdateformat" }}
              {{ .Date.Format .Site.Params.indexDateFormat }}
                {{ else }}
                  {{ .Date.Format "Mon, Jan 2, 2006" }}
            {{ else }}
              {{ .Date.Format "Mon, Jan 2, 2006" }}
                {{ end }}</span
              >
              {{ with .Page.Params.Categories }}
                {{ partial "taxonomy/categories.html" . }}
            {{ end }}</span
          >
          {{ with .Page.Params.Categories }}
            {{ partial "taxonomy/categories.html" . }}
              {{ end }}
          {{ end }}
              {{ with .Page.Params.Tags }}
                {{ partial "taxonomy/tags.html" . }}
          {{ with .Page.Params.Tags }}
            {{ partial "taxonomy/tags.html" . }}
              {{ end }}
            </div>
          </div>
          {{ end }}
        </div>
      </div>
layouts/partials/taxonomy/template.html
@@ -2,7 +2,7 @@
{{- $linkBase := .linkBase -}}
<span class="separator">
<span>
  {{- range $index, $el := .items -}}
    <!-- Replace certain special characters with their URL encoded counterparts -->
    {{- $item := replace . "#" "%23" -}}