Changeset - 61c99cdbbfff
[Not reviewed]
default
0 2 0
domruf - 8 years ago 2017-10-27 20:13:39
dominikruf@gmail.com
less: cleanup footer navbar style

- use default font weight for footer - it doesn't need special attention and
doesn't have to be bold
- use class selector for the footer instead of ID selector
- add comment for the styling that is removing margin below footer
2 files changed with 3 insertions and 5 deletions:
0 comments (0 inline, 0 general)
kallithea/public/less/style.less
Show inline comments
 
body {
 
  background: url("../images/background.png") repeat scroll 0 0 #B0B0B0;
 
}
 

	
 
/* class for texts where newlines should be preserved, for very light-weight ascii art markup (like pull request descriptions) */
 
.formatted-fixed {
 
  white-space: pre-wrap;
 
}
 

	
 
/* use monospace for changeset hashes */
 
.changeset_hash {
 
  font-family: @font-family-monospace;
 
}
 

	
 
/* Note: class 'icon-empty' or 'icon-gravatar' can be used to get icon-ish styling without an actual glyph */
 
i[class^='icon-empty'],
 
i[class^='icon-gravatar'] {
 
  background-repeat: no-repeat;
 
  background-position: center;
 
  display: inline-block;
 
  min-width: 16px;
 
  min-height: 16px;
 
  margin: -2px 0 -4px 0;
 
}
 

	
 
.inline-comments-general.show-general-status .hidden.general-only {
 
  display: block !important;
 
}
 
.truncate {
 
  white-space: nowrap;
 
  overflow: hidden;
 
  text-overflow: ellipsis;
 
  -o-text-overflow: ellipsis;
 
  -ms-text-overflow: ellipsis;
 
}
 
.truncate.autoexpand:hover {
 
  overflow: visible;
 
}
 

	
 
/* show comment anchors when hovering over panel-heading */
 
a.permalink {
 
  visibility: hidden;
 
}
 
.panel-heading:hover .permalink {
 
  visibility: visible;
 
}
 

	
 
.navbar-inverse {
 
  border: none;
 
}
 

	
 
/* logo */
 
nav.navbar .navbar-brand {
 
  font-size: 20px;
 
  padding-top: 12px;
 
}
 
nav.navbar.mainmenu .navbar-brand .branding {
 
  &:before {
 
    content: "";
 
    display: inline-block;
 
    margin-right: .2em;
 
    background-image: url(@kallithea-logo-url);
 
    width: @kallithea-logo-width;
 
    height: @kallithea-logo-height;
 
    margin-bottom: -@kallithea-logo-bottom;
 
    margin-top: -12px;
 
  }
 
}
 

	
 
/* code highlighting */
 
/* don't use bootstrap style for code blocks */
 
.code-highlighttable pre {
 
  background: inherit;
 
  border: 0;
 
}
 

	
 
/* every direct child of a panel, that is not .panel-heading, should auto
 
 * overflow to prevent overflowing of elements like text boxes and tables */
 
.panel > :not(.panel-heading){
 
  overflow-x: auto;
 
  min-height: 0.01%;
 
}
 

	
 
/* search highlighting */
 
div.search-code-body pre .match {
 
  background-color: @highlight-color;
 
}
 
div.search-code-body pre .break {
 
  background-color: @highlight-line-color;
 
  width: 100%;
 
  display: block;
 
}
 

	
 
/* use @alert-danger-text for form error messages and .alert-danger for the input element */
 
.form-group .error-message {
 
  color: @alert-danger-text;
 
  display: inline-block;
 
  padding-top: 5px;
 
  &:empty{
 
    display: none;
 
  }
 
}
 
input.error {
 
  .alert-danger;
 
}
 

	
 
/* language bars (summary page) */
 
#lang_stats {
 
  .progress-bar {
 
    min-width: 15px;
 
    border-top-right-radius: 8px;
 
    border-bottom-right-radius: 8px;
 
  }
 
  td {
 
    padding: 1px 0 !important;
 
  }
 
}
 

	
 
