Changeset - 919cebd1073c
[Not reviewed]
default
0 5 0
domruf - 8 years ago 2017-06-26 23:49:26
dominikruf@gmail.com
Grafted from: 88d885e2aa99
templates: use bootstrap grid system for centered panels (login page etc.)

The bootstrap grid system rearranges the elements so that the pages look
good an small screens as well. (i.e. no vertical scrolling)
5 files changed with 28 insertions and 9 deletions:
0 comments (0 inline, 0 general)
kallithea/public/less/style.less
Show inline comments
 
@@ -488,30 +488,24 @@ div.form div.form-group div.highlight,
 
  display: inline;
 
}
 
#content div.panel table td.user,
 
#content div.panel table td.address {
 
  width: 10%;
 
  text-align: center;
 
}
 
#content div.panel div.action div.button {
 
  text-align: right;
 
  margin: 6px 0 0;
 
  padding: 0;
 
}
 
#login,
 
#register {
 
  width: 520px;
 
  margin: 10% auto 0;
 
  padding: 0;
 
}
 
.ac .match {
 
  font-weight: 700;
 
  padding-top: 5px;
 
  padding-bottom: 5px;
 
}
 
.q_filter_box {
 
  border-radius: 4px;
 
  border: 0 none;
 
  margin-bottom: -4px;
 
  margin-top: -4px;
 
  padding-left: 3px;
 
}
 
@@ -693,27 +687,28 @@ div.comment-prev-next-links div.next-com
 

	
 
/* changelog graph */
 
#graph_nodes,
 
#updaterevs-graph {
 
  .make-xs-column(1);
 
}
 
#graph_content,
 
#graph_content_pr,
 
#updaterevs-table {
 
  .make-xs-column(11);
 
}
 

	
 
/* use bootstrap grid columns for centered forms */
 
#login,
 
#register {
 
/* use bootstrap grid columns for centered columns */
 
.centered-column {
 
  .make-sm-column-offset(3);
 
  .make-sm-column(6);
 
  .form {
 
    .form-horizontal;
 
    .form-group > label {
 
      .make-sm-column(4);
 
    }
 
    .form-group > div {
 
      .make-sm-column(8);
 
    }
 
    .form-group > div:first-child { /* in case there is no label */
 
      .make-sm-column-offset(4);
 
      .make-sm-column(8);
 
    }
kallithea/templates/login.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="base/root.html"/>
 

	
 
<%block name="title">
 
    ${_('Log In')}
 
</%block>
 

	
 
<%include file="/base/flash_msg.html"/>
 
<div class="container">
 
<div class="row">
 
<div class="centered-column">
 
<div id="login" class="panel panel-primary">
 
    <div class="panel-heading">
 
      <h5>
 
        <i class="icon-lock"></i>
 
        %if c.site_name:
 
            ${_('Log In to %s') % c.site_name}
 
        %else:
 
            ${_('Log In')}
 
        %endif
 
      </h5>
 
    </div>
 
    <div class="panel-body">
 
@@ -59,12 +62,15 @@
 
                    ${h.submit('sign_in',_('Sign In'),class_="btn btn-default")}
 
                </div>
 
            </div>
 
        </div>
 
        ${h.end_form()}
 
        <script type="text/javascript">
 
        $(document).ready(function(){
 
            $('#username').focus();
 
        });
 
        </script>
 
    </div>
 
</div>
 
</div>
 
</div>
 
</div>
kallithea/templates/password_reset.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="base/root.html"/>
 

	
 
<%block name="title">
 
    ${_('Password Reset')}
 
</%block>
 

	
 
<%include file="/base/flash_msg.html"/>
 
<div class="container">
 
<div class="row">
 
<div class="centered-column">
 
<div id="register" class="panel panel-primary">
 
    <div class="panel-heading">
 
        %if c.site_name:
 
            <h5>${_('Reset Your Password to %s') % c.site_name}</h5>
 
        %else:
 
            <h5>${_('Reset Your Password')}</h5>
 
        %endif
 
    </div>
 
    <div class="panel-body">
 
        ${h.form(url('password_reset'))}
 
        <div class="form">
 
                <div class="form-group">
 
@@ -53,12 +56,15 @@
 
            $('#email').focus();
 
            %if c.captcha_active:
 
            Recaptcha.create(${h.js(c.captcha_public_key)}, "recaptcha",
 
                {
 
                  theme: "white"
 
                }
 
            );
 
            %endif
 
         });
 
        </script>
 
    </div>
 
</div>
 
</div>
 
</div>
 
</div>
kallithea/templates/password_reset_confirmation.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="base/root.html"/>
 

	
 
<%block name="title">
 
    ${_('Reset Your Password')}
 
</%block>
 

	
 
<%include file="/base/flash_msg.html"/>
 

	
 
<div class="container">
 
<div class="row">
 
<div class="centered-column">
 
<div id="register" class="panel panel-primary">
 
    <div class="panel-heading">
 
        %if c.site_name:
 
            <h5>${_('Reset Your Password to %s') % c.site_name}</h5>
 
        %else:
 
            <h5>${_('Reset Your Password')}</h5>
 
        %endif
 
    </div>
 
    <div class="panel-body">
 
        ${h.form(h.url('reset_password_confirmation'), method='post')}
 
        <p>${_('You are about to set a new password for the email address %s.') % c.email}</p>
 
        <p>${_('Note that you must use the same browser session for this as the one used to request the password reset.')}</p>
 
@@ -43,12 +46,15 @@
 
                    </div>
 
                </div>
 

	
 
                <div class="form-group">
 
                    <div class="buttons">
 
                        ${h.submit('send',_('Confirm'),class_="btn btn-default")}
 
                    </div>
 
                </div>
 
        </div>
 
        ${h.end_form()}
 
    </div>
 
   </div>
 
</div>
 
</div>
 
</div>
kallithea/templates/register.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="base/root.html"/>
 

	
 
<%block name="title">
 
    ${_('Sign Up')}
 
</%block>
 

	
 
<%include file="/base/flash_msg.html"/>
 

	
 
<div class="container">
 
<div class="row">
 
<div class="centered-column">
 
<div id="register" class="panel panel-primary">
 
    <div class="panel-heading">
 
        %if c.site_name:
 
            <h5>${_('Sign Up to %s') % c.site_name}</h5>
 
        %else:
 
            <h5>${_('Sign Up')}</h5>
 
        %endif
 
    </div>
 
    <div class="panel-body">
 
        ${h.form(url('register'))}
 
        <div class="form">
 
                <div class="form-group">
 
@@ -91,12 +94,15 @@
 

	
 
            %if c.captcha_active:
 
            Recaptcha.create(${h.js(c.captcha_public_key)}, "recaptcha",
 
                {
 
                  theme: "white"
 
                }
 
            );
 
            %endif
 
        });
 
        </script>
 
    </div>
 
 </div>
 
 </div>
 
 </div>
 
 </div>
0 comments (0 inline, 0 general)