Changeset - e77f5cd50f1f
[Not reviewed]
default
0 6 0
Mads Kiilerich - 8 years ago 2017-06-25 18:28:32
mads@kiilerich.com
style: change some div to span to make it inline and look better without custom styling - especially around gravatars
6 files changed with 13 insertions and 23 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/helpers.py
Show inline comments
 
@@ -830,7 +830,7 @@ from kallithea.lib.auth import HasPermis
 
# GRAVATAR URL
 
#==============================================================================
 
def gravatar_div(email_address, cls='', size=30, **div_attributes):
 
    """Return an html literal with a div around a gravatar if they are enabled.
 
    """Return an html literal with a span around a gravatar if they are enabled.
 
    Extra keyword parameters starting with 'div_' will get the prefix removed
 
    and '_' changed to '-' and be used as attributes on the div. The default
 
    class is 'gravatar'.
 
@@ -844,7 +844,7 @@ def gravatar_div(email_address, cls='', 
 
    for k, v in sorted(div_attributes.items()):
 
        assert k.startswith('div_'), k
 
        attributes.append(' %s="%s"' % (k[4:].replace('_', '-'), escape(v)))
 
    return literal("""<div%s>%s</div>""" %
 
    return literal("""<span%s>%s</span>""" %
 
                   (''.join(attributes),
 
                    gravatar(email_address, cls=cls, size=size)))
 

	
kallithea/public/css/style.css
Show inline comments
 
@@ -1165,14 +1165,6 @@ a.metatag[data-tag="license"]:hover {
 
    margin-right: 10px;
 
}
 

	
 
#journal .journal_container {
 
    clear: both;
 
}
 

	
 
#journal .journal_action_container {
 
    padding-left: 18px;
 
}
 

	
 
#journal .journal_user {
 
    color: #747474;
 
    font-size: 14px;
kallithea/templates/admin/gists/index.html
Show inline comments
 
@@ -43,10 +43,10 @@
 
        % for gist in c.gists_pager:
 
          <div class="gist-item clearfix">
 
            ${h.gravatar_div(gist.owner.email, size=28)}
 
            <div title="${gist.owner.full_contact}" class="user">
 
            <span title="${gist.owner.full_contact}" class="user">
 
                <b>${h.person(gist.owner.full_contact)}</b> /
 
                <b><a href="${h.url('gist',gist_id=gist.gist_access_id)}">gist: ${gist.gist_access_id}</a></b>
 
            </div>
 
            </span>
 
            <div>
 
                ${_('Created')} ${h.age(gist.created_on)} /
 
                <span class="text-muted">
kallithea/templates/admin/notifications/notifications_data.html
Show inline comments
 
@@ -3,8 +3,8 @@
 
<div class="list-group">
 
%for notification in c.notifications:
 
  <div id="notification_${notification.notification.notification_id}" class="list-group-item ${'' if notification.read else 'list-group-item-warning'} clearfix">
 
      ${h.gravatar_div(notification.notification.created_by_user.email, size=24)}
 
      <span class="pull-left">
 
        ${h.gravatar_div(notification.notification.created_by_user.email, size=24)}
 
        <a href="${url('notification', notification_id=notification.notification.notification_id)}">${notification.notification.description}</a>
 
      </span>
 
      <span class="pull-right">
kallithea/templates/files/files_browser.html
Show inline comments
 
@@ -29,10 +29,10 @@
 
        <div class="browser-nav form-inline pull-left">
 
            ${h.form(h.url.current())}
 
            <div class="info_box">
 
              <div class="info_box_elem rev">${_('Revision')}</div>
 
              <div class="info_box_elem"><a class="btn btn-default btn-xs ypjax-link" href="${c.url_prev}" title="${_('Previous revision')}"><i class="icon-left-open"></i></a></div>
 
              <div class="info_box_elem">${h.text('at_rev',value=c.changeset.revision,size=5,class_='form-control input-sm')}</div>
 
              <div class="info_box_elem"><a class="btn btn-default btn-xs ypjax-link" href="${c.url_next}" title="${_('Next revision')}"><i class="icon-right-open"></i></a></div>
 
              <span class="info_box_elem rev">${_('Revision')}</span>
 
              <span class="info_box_elem"><a class="btn btn-default btn-xs ypjax-link" href="${c.url_prev}" title="${_('Previous revision')}"><i class="icon-left-open"></i></a></span>
 
              <span class="info_box_elem">${h.text('at_rev',value=c.changeset.revision,size=5,class_='form-control input-sm')}</span>
 
              <span class="info_box_elem"><a class="btn btn-default btn-xs ypjax-link" href="${c.url_next}" title="${_('Next revision')}"><i class="icon-right-open"></i></a></span>
 
            </div>
 
            ${h.end_form()}
 
        </div>
kallithea/templates/journal/journal_data.html
Show inline comments
 
@@ -4,16 +4,15 @@
 
    %for day,items in c.journal_day_aggregate:
 
        <h4>${day}</h4>
 
        % for user,entries in items:
 
            <div class="journal_container">
 
            <div class="container-fluid">
 
                ${h.gravatar_div(user.email if user else 'anonymous@kallithea-scm.org', size=24)}
 
                %if user:
 
                    <div class="journal_user">${user.name} ${user.lastname}</div>
 
                    <span class="journal_user">${user.name} ${user.lastname}</span>
 
                %else:
 
                    <div class="journal_user deleted">${entries[0].username}</div>
 
                    <span class="journal_user deleted">${entries[0].username}</span>
 
                %endif
 
                <div class="journal_action_container">
 
                % for entry in entries:
 
                  <div class="container-fluid">
 
                  <div class="clearfix">
 
                    <div class="pull-left">
 
                      <div class="journal_icon"> ${h.action_parser(entry)[2]()}</div>
 
                    </div>
 
@@ -34,7 +33,6 @@
 
                    </div>
 
                  </div>
 
                %endfor
 
                </div>
 
            </div>
 
        %endfor
 
    %endfor
0 comments (0 inline, 0 general)