/* every direct child of a main panel, that is not .panel-heading, should auto
 
 * overflow to prevent overflowing of elements like text boxes and tables */
 
#main > .panel > :not(.panel-heading) {
 
  overflow-x: auto;
 
  min-height: 0.01%;
 
}
 

	
 
/* use pointer cursor for expand_commit */
 
.expand_commit .icon-align-left {
 
  cursor: pointer;
 
  color: #999;
 
}
 

	
 
/* don't break author, date and comment cells into multiple lines in changeset table */
 
table.changesets {
 
  .author,
 
  .date,
 
  .comments {
 
    white-space: nowrap;
 
  }
 
}
 

	
 
/* textareas should be at least 100px high and 400px wide */
 
textarea.form-control {
 
  min-height: 100px;
 
  min-width: 400px;
 
}
 

	
 
/* add some space between the code-browser icons and the file names */
 
.browser-dir > i[class^='icon-'],
 
.submodule-dir > i[class^='icon-'],
 
.browser-file > i[class^='icon-'] {
 
  padding-right: 0.3em;
 
}
 

	
 
.form-group > label {
 
  float: left;
 
}
 
.dt_repo_pending {
 
  opacity: 0.5;
 
}
 

	
 
div.panel-primary {
 
  border: none;
 
}
 
div.panel div.panel-heading {
 
  font-size: 14px;
 
  font-weight: 700;
 
}
 

	
 
#content div.panel ul.pagination {
 
  margin: 10px 0 0 0;
 
}
 
#content div.panel ul.pagination > li > a,
 
#content div.panel ul.pagination > li > span {
 
  background: #ebebeb url("../images/pager.png") repeat-x;
 
  color: #4A4A4A;
 
  font-weight: 700;
 
  border-top: 1px solid #dedede;
 
  border-left: 1px solid #cfcfcf;
 
  border-bottom: 1px solid #c4c4c4;
 
  border-right: 1px solid #cfcfcf;
 
}
 
#content div.panel ul.pagination > li.active > span,
 
#content div.panel ul.pagination > li:hover > a,
 
#content div.panel ul.pagination > li:active > a {
 
  background: #b4b4b4 url("../images/pager_selected.png") repeat-x;
 
  border-top: 1px solid #ccc;
 
  border-left: 1px solid #bebebe;
 
  border-bottom: 1px solid #afafaf;
 
  border-right: 1px solid #bebebe;
 
  color: #515151;
 
}
 

	
 
#footer {
 
/* remove margin below footer */
 
.navbar.footer {
 
  margin-bottom: 0;
 
}
 
#footer > span {
 
  font-weight: 700;
 
}
 

	
 
.user-menu {
 
  padding: 0 !important;
 
}
 
#quick_login {
 
  width: 360px;
 
  margin-top: 15px;
 
  min-height: 110px;
 
}
 
#quick_login input#username,
 
#quick_login input#password {
 
  display: block;
 
  margin: 5px 0 10px;
 
}
 
#quick_login .password_forgotten a,
 
#quick_login .register a {
 
  padding: 0 !important;
 
  line-height: 25px !important;
 
  float: left;
 
  clear: both;
 
}
 
#quick_login .submit {
 
  float: right;
 
}
 
#quick_login .submit input#sign_in {
 
  margin-top: 5px;
 
}
 
#quick_login > .pull-left {
 
  width: 170px;
 
}
 
#quick_login > .pull-right {
 
  width: 140px;
 
}
 
#quick_login .full_name {
 
  font-weight: bold;
 
  padding: 3px;
 
}
 
#quick_login .email {
 
  padding: 3px 3px 3px 0;
 
}
 
#quick_login :not(input) {
 
  color: @kallithea-theme-inverse-color;
 
  padding-bottom: 3px;
 
}
 
