Mercurial > kallithea
changeset 6964:58d27c7ad80e
gravatar: use icon-gravatar for default gravatar sizing and styling instead of icon-empty
We may want to use a different style for gravatar then for icon-empty,
so we should give it its own class, but still consider it an icon, like the
default icon-user is.
author | domruf <dominikruf@gmail.com> |
---|---|
date | Tue, 10 Oct 2017 21:33:16 +0200 |
parents | 77a88040a262 |
children | 7b73f54d84dc |
files | kallithea/lib/helpers.py kallithea/public/css/contextbar.css kallithea/public/js/base.js |
diffstat | 3 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/helpers.py Mon Oct 23 22:52:50 2017 +0200 +++ b/kallithea/lib/helpers.py Tue Oct 10 21:33:16 2017 +0200 @@ -878,7 +878,7 @@ if src: # here it makes sense to use style="width: ..." (instead of, say, a # stylesheet) because we using this to generate a high-res (retina) size - html = ('<i class="icon-empty {cls}"' + html = ('<i class="icon-gravatar {cls}"' ' style="font-size: {size}px;background-size: {size}px;background-image: url(\'{src}\')"' '></i>').format(cls=cls, size=size, src=src)
--- a/kallithea/public/css/contextbar.css Mon Oct 23 22:52:50 2017 +0200 +++ b/kallithea/public/css/contextbar.css Tue Oct 10 21:33:16 2017 +0200 @@ -10,7 +10,7 @@ margin: -2px 0 -4px 0; /* background-color: red; /* for debugging */ } -/* Note: class 'icon-empty' can be used to get this styling without an actual glyph */ +/* Note: class 'icon-empty' or 'icon-gravatar' can be used to get icon styling without an actual glyph */ /* css classes for diff file status ... it'd be nice if css had a way to inherit from another class but alas, we must make sure this content is the same from the icon font file */
--- a/kallithea/public/js/base.js Mon Oct 23 22:52:50 2017 +0200 +++ b/kallithea/public/js/base.js Tue Oct 10 21:33:16 2017 +0200 @@ -1070,7 +1070,7 @@ if (gravatar_lnk == 'default') { return '<i class="icon-user {1}" style="font-size: {0}px;"></i>'.format(size, cssclass); } - return ('<i class="icon-empty {2}"' + + return ('<i class="icon-gravatar {2}"' + ' style="font-size: {0}px;background-image: url(\'{1}\'); background-size: {0}px"' + '></i>').format(size, gravatar_lnk, cssclass); }