Skip to content
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.

Commit

Permalink
- Adding the limit of interest as a config
Browse files Browse the repository at this point in the history
  • Loading branch information
Boussaid, Ouadie committed Mar 8, 2019
1 parent b609e9b commit d95c9d9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ Your website comes pre-configured with three topics (e.g. "Web design" and "Sass

- `web_url`: The web address you'd like to your topic to link to (e.g. `https://github.com/topics/sass`).
- `image_url`: The web address of an (ideally square) image that you'd like to appear with your topic.
- `limit`: The maximum number of topics that will be displayed in the "My Interests." section. Out of the box, this number is set to `6`.

#### Social media

Expand Down
22 changes: 12 additions & 10 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ social_media:
# twitter: your_username
# youtube: your_username

topics:
- name: CSS
web_url: https://github.com/topics/css
image_url: https://raw.githubusercontent.com/github/explore/6c6508f34230f0ac0d49e847a326429eefbfc030/topics/css/css.png

- name: Web design

- name: Sass
web_url: https://github.com/topics/sass
image_url: https://raw.githubusercontent.com/github/explore/6c6508f34230f0ac0d49e847a326429eefbfc030/topics/sass/sass.png
interest:
limit: 6
topics:
- name: CSS
web_url: https://github.com/topics/css
image_url: https://raw.githubusercontent.com/github/explore/6c6508f34230f0ac0d49e847a326429eefbfc030/topics/css/css.png

- name: Web design

- name: Sass
web_url: https://github.com/topics/sass
image_url: https://raw.githubusercontent.com/github/explore/6c6508f34230f0ac0d49e847a326429eefbfc030/topics/sass/sass.png
2 changes: 1 addition & 1 deletion _includes/interests.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h2 {% if site.style == 'dark' %}class="text-white"{% endif %}>My Interests</h2>
<p class="f4 mb-4 {% if site.style == 'dark' %}text-white{% else %}text-gray{% endif %}">Topics that I want to learn more about.</p>
<div class="d-flex flex-wrap gutter-condensed mb-4">
{% for topic in site.topics limit: 4 %}
{% for topic in site.interest.topics limit: site.interest.limit %}
<div class="col-6 col-md-12 col-lg-6 col-xl-4 mb-3">
{% include topic-card.html %}
</div>
Expand Down
4 changes: 2 additions & 2 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{% include projects.html %}
</div>

{% if site.topics %}
{% if site.interest.topics %}
<div class="my-6">
{% include interests.html %}
</div>
Expand Down Expand Up @@ -40,7 +40,7 @@

{% include projects.html %}

{% if site.topics %}
{% if site.interest.topics %}
{% include interests.html %}
{% endif %}

Expand Down

0 comments on commit d95c9d9

Please sign in to comment.