Changeset - 58d27c7ad80e
[Not reviewed]
default
0 3 0
domruf - 8 years ago 2017-10-10 21:33:16
dominikruf@gmail.com
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.
3 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/helpers.py
Show inline comments
 
@@ -875,13 +875,13 @@ def gravatar(email_address, cls='', size
 

	
 
    src = gravatar_url(email_address, size * 2)
 

	
 
    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)
 

	
 
    else:
 
        # if src is empty then there was no gravatar, so we use a font icon
 
        html = ("""<i class="icon-user {cls}" style="font-size: {size}px;"></i>"""
kallithea/public/css/contextbar.css
Show inline comments
 
@@ -7,13 +7,13 @@ i[class^='icon-'] {
 
  display: inline-block;
 
  min-width: 16px;
 
  min-height: 16px;
 
  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 */
 
.icon-diff-M:before {
 
  font-family: 'kallithea';
 
  content: '\22a1';
kallithea/public/js/base.js
Show inline comments
 
@@ -1067,13 +1067,13 @@ var gravatar = function(gravatar_lnk, si
 
    if (!gravatar_lnk) {
 
        return '';
 
    }
 
    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);
 
}
 

	
 
var autocompleteGravatar = function(res, gravatar_lnk, size, group) {
 
    var elem;
0 comments (0 inline, 0 general)