Skip to content

Commit

Permalink
Show envelope icon for mailto: SOCIAL links
Browse files Browse the repository at this point in the history
Only if the name doesn't match anything that
triggers a different icon (see #4).
  • Loading branch information
textbook committed Jul 18, 2017
1 parent 346bb93 commit 71f2d23
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,13 @@ in the sidebar with any `SOCIAL` or other `LINKS`.

Appropriate icons are provided in the sidebar for a range of sites in the
`SOCIAL` link list. Have a look in [`social.html`][17] to see which titles this
applies to.
applies to. If none of the sites are a match, then:

- if the second, URL element in the tuple starts with `'mailto:'`, an envelope
icon is used; otherwise
- a globe icon is used.

![Screenshot - Social icons in sidebar][24]

### MailChimp Configuration

Expand Down Expand Up @@ -237,3 +243,4 @@ free to submit a [pull request][18].
[21]: http://kb.mailchimp.com/lists/signup-forms/add-a-signup-form-to-your-website
[22]: https://pypi.python.org/pypi/bulrush
[23]: http://fontawesome.io/icon/file-text-o/
[24]: ./screenshot-social.png
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@ Bulrush

A `Bulma`_-based `Pelican`_ blog theme; clean, flexible and responsive.

For more information, see `the GitHub repo`_.

.. _Bulma: http://bulma.io/
.. _Pelican: http://docs.getpelican.com/en/stable/
.. _the GitHub repo: https://github.com/textbook/bulrush#readme
2 changes: 2 additions & 0 deletions bulrush/templates/social.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
<i class="fa fa-lastfm fa-fw"></i>
{% elif title|lower == 'stack overflow' %}
<i class="fa fa-stack-overflow fa-fw"></i>
{% elif link.startswith('mailto:') %}
<i class="fa fa-envelope fa-fw"></i>
{% else %}
<i class="fa fa-globe fa-fw"></i>
{% endif %}
Expand Down
Binary file added screenshot-social.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
test_suite='tests',
tests_require=['pelican'],
url='https://github.com/textbook/bulrush',
version='0.0.7',
version='0.0.8',
)

0 comments on commit 71f2d23

Please sign in to comment.