#register div.form div.form-group > label {
 
  width: 135px;
 
  float: left;
 
  text-align: right;
 
  margin: 2px 10px 0 0;
 
  padding: 5px 0 0 5px;
 
}
 
#register div.form div.form-group > div input {
 
  width: 300px;
 
}
 
#register div.form div.buttons {
 
  border-top: 1px solid #DDD;
 
  margin: 0;
 
  padding: 10px 0 0 145px;
 
}
 
#journal .journal_user {
 
  color: #747474;
 
  font-size: 14px;
 
  font-weight: bold;
 
  height: 30px;
 
}
 
#journal .journal_user.deleted {
 
  color: #747474;
 
  font-size: 14px;
 
  font-weight: normal;
 
  height: 30px;
 
  font-style: italic;
 
}
 
#journal .journal_icon {
 
  clear: both;
 
  float: left;
 
  padding-right: 4px;
 
  padding-top: 3px;
 
}
 
#journal .journal_action {
 
  padding-top: 4px;
 
  min-height: 2px;
 
  float: left;
 
}
 
#journal .journal_action_params {
 
  clear: left;
 
  padding-left: 22px;
 
}
 
#journal .date {
 
  clear: both;
 
  color: #777777;
 
  font-size: 11px;
 
  padding-left: 22px;
 
}
 
#journal .journal_repo_name {
 
  font-weight: bold;
 
  font-size: 1.1em;
 
}
 
#journal .compare_view {
 
  padding: 5px 0px 5px 0px;
 
  width: 95px;
 
}
 
.trending_language_tbl,
 
.trending_language_tbl td {
 
  border: 0 !important;
 
  margin: 0 !important;
 
  padding: 0 !important;
 
}
 
.trending_language_tbl,
 
.trending_language_tbl tr {
 
  border-spacing: 1px;
 
}
 
h3.files_location {
 
  font-size: 1.8em;
 
  font-weight: 700;
 
  border-bottom: none !important;
 
  margin: 10px 0 !important;
 
}
 
.file_history {
 
  padding-top: 10px;
 
  font-size: 16px;
 
}
 
.file_author {
 
  float: left;
 
}
 
.file_author .item {
 
  float: left;
 
  padding: 5px;
 
  color: #888;
 
}
 
.changeset_id {
 
  color: #666666;
 
  margin-right: -3px;
 
}
 
.changeset-logical-index {
 
  color: #666666;
 
  font-style: italic;
 
  font-size: 85%;
 
  padding-right: 0.5em;
 
  text-align: right;
 
}
 
#changeset_compare_view_content .compare_view_commits {
 
  width: auto !important;
 
}
 
#changeset_compare_view_content .compare_view_commits td {
 
  padding: 0px 0px 0px 12px !important;
 
}
 
td.author {
 
  overflow: hidden;
 
  text-overflow: ellipsis;
 
  white-space: nowrap;
 
  max-width: 210px;
 
}
 
#graph_nodes {
 
  position: absolute;
 
  width: 100px;
 
}
 
#graph_content,
 
#graph_content_pr,
 
#graph .container_header {
 
  margin-left: 100px;
 
}
 
#graph_content {
 
  position: relative;
 
}
 
table#updaterevs-table tr.mergerow,
 
table#updaterevs-table tr.out-of-range,
 
table#changesets tr.mergerow,
 
table#changesets tr.out-of-range {
 
  opacity: 0.6;
 
}
 
table#changesets tr > td {
 
  height: 31px;
 
  border-color: #cdcdcd;
 
  text-align: left;
 
}
 
table#changesets tr > td.checkbox-column {
 
  width: 14px;
 
  font-size: 0.85em;
 
}
 
table#changesets tr > td.status {
 
  width: 14px;
 
  font-size: 0.85em;
 
}
 
table#changesets tr > td.hash {
 
  width: 100px;
 
  font-size: 0.85em;
 
}
 
