changeset 6851:789de118156b

style: consistently use 'changeset_hash' class for monospace hashes Get rid of 'revision-link' and some use of 'hash'. There is still some use of 'hash' for columns, but the content there already has 'changeset_hash'.
author domruf <dominikruf@gmail.com>
date Thu, 29 Jun 2017 23:17:15 +0200
parents 00905ed03136
children ca4ab5047f74
files kallithea/lib/helpers.py kallithea/public/css/style.css kallithea/templates/changeset/changeset.html kallithea/templates/data_table/_dt_elements.html kallithea/templates/files/files_browser.html kallithea/tests/other/test_libs.py
diffstat 6 files changed, 7 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/helpers.py	Mon Aug 28 05:25:40 2017 +0200
+++ b/kallithea/lib/helpers.py	Thu Jun 29 23:17:15 2017 +0200
@@ -1034,7 +1034,7 @@
         hash_ = match_obj.group('hash')
         if hash_ is not None and repo_name is not None:
             from kallithea.config.routing import url  # doh, we need to re-import url to mock it later
-            return '<a class="revision-link" href="%(url)s">%(hash)s</a>' % {
+            return '<a class="changeset_hash" href="%(url)s">%(hash)s</a>' % {
                  'url': url('changeset_home', repo_name=repo_name, revision=hash_),
                  'hash': hash_,
                 }
--- a/kallithea/public/css/style.css	Mon Aug 28 05:25:40 2017 +0200
+++ b/kallithea/public/css/style.css	Thu Jun 29 23:17:15 2017 +0200
@@ -1586,23 +1586,6 @@
     margin-left: 40px !important;
 }
 
-#compare_branches + div.panel-body .revision-link,
-#compare_tags + div.panel-body .revision-link,
-#compare_bookmarks + div.panel-body .revision-link,
-div.panel-body #files_data .revision-link,
-#repos_list_wrap .revision-link,
-#shortlog_data .revision-link {
-    font-weight: normal !important;
-    font-family: monospace;
-    font-size: 12px;
-    color: #577632;
-}
-
-.revision-link {
-    color: #3F6F9F;
-    font-weight: bold !important;
-}
-
 .issue-tracker-link {
     color: #3F6F9F;
     font-weight: bold !important;
@@ -2024,11 +2007,6 @@
     font-size: 14px;
 }
 
-.breadcrumbs .hash {
-    text-transform: none;
-    color: #fff;
-}
-
 div#legend_data {
     padding-left: 10px;
 }
--- a/kallithea/templates/changeset/changeset.html	Mon Aug 28 05:25:40 2017 +0200
+++ b/kallithea/templates/changeset/changeset.html	Thu Jun 29 23:17:15 2017 +0200
@@ -9,7 +9,7 @@
 </%block>
 
 <%def name="breadcrumbs_links()">
-    ${_('Changeset')} - <span class='hash'>${h.show_id(c.changeset)}</span>
+    ${_('Changeset')} - <span class='changeset_hash'>${h.show_id(c.changeset)}</span>
 </%def>
 
 <%block name="header_menu">
--- a/kallithea/templates/data_table/_dt_elements.html	Mon Aug 28 05:25:40 2017 +0200
+++ b/kallithea/templates/data_table/_dt_elements.html	Thu Jun 29 23:17:15 2017 +0200
@@ -40,7 +40,7 @@
 <%def name="revision(name,rev,tip,author,last_msg)">
   <div>
   %if rev >= 0:
-      <a data-toggle="popover" title="${author | entity}" data-content="${last_msg | entity}" class="hash" href="${h.url('changeset_home',repo_name=name,revision=tip)}">${'r%s:%s' % (rev,h.short_id(tip))}</a>
+      <a data-toggle="popover" title="${author | entity}" data-content="${last_msg | entity}" class="changeset_hash" href="${h.url('changeset_home',repo_name=name,revision=tip)}">${'r%s:%s' % (rev,h.short_id(tip))}</a>
   %else:
       ${_('No changesets yet')}
   %endif
--- a/kallithea/templates/files/files_browser.html	Mon Aug 28 05:25:40 2017 +0200
+++ b/kallithea/templates/files/files_browser.html	Thu Jun 29 23:17:15 2017 +0200
@@ -92,7 +92,7 @@
                      </td>
                      <td>
                          %if node.is_file():
-                             <a data-toggle="tooltip" title="${node.last_changeset.message}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=node.last_changeset.raw_id)}" class="revision-link">${h.show_id(node.last_changeset)}</a>
+                             <a data-toggle="tooltip" title="${node.last_changeset.message}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=node.last_changeset.raw_id)}" class="changeset_hash">${h.show_id(node.last_changeset)}</a>
                          %endif
                      </td>
                      <td>
--- a/kallithea/tests/other/test_libs.py	Mon Aug 28 05:25:40 2017 +0200
+++ b/kallithea/tests/other/test_libs.py	Thu Jun 29 23:17:15 2017 +0200
@@ -287,7 +287,7 @@
                                   repo_name=repo_name, repo_id=23, **overrides)
         assert clone_url == expected
 
-    def _quick_url(self, text, tmpl="""<a class="revision-link" href="%s">%s</a>""", url_=None):
+    def _quick_url(self, text, tmpl="""<a class="changeset_hash" href="%s">%s</a>""", url_=None):
         """
         Changes `some text url[foo]` => `some text <a href="/">foo</a>
 
@@ -363,7 +363,7 @@
        """<b>@mention</b> <b>@someone</b>""",
        ""),
       ("deadbeefcafe 123412341234",
-       """<a class="revision-link" href="/repo_name/changeset/deadbeefcafe">deadbeefcafe</a> <a class="revision-link" href="/repo_name/changeset/123412341234">123412341234</a>""",
+       """<a class="changeset_hash" href="/repo_name/changeset/deadbeefcafe">deadbeefcafe</a> <a class="changeset_hash" href="/repo_name/changeset/123412341234">123412341234</a>""",
        ""),
       ("We support * markup for *bold* markup of *single or multiple* words, "
        "*a bit @like http://slack.com*. "
@@ -390,7 +390,7 @@
 
     @parametrize('sample,expected', [
       ("deadbeefcafe @mention, and http://foo.bar/ yo",
-       """<a class="revision-link" href="/repo_name/changeset/deadbeefcafe">deadbeefcafe</a>"""
+       """<a class="changeset_hash" href="/repo_name/changeset/deadbeefcafe">deadbeefcafe</a>"""
        """<a class="message-link" href="#the-link"> <b>@mention</b>, and </a>"""
        """<a href="http://foo.bar/">http://foo.bar/</a>"""
        """<a class="message-link" href="#the-link"> yo</a>"""),