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

Alexander Bilz
25.55.2021 3b2410c327bf561e3f5174968483ccd9dc6730f2
feat: portfolio site

4 files added
2 files modified
100 ■■■■■ changed files
assets/css/style.css 7 ●●●● patch | view | raw | blame | history
exampleSite/config/_default/menus.en.toml 10 ●●●● patch | view | raw | blame | history
exampleSite/content/english/portfolio/_index.md 5 ●●●●● patch | view | raw | blame | history
exampleSite/data/portfolio.yml 25 ●●●●● patch | view | raw | blame | history
exampleSite/static/images/portfolio/code.jpg patch | view | raw | blame | history
layouts/portfolio/list.html 53 ●●●●● patch | view | raw | blame | history
assets/css/style.css
@@ -348,7 +348,7 @@
.post .post-title h1 {
  text-transform: uppercase;
  font-size: 3.0em;
  font-size: 3em;
  letter-spacing: 1px;
  line-height: 1;
}
@@ -806,6 +806,7 @@
  font-weight: 400;
  font-style: normal;
  border-radius: 999em;
  padding: 5px;
}
.btn:hover {
@@ -844,6 +845,10 @@
  padding: 6px 12px;
}
.cta {
  padding-bottom: 1em;
}
/* Menu */
.menu {
  float: right;
exampleSite/config/_default/menus.en.toml
@@ -11,14 +11,20 @@
  url = "/post/"
  [[main]]
  name = "About"
  name = "Portfolio"
  weight = 300
  identifier = "portfolio"
  url = "/portfolio/"
  [[main]]
  name = "About"
  weight = 400
  identifier = "about"
  url = "/about/"
  [[main]]
  name = "Contact"
  weight = 400
  weight = 500
  identifier = "contact"
  url = "/contact/"
exampleSite/content/english/portfolio/_index.md
New file
@@ -0,0 +1,5 @@
---
title: 'Portfolio'
draft: false
description: 'Welcome to my Portfolio!'
---
exampleSite/data/portfolio.yml
New file
@@ -0,0 +1,25 @@
portfolioitems:
  # portfolio category
  - title: Coding Projects
    portfolioitem:
      - name: Project 1
        image: '/images/portfolio/code.jpg'
        link: https://gohugo.io/
        description: 'A description'
        tags:
          - Tag 1
          - Tag 2
      - name: Project 2
        image: '/images/portfolio/code.jpg'
        link: https://gohugo.io/
        description: 'A description'
        tags:
          - Tag 1
          - Tag 2
      - name: Project 3
        image: '/images/portfolio/code.jpg'
        link: https://gohugo.io/
        description: 'A description'
        tags:
          - Tag 1
          - Tag 2
exampleSite/static/images/portfolio/code.jpg
layouts/portfolio/list.html
New file
@@ -0,0 +1,53 @@
{{ define "main" }}
  {{ range $index, $elemen:= .Site.Data.portfolio.portfolioitems }}
    <div
      class="post {{ with .Site.Params.doNotLoadAnimations }}
        .
      {{ else }}
        animated fadeInDown
      {{ end }}"
    >
      <div class="post-title post-content">
        <h2>{{ .title }}</h2>
      </div>
    </div>
    {{ range .portfolioitem }}
      <div
        class="post {{ with .Site.Params.doNotLoadAnimations }}
          .
        {{ else }}
          animated fadeInDown
        {{ end }}"
      >
        <div class="post-title">
          <h3><a href="{{ .link | safeURL }}">{{ .name | markdownify }}</a></h3>
        </div>
        <div class="post-thumbnail">
          <img src="{{ .image | relURL }}" alt="{{ .name | markdownify }}" />
        </div>
        <div class="post-content">
          <div class="p_part">
            <p>{{ .description | markdownify }}</p>
          </div>
        </div>
        <div class="cta">
          <a class="btn" href="{{ .link | safeURL }}" target="_blank">Visit Site</a>
        </div>
        <div class="post-footer">
          <div class="meta">
            {{ partial "taxonomy/template.html" (dict "items" .tags "linkClass" "tag" "linkBase" "tags") }}
          </div>
        </div>
      </div>
    {{ end }}
  {{ end }}
{{ end }}