table#changesets tr > td.date {
 
  width: auto !important;
 
  color: #666;
 
  font-size: 10px;
 
  white-space: nowrap;
kallithea/templates/base/base.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="root.html"/>
 

	
 
<!-- CONTENT -->
 
<div id="content" class="container-fluid">
 
    ${self.flash_msg()}
 
    <div id="main">
 
        ${next.main()}
 
    </div>
 
</div>
 
<!-- END CONTENT -->
 

	
 
<!-- FOOTER -->
 
<div id="footer" class="footer navbar navbar-inverse">
 
<div class="footer navbar navbar-inverse">
 
    <span class="navbar-text pull-left">
 
        ${_('Server instance: %s') % c.instance_id if c.instance_id else ''}
 
    </span>
 
    <span class="navbar-text pull-right">
 
        This site is powered by
 
        %if c.visual.show_version:
 
            <a class="navbar-link" href="${h.url('kallithea_project_url')}" target="_blank">Kallithea</a> ${c.kallithea_version},
 
        %else:
 
            <a class="navbar-link" href="${h.url('kallithea_project_url')}" target="_blank">Kallithea</a>,
 
        %endif
 
        which is
 
        <a class="navbar-link" href="${h.canonical_url('about')}#copyright">&copy; 2010&ndash;2017 by various authors &amp; licensed under GPLv3</a>.
 
        %if c.issues_url:
 
            &ndash; <a class="navbar-link" href="${c.issues_url}" target="_blank">${_('Support')}</a>
 
        %endif
 
    </span>
 
</div>
 

	
 
<!-- END FOOTER -->
 

	
 
### MAKO DEFS ###
 

	
 
<%block name="branding_title">
 
    %if c.site_name:
 
    &middot; ${c.site_name}
 
    %endif
 
</%block>
 

	
 
<%def name="flash_msg()">
 
    <%include file="/base/flash_msg.html"/>
 
</%def>
 

	
 
<%def name="breadcrumbs()">
 
    <div class="breadcrumbs panel-title">
 
    ${self.breadcrumbs_links()}
 
    </div>
 
</%def>
 

	
 
<%def name="admin_menu()">
 
  <ul class="dropdown-menu" role="menu">
 
      <li><a href="${h.url('admin_home')}"><i class="icon-book"></i> ${_('Admin Journal')}</a></li>
 
      <li><a href="${h.url('repos')}"><i class="icon-database"></i> ${_('Repositories')}</a></li>
 
      <li><a href="${h.url('repos_groups')}"><i class="icon-folder"></i> ${_('Repository Groups')}</a></li>
 
      <li><a href="${h.url('users')}"><i class="icon-user"></i> ${_('Users')}</a></li>
 
      <li><a href="${h.url('users_groups')}"><i class="icon-users"></i> ${_('User Groups')}</a></li>
 
      <li><a href="${h.url('admin_permissions')}"><i class="icon-block"></i> ${_('Default Permissions')}</a></li>
 
      <li><a href="${h.url('auth_home')}"><i class="icon-key"></i> ${_('Authentication')}</a></li>
 
      <li><a href="${h.url('defaults')}"><i class="icon-wrench"></i> ${_('Repository Defaults')}</a></li>
 
      <li class="last"><a href="${h.url('admin_settings')}"><i class="icon-gear"></i> ${_('Settings')}</a></li>
 
  </ul>
 

	
 
</%def>
 

	
 

	
 
## admin menu used for people that have some admin resources
 
<%def name="admin_menu_simple(repositories=None, repository_groups=None, user_groups=None)">
 
  <ul class="dropdown-menu" role="menu">
 
   %if repositories:
 
      <li><a href="${h.url('repos')}"><i class="icon-database"></i> ${_('Repositories')}</a></li>
 
   %endif
 
   %if repository_groups:
 
      <li><a href="${h.url('repos_groups')}"><i class="icon-folder"></i> ${_('Repository Groups')}</a></li>
 
   %endif
 
   %if user_groups:
 
      <li><a href="${h.url('users_groups')}"><i class="icon-users"></i> ${_('User Groups')}</a></li>
 
   %endif
 
  </ul>
 
