Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add icons and possibility for multiple links to portfolio #386

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 5 additions & 16 deletions assets/scss/partials/components/_portfolio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@

&__button {
font-weight: 400;
display: inline-block;
display: flex;
align-items: center;
gap: 10px;
position: relative;
outline: 0;
background: transparent;
Expand All @@ -157,28 +159,15 @@
font-style: normal;
border-radius: 999em;
padding: 10px;
margin-right: 10px;

@include themed() {
border: 1px solid t('primary-light');
color: t('info');
}

&:hover {
display: inline-block;
position: relative;
outline: 0px;
background: transparent;

text-align: center;
text-decoration: none;
cursor: pointer;
white-space: nowrap;
font-weight: 400;
font-style: normal;
border-radius: 999em;
}

&-wrapper {
display: flex;
padding-bottom: 1em;
}
}
Expand Down
16 changes: 12 additions & 4 deletions exampleSite/data/portfolio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,20 @@ portfolioitems:
- alexanderdavide
- name: Project 2
image: '/images/portfolio/code.jpg'
link: https://gohugo.io/
links:
- url: https://github.com/
icon: 'fab fa-github'
text: 'Github repo'
- url: https://gohugo.io/
text: 'Project site'
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.'
status: 'On Hold'
tags:
- Tag 1
- Tag 2
- name: Project 3
link: https://gohugo.io/
links:
- url: https://gohugo.io/
status: 'Finished'
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.'
tags:
Expand All @@ -42,14 +48,16 @@ portfolioitems:
- Tag 2
- name: Project 2
image: '/images/portfolio/code.jpg'
link: https://gohugo.io/
links:
- url: https://gohugo.io/
description: 'You can click on [**this link**](#codingprojects) to scroll to my Coding Projects portfolio'
tags:
- Tag 1
- Tag 2
- name: Project 3
image: '/images/portfolio/code.jpg'
link: https://gohugo.io/
links:
- url: https://gohugo.io/
description: 'A description'
tags:
- Tag 1
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"Target":"scss/main.rtl.min.e137f9eb3f0f908b136886b05cefbccc97dd271959ef5d6748a7511abc3d8111.css","MediaType":"text/css","Data":{"Integrity":"sha256-4Tf56z8PkIsTaIawXO+8zJfdJxlZ711nSKdRGrw9gRE="}}
{"Target":"scss/main.rtl.min.6745d4377bf73ed1fe9224f1bbbbcce7eb114c145f631308da91afa93212a11c.css","MediaType":"text/css","Data":{"Integrity":"sha256-Z0XUN3v3PtH+kiTxu7vM5+sRTBRfYxMI2pGvqTISoRw="}}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"Target":"scss/main.min.b2e0cb07595e3519ab1193bb421914e06c0e26b0cc561fef23b3c6131d4d2ffa.css","MediaType":"text/css","Data":{"Integrity":"sha256-suDLB1leNRmrEZO7QhkU4GwOJrDMVh/vI7PGEx1NL/o="}}
{"Target":"scss/main.min.e8d63df64954ab7c15da8e57f36a0e3cfec915f82a8a36af4fde7288fe8e3354.css","MediaType":"text/css","Data":{"Integrity":"sha256-6NY99klUq3wV2o5X82oOPP7JFfgqijavT95yiP6OM1Q="}}
21 changes: 14 additions & 7 deletions layouts/portfolio/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,25 @@ <h2>{{ .name | markdownify }}</h2>
{{ end }}
</ul>
<p>{{ .description | markdownify }}</p>
{{ if .link }}
{{ if or .links .link }}
{{ $links := .links }}
{{ if .link }}
{{ $links = $links | append (dict "url" .link "text" .linktext) }}
{{ end }}
<div class="portfolio__button-wrapper">
<a class="portfolio__button" href="{{ .link | safeURL }}" target="_blank" rel="noopener">
{{- if .linktext -}}
{{ .linktext | markdownify }}


{{- else -}}
{{ range $link := $links}}
<a class="portfolio__button" href="{{ .url | safeURL }}" target="_blank" rel="noopener">
{{- if .icon -}}
<i class="{{ .icon }} fa-2x" aria-hidden="true"></i>
{{- end -}}
{{- if .text -}}
{{ .text | markdownify }}
{{- else -}}
Visit Site

{{- end -}}
</a>
{{ end}}
</div>

{{ end }}
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"Target":"scss/main.min.b2e0cb07595e3519ab1193bb421914e06c0e26b0cc561fef23b3c6131d4d2ffa.css","MediaType":"text/css","Data":{"Integrity":"sha256-suDLB1leNRmrEZO7QhkU4GwOJrDMVh/vI7PGEx1NL/o="}}
{"Target":"scss/main.min.e8d63df64954ab7c15da8e57f36a0e3cfec915f82a8a36af4fde7288fe8e3354.css","MediaType":"text/css","Data":{"Integrity":"sha256-6NY99klUq3wV2o5X82oOPP7JFfgqijavT95yiP6OM1Q="}}