Skip to content

Commit

Permalink
Clean up the registration and log in left side.
Browse files Browse the repository at this point in the history
This cleans up the left side of the split view to have better
font size management and styling.
  • Loading branch information
Brock Whittaker committed May 12, 2017
1 parent 6e7305f commit df87b4c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 6 deletions.
5 changes: 4 additions & 1 deletion static/js/dynamic_text.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ var DynamicText = (function () {

// reset the font-size to inherit the parent's size; 1em.
node.style.fontSize = "1em";
parent.style.opacity = 0;

var width = {
node: node.offsetWidth,
Expand All @@ -47,10 +48,12 @@ var DynamicText = (function () {
// if the width is larger than the parent, resize by the ratio of
// the parent's width to the node's width.
if (width.node > width.parent) {
node.style.fontSize = (width.parent / width.node) + "em";
node.style.fontSize = (width.parent * 0.995 / width.node) + "em";
} else {
node.style.fontSize = "1em";
}

parent.style.opacity = 1;
},
};

Expand Down
6 changes: 6 additions & 0 deletions static/js/portico/signup.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,10 @@ $(function () {
errorClass: "text-error",
wrapper: "div",
});

var $organization_name = $(".organization-name");

if ($organization_name.length > 0) {
DynamicText($organization_name);
}
});
19 changes: 14 additions & 5 deletions static/styles/portico-signin.css
Original file line number Diff line number Diff line change
Expand Up @@ -480,16 +480,18 @@ html {
display: inline-block;
vertical-align: top;

width: 100px;
height: 100px;
width: 75px;
height: 75px;

box-shadow: 0px 0px 10px rgba(0,0,0,0.1);

background-size: 100% auto;
}

.split-view .org-header .info-box {
display: inline-block;
position: relative;
margin: 15px 0px 0px 20px;
margin: 0px 0px 0px 10px;
width: calc(100% - 125px);

/* full width minus the avatar + padding + borders */
Expand All @@ -505,15 +507,17 @@ html {
}

.split-view .info-box .organization-name {
font-size: 1.5em;
font-size: 2.5em;
font-weight: 300;
line-height: 1;

opacity: 0;
}

.split-view .info-box .organization-path {
font-weight: 500;
color: #aaa;
margin-top: 10px;
margin-top: 5px;
}

.new-style .lead {
Expand Down Expand Up @@ -696,11 +700,16 @@ button.login-google-button {
.split-view .left-side .description {
text-align: left;
font-weight: normal;
font-size: 0.95em;

margin-top: 20px;
margin-right: 10px;
}

.split-view .left-side .description li {
line-height: normal;
}

@media (max-width: 950px) {
.split-view .left-side {
width: 400px;
Expand Down
1 change: 1 addition & 0 deletions zproject/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,7 @@ def get_secret(key):
},
'signup': {
'source_filenames': [
'js/dynamic_text.js',
'js/portico/signup.js',
'node_modules/jquery-validation/dist/jquery.validate.js',
],
Expand Down

0 comments on commit df87b4c

Please sign in to comment.