Skip to content

Commit

Permalink
Merge pull request #63 from oleksis/oleksis/issue29
Browse files Browse the repository at this point in the history
Update footer, add social links layout
  • Loading branch information
kjaymiller authored Oct 14, 2023
2 parents 1ddbfa7 + 6f31e54 commit 4232170
Show file tree
Hide file tree
Showing 28 changed files with 145 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ assets/js/index.js
_layouts/default.html
_layouts/index.html
_includes/header.html
_includes/social.html
_includes/social-item.html
_includes/svg_symbol.html
26 changes: 26 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,32 @@ navigation:
url: /community/
fa: fa fa-users fa-fw

bpdevs:
# Minima date format.
# Refer to https://shopify.github.io/liquid/filters/date/ if you want to customize this.
#
# date_format: "%b %-d, %Y"

# Generate social links in footer.
#
#social_links:
# - { platform: devto, user_url: "https://dev.to/jekyll" }
# - { platform: dribbble, user_url: "https://dribbble.com/jekyll" }
# - { platform: facebook, user_url: "https://www.facebook.com/jekyll" }
# - { platform: flickr, user_url: "https://www.flickr.com/photos/jekyll" }
# - { platform: github, user_url: "https://github.com/BlackPythonDevs/blackpythondevs.github.io" }
# - { platform: google_scholar, user_url: "https://scholar.google.com/citations?user=qc6CJjYAAAAJ" }
# - { platform: instagram, user_url: "https://www.instagram.com/jekyll" }
# - { platform: keybase, user_url: "https://keybase.io/jekyll" }
# - { platform: linkedin, user_url: "https://www.linkedin.com/in/jekyll" }
# - { platform: microdotblog, user_url: "https://micro.blog/jekyll" }
# - { platform: pinterest, user_url: "https://www.pinterest.com/jekyll" }
# - { platform: stackoverflow, user_url: "https://stackoverflow.com/users/1234567/jekyll" }
# - { platform: telegram, user_url: "https://t.me/jekyll" }
# - { platform: twitter, user_url: "https://twitter.com/jekyllrb" }
# - { platform: x, user_url: "https://x.com/blackpythondevs" }
# - { platform: youtube, user_url: "https://www.youtube.com/jekyll" }

# Build settings
markdown: kramdown
highlighter: rouge
Expand Down
9 changes: 8 additions & 1 deletion _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<footer role="contentinfo">
<small>&copy; {{ 'now' | date: "%Y" }} {{ site.title }}</small>
<div class="wrapper">
<div class="footer-col-wrapper">
<div class="footer-col">
<small>&copy; {{ 'now' | date: "%Y" }} {{ site.title }}</small>
</div>
</div>
<div class="social-links">{%- include social.html -%}</div>
</div>
</footer>
1 change: 1 addition & 0 deletions _includes/social-icons/devto.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions _includes/social-icons/dribbble.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions _includes/social-icons/facebook.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions _includes/social-icons/flickr.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions _includes/social-icons/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions _includes/social-icons/gitlab.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions _includes/social-icons/google_scholar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions _includes/social-icons/instagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions _includes/social-icons/keybase.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions _includes/social-icons/linkedin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions _includes/social-icons/mastodon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions _includes/social-icons/microdotblog.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions _includes/social-icons/pinterest.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions _includes/social-icons/rss.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions _includes/social-icons/stackoverflow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions _includes/social-icons/telegram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions _includes/social-icons/twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions _includes/social-icons/x.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions _includes/social-icons/youtube.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions _includes/social-item.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<li>{% assign entry = include.item %}
<a {% unless entry.platform == 'rss' %}rel="me" {% endunless %}href="{{ entry.user_url }}" target="_blank" title="{{ entry.title | default: entry.platform }}">
<svg class="svg-icon grey">
<use xlink:href="{{ '/assets/minima-social-icons.svg#' | append: entry.platform | relative_url }}"></use>
</svg>
</a>
</li>
5 changes: 5 additions & 0 deletions _includes/social.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<ul class="social-media-list">
{%- for entry in site.bpdevs.social_links -%}
{%- include social-item.html item = entry -%}
{%- endfor -%}
</ul>
3 changes: 3 additions & 0 deletions _includes/svg_symbol.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<symbol id="{{ include.key }}" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414" viewBox="0 0 16 16">
{%- include social-icons/{{ include.key }}.svg -%}
</symbol>
12 changes: 8 additions & 4 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="{{ page.lang }}">
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
Expand Down Expand Up @@ -27,9 +27,13 @@
</head>

<body>
{% include header.html %}
<main role="main">{{ content }}</main>
{% include footer.html %}
{%- include header.html -%}
<main role="main" class="page-content" aria-label="Content">
<div class="wrapper">
{{ content }}
</div>
</main>
{%- include footer.html -%}
<script src="{{ '/assets/js/index.js' | relative_url }}"></script>
<script src="https://kit.fontawesome.com/1bbe56de49.js" crossorigin="anonymous"></script>
</body>
Expand Down
43 changes: 43 additions & 0 deletions assets/css/bpd.css
Original file line number Diff line number Diff line change
Expand Up @@ -319,3 +319,46 @@ footer {
display: flex;
margin-top: 2.5em;
}

.social-media-list {
list-style: none;
margin-left: 0;
}

.footer-col-wrapper,
.social-links {
font-size: 0.9375rem;
color: var(--minima-brand-color);
}

.social-media-list {
display: table;
margin: 0 auto;
}

.social-media-list li {
float: left;
margin: 5px 10px 5px 0;
}

.social-media-list li:last-of-type {
margin-right: 0;
}

.social-media-list li a {
display: block;
padding: 10px 12px;
border: 1px solid var(--minima-border-color-01);
}

.social-media-list li a:hover {
border-color: var(--minima-border-color-02);
}

.svg-icon {
width: 1.25em;
height: 1.25em;
display: inline-block;
fill: currentColor;
vertical-align: text-bottom;
}
18 changes: 18 additions & 0 deletions assets/minima-social-icons.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
permalink: /assets/minima-social-icons.svg
---

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
{% comment %}
Iterate through {{ site.bpdevs.social_links }} and render platform related SVG-symbol
unless the platform is "rss" because we need the "rss" symbol for the `Subscribe` link
in the footer and therefore inject the "rss" icon outside the iteration loop.
{% endcomment %}
{% for entry in site.bpdevs.social_links %}
{%- assign symbol_id = entry.platform -%}
{%- unless symbol_id == "rss" -%}
{%- include svg_symbol.html key = symbol_id -%}
{% endunless %}
{%- endfor -%}
{%- include svg_symbol.html key = "rss" -%}
</svg>

0 comments on commit 4232170

Please sign in to comment.