Skip to content

Commit

Permalink
Use regular parameters instead of object for skill macro
Browse files Browse the repository at this point in the history
  • Loading branch information
helenclx committed Aug 12, 2024
1 parent c1e5d37 commit 4a2684c
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/_includes/main/skills.njk
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{%- macro skill(params) -%}
{%- macro skill(name, file) -%}
<li class="skills__item">
<div class="skills__logo"><img src="/assets/icons/skills/{{ params.file }}" alt="{{ params.name }} logo"></div>
<p class="skills__title">{{ params.name }}</p>
<div class="skills__logo"><img src="/assets/icons/skills/{{ file }}" alt="{{ name }} logo"></div>
<p class="skills__title">{{ name }}</p>
</li>
{%- endmacro -%}

<section class="section--home">
<h2 class="heading--home">My Skills</h2>
<ul class="skills__list">
{{ skill({ name: 'HTML', file: 'html.svg' }) }}
{{ skill({ name: 'CSS', file: 'css.svg' }) }}
{{ skill({ name: 'JavaScript', file: 'javascript.svg' }) }}
{{ skill({ name: 'Eleventy', file: 'eleventy.svg' }) }}
{{ skill({ name: 'React.js', file: 'react.svg' }) }}
{{ skill({ name: 'Git', file: 'git.svg' }) }}
{{ skill({ name: 'Python', file: 'python.svg' }) }}
{{ skill({ name: 'PHP', file: 'php.svg' }) }}
{{ skill({ name: 'Wordpress', file: 'wordpress.svg' }) }}
{{ skill({ name: 'Adobe Photoshop', file: 'adobe-photoshop.svg' }) }}
{{ skill({ name: 'Adobe Illustrator', file: 'adobe-illustrator.svg' }) }}
{{ skill({ name: 'Figma', file: 'figma.svg' }) }}
{{ skill('HTML', 'html.svg') }}
{{ skill('CSS', 'css.svg') }}
{{ skill('JavaScript', 'javascript.svg') }}
{{ skill('Eleventy', 'eleventy.svg') }}
{{ skill('React.js', 'react.svg') }}
{{ skill('Git', 'git.svg') }}
{{ skill('Python', 'python.svg') }}
{{ skill('PHP', 'php.svg') }}
{{ skill('Wordpress', 'wordpress.svg') }}
{{ skill('Adobe Photoshop', 'adobe-photoshop.svg') }}
{{ skill('Adobe Illustrator', 'adobe-illustrator.svg') }}
{{ skill('Figma', 'figma.svg') }}
</ul>
</section>

0 comments on commit 4a2684c

Please sign in to comment.