</%def>
 

	
 
<%def name="repotag(repo)">
 
  %if h.is_hg(repo):
 
    <span class="repotag" title="${_('Mercurial repository')}">hg</span>
 
  %endif
 
  %if h.is_git(repo):
 
    <span class="repotag" title="${_('Git repository')}">git</span>
 
  %endif
 
</%def>
 

	
 
<%def name="repo_context_bar(current=None, rev=None)">
 
  <% rev = None if rev == 'tip' else rev %>
 
  <!--- CONTEXT BAR -->
 
  <nav id="context-bar" class="navbar navbar-inverse">
 
    <div class="container-fluid">
 
    <div class="navbar-header">
 
      <div class="navbar-brand">
 
        ${repotag(c.db_repo)}
 

	
 
        ## public/private
 
        %if c.db_repo.private:
 
          <i class="icon-keyhole-circled"></i>
 
        %else:
 
          <i class="icon-globe"></i>
 
        %endif
 
        %for group in c.db_repo.groups_with_parents:
 
          ${h.link_to(group.name, url('repos_group_home', group_name=group.group_name), class_='navbar-link')}
 
          &raquo;
 
        %endfor
 
        ${h.link_to(c.db_repo.just_name, url('summary_home', repo_name=c.db_repo.repo_name), class_='navbar-link')}
 

	
 
        %if current == 'createfork':
 
         - ${_('Create Fork')}
 
        %endif
 
      </div>
 
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#context-pages" aria-expanded="false">
 
        <span class="sr-only">Toggle navigation</span>
 
        <span class="icon-bar"></span>
 
        <span class="icon-bar"></span>
 
        <span class="icon-bar"></span>
 
      </button>
 
    </div>
 
    <div id="context-pages" class="navbar-collapse collapse">
 
    <ul class="nav navbar-nav navbar-right">
 
        <li class="${'active' if current == 'summary' else ''}" data-context="summary"><a href="${h.url('summary_home', repo_name=c.repo_name)}"><i class="icon-doc-text"></i> ${_('Summary')}</a></li>
 
        %if rev:
 
        <li class="${'active' if current == 'changelog' else ''}" data-context="changelog"><a href="${h.url('changelog_file_home', repo_name=c.repo_name, revision=rev, f_path='')}"><i class="icon-clock"></i> ${_('Changelog')}</a></li>
 
        %else:
 
        <li class="${'active' if current == 'changelog' else ''}" data-context="changelog"><a href="${h.url('changelog_home', repo_name=c.repo_name)}"><i class="icon-clock"></i> ${_('Changelog')}</a></li>
 
        %endif
 
        <li class="${'active' if current == 'files' else ''}" data-context="files"><a href="${h.url('files_home', repo_name=c.repo_name, revision=rev or 'tip')}"><i class="icon-doc-inv"></i> ${_('Files')}</a></li>
 
        <li class="${'active' if current == 'switch-to' else ''}" data-context="switch-to">
 
          <input id="branch_switcher" name="branch_switcher" type="hidden">
 
        </li>
 
        <li class="${'active' if current == 'options' else ''} dropdown" data-context="options">
 
             %if h.HasRepoPermissionLevel('admin')(c.repo_name):
 
               <a href="${h.url('edit_repo',repo_name=c.repo_name)}" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true"><i class="icon-wrench"></i> ${_('Options')} <i class="caret"></i></a>
 
             %else:
 
               <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true"><i class="icon-wrench"></i> ${_('Options')} <i class="caret"></i></a>
 
             %endif
 
          <ul class="dropdown-menu" role="menu" aria-hidden="true">
 
             %if h.HasRepoPermissionLevel('admin')(c.repo_name):
 
                   <li><a href="${h.url('edit_repo',repo_name=c.repo_name)}"><i class="icon-gear"></i> ${_('Settings')}</a></li>
 
             %endif
 
              %if c.db_repo.fork:
 
               <li><a href="${h.url('compare_url',repo_name=c.db_repo.fork.repo_name,org_ref_type=c.db_repo.landing_rev[0],org_ref_name=c.db_repo.landing_rev[1], other_repo=c.repo_name,other_ref_type='branch' if request.GET.get('branch') else c.db_repo.landing_rev[0],other_ref_name=request.GET.get('branch') or c.db_repo.landing_rev[1], merge=1)}">
 
                   <i class="icon-git-compare"></i> ${_('Compare Fork')}</a></li>
 
              %endif
 
              <li><a href="${h.url('compare_home',repo_name=c.repo_name)}"><i class="icon-git-compare"></i> ${_('Compare')}</a></li>
 

	
 
              <li><a href="${h.url('search_repo',repo_name=c.repo_name)}"><i class="icon-search"></i> ${_('Search')}</a></li>
 

	
 
              %if h.HasRepoPermissionLevel('write')(c.repo_name) and c.db_repo.enable_locking:
 
                %if c.db_repo.locked[0]:
 
                  <li><a href="${h.url('toggle_locking', repo_name=c.repo_name)}"><i class="icon-lock"></i> ${_('Unlock')}</a></li>
 
                %else:
 
                  <li><a href="${h.url('toggle_locking', repo_name=c.repo_name)}"><i class="icon-lock-open-alt"></i> ${_('Lock')}</a></li>
 
                %endif
 
              %endif
 
              ## TODO: this check feels wrong, it would be better to have a check for permissions
 
              ## also it feels like a job for the controller
 
              %if request.authuser.username != 'default':
 
                  <li>
 
                   <a href="#" class="${'following' if c.repository_following else 'follow'}" onclick="toggleFollowingRepo(this, ${c.db_repo.repo_id});">
 
                    <span class="show-follow"><i class="icon-heart-empty"></i> ${_('Follow')}</span>
 
                    <span class="show-following"><i class="icon-heart"></i> ${_('Unfollow')}</span>
 
                   </a>
 
                  </li>
 
                  <li><a href="${h.url('repo_fork_home',repo_name=c.repo_name)}"><i class="icon-git-pull-request"></i> ${_('Fork')}</a></li>
 
                  <li><a href="${h.url('pullrequest_home',repo_name=c.repo_name)}"><i class="icon-git-pull-request"></i> ${_('Create Pull Request')}</a></li>
 
              %endif
 
             </ul>
 
        </li>
 
        <li class="${'active' if current == 'showpullrequest' else ''}" data-context="showpullrequest">
 
          <a href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}" title="${_('Show Pull Requests for %s') % c.repo_name}"> <i class="icon-git-pull-request"></i> ${_('Pull Requests')}
 
            %if c.repository_pull_requests:
 
              <span class="badge">${c.repository_pull_requests}</span>
 
            %endif
 
          </a>
 
        </li>
 
    </ul>
 
    </div>
 
    </div>
 
  </nav>
 
  <script type="text/javascript">
 
    $(document).ready(function() {
 
      var bcache = {};
 

	
 
      $("#branch_switcher").select2({
 
          placeholder: '<i class="icon-exchange"></i> ' + ${h.jshtml(_('Switch To'))} + ' <span class="caret"></span>',
 
          dropdownAutoWidth: true,
 
          sortResults: prefixFirstSort,
 
          formatResult: function(obj) {
 
              return obj.text;
 
          },
 
          formatSelection: function(obj) {
 
              return obj.text;
 
          },
 
          formatNoMatches: function(term) {
 
              return ${h.jshtml(_('No matches found'))};
 
          },
 
          escapeMarkup: function(m) {
 
              // don't escape our custom placeholder
 
              if (m.substr(0, 25) == '<i class="icon-exchange">') {
0 comments (0 inline, 0 general)