Commit 46f3fd1e authored by Evonne Cheung's avatar Evonne Cheung Committed by Robert Lyon
Browse files

Design update



Change-Id: If769d9825305fe40acc97f047a94425baa549bf9
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 9139f521
......@@ -91,9 +91,9 @@ function get_bar_graph_json($data, $colours = null, $cron = false) {
$x = 0;
$graphdata['labels'] = $data['labels'];
foreach ($data['data'] as $key => $value) {
$dataobj['fillColor'] = "rgba(" . $data['colours'][$x] . ",0.5)";
$dataobj['strokeColor'] = "rgba(" . $data['colours'][$x] . ",0.8)";
$dataobj['highlightFill'] = "rgba(" . $data['colours'][$x] . ",0.75)";
$dataobj['fillColor'] = "rgba(" . $data['colours'][$x] . ",0.75)";
$dataobj['strokeColor'] = "rgba(" . $data['colours'][$x] . ",1)";
$dataobj['highlightFill'] = "rgba(" . $data['colours'][$x] . ",0.95)";
$dataobj['highlightStroke'] = "rgba(" . $data['colours'][$x] . ",1)";
$dataobj['label'] = !empty($data['labellang']) ? get_string($key, $data['labellang']) : $key;
$dataobj['data'] = is_array($value) ? array_values($value) : array($value);
......@@ -159,7 +159,7 @@ function get_line_graph_json($data, $colours = null, $cron = false) {
function get_graph_colours($data, $colours = null) {
// Using colours in rgb format to allow for the use of rgba colours in Chart.js
// 10 defaults: Red, Green, Blue, Yellow, Sky blue, Magenta, Orange, Light blue, Grey, Purple
$defaultcolours = ['255,0,0','0,255,0','0,0,255','255,255,0','0,255,255','255,0,255','255,128,0','0,128,255','128,128,128','128,0,255'];
$defaultcolours = ['187,35,39','59,140,46','61,132,203','227,171,0','0,74,136','139,62,138','220,109,10','29,183,197','116,116,116','62,35,110'];
// We try to set colours in this order:
// passed in by user overides
......
// Generic custom css (anything longer than a screen view should have its own component file)
.blocktype-radio {
display: none;
}
.login {
.form-group.button,
.form-group.submit {
padding-top: 10px;
}
.form-group .errmsg {
margin-left: 0;
}
}
\ No newline at end of file
......@@ -135,10 +135,8 @@ h4.list-group-item-heading {
border-width: 1px 0;
border-radius: 0;
}
&:last-child .list-group-item:last-child{
&:last-child .list-group-item:last-child {
border-bottom: 0;
border-bottom-right-radius: 3px;
border-bottom-left-radius: 3px;
}
}
......@@ -147,3 +145,6 @@ h4.list-group-item-heading {
.panel-heading + .block > .list-group .list-group-item:first-child {
border-top-width: 0;
}
.panel-default .list-group .list-group-item:last-child {
border-bottom-width: 0;
}
$logged-in-height: 200px;
$logged-in-height-mobile: 120px;
$logged-in-height-mobile: 125px;
.dashboard-widget-container {
......@@ -68,7 +68,7 @@ $logged-in-height-mobile: 120px;
font-size: 72px;
@media (max-width: $screen-sm-min ) {
font-size: 50px;
font-size: 60px;
}
&.icon-user {
......@@ -124,7 +124,7 @@ $logged-in-height-mobile: 120px;
overflow:hidden;
@media (max-width: $screen-sm-min) {
height: auto;
height: $logged-in-height-mobile;
}
.widget-detail {
......@@ -139,20 +139,27 @@ $logged-in-height-mobile: 120px;
height: $logged-in-height;
width: $logged-in-height;
border-radius: 50%;
@media (max-width: $screen-sm-min) {
margin-top: -$logged-in-height-mobile * 2;
height: $logged-in-height-mobile;
width: $logged-in-height-mobile;
padding: 0;
}
p {
margin-top: 0;
color: #fff;
display: table-cell;
vertical-align: middle;
height: 200px;
height: $logged-in-height;
@media (max-width: $screen-sm-min) {
height: $logged-in-height-mobile;
font-size: 11px;
padding-left: 10px;
padding-right: 10px;
}
}
}
}
......@@ -170,10 +177,6 @@ $logged-in-height-mobile: 120px;
@media (max-width: $screen-sm-min) {
margin-top: -$logged-in-height-mobile;
p {
color: $link-color;
}
}
}
}
......
......@@ -18,29 +18,76 @@
@for $i from 1 through 5 {
.header.message-count-#{$i} {
top: 30px * $i;
top: 33px * $i;
+ .main-nav {
margin-top: $i * 30px;
margin-top: $i * 33px;
}
@media (max-width: $screen-sm-min) {
top: 0;
+ .main-nav {
margin-top: 0;
}
}
~ .container {
.toolbar-affix.affix {
margin-top: $i * 30px;
margin-top: $i * 33px;
}
@media (max-width: $screen-sm-min) {
margin-top: 0;
}
}
@media (max-width: $screen-sm-min) {
top: 0;
+ .main-nav {
+ .container {
// if container is directly after header, then it will need a margin and push down for any site messages
margin-top: ($i * 33px) + 125px;
@media (max-width: $screen-md-min) {
margin-top: ($i * 33px) + 115px;
}
@media (max-width: $screen-sm-min) {
margin-top: 0;
}
}
&.no-nav {
+ .container {
// if not logged in
margin-top: ($i * 33px) + 65px;
@media (max-width: $screen-sm-min) {
margin-top: 0;
}
}
&.static-nav {
+ .container {
// if not logged in
margin-top: ($i * 33px) + 65px;
~ .container {
.toolbar-affix.affix {
margin-top: 0;
@media (max-width: $screen-sm-min) {
margin-top: 0;
}
}
}
}
&.static-nav + .container {
// if main nav has dropdown turned off
margin-top: ($i * 33px) + 157px;
@media (max-width: $screen-md-min) {
margin-top: ($i * 33px) + 147px;
}
@media (max-width: $screen-sm-min) {
margin-top: 0;
}
}
}
}
......
.footer {
max-width: 100%;
width: 100%;
background: #f1f1f1;
padding: 0;
margin: 0;
text-align: center;
.footer-nav {
font-size: $font-size-small;
}
......@@ -10,12 +16,57 @@
.footer-inner {
margin-bottom: 15px;
margin-top: 15px;
margin-left: auto;
margin-right: auto;
padding-left: 15px;
padding-right: 15px;
max-width: ($screen-lg - 30px);
.pull-left.prl {
float: none !important;
display: inline-block;
}
.footer-nav {
float: none !important;
display: inline-block;
> li {
float: none;
display: inline-block;
> a {
display: inline-block;
&:hover {
background-color: #FFFFFF;
}
}
}
}
@media (max-width: $screen-lg) {
max-width: ($screen-md - 30px);
}
@media (max-width: $screen-md) {
max-width: ($screen-sm - 30px);
}
@media (max-width: $screen-sm) {
max-width: ($screen-sm - 30px);
.pull-left a img {
display: none;
}
}
.admin & {
border-radius: $border-radius-base;
padding: 10px;
background: #FCFCFC;
border: 1px solid #ddd;
}
}
}
.header {
top: 30px;
background-image: url(../images/header-bkgd.png);
background-repeat: repeat-x;
background-position: left top;
height: 124px;
@media (max-width: $screen-sm-min) {
top: 0;
}
.site-logo{
padding-top: 3px;
float: left;
padding-left: 5px;
margin-bottom: 10px;
margin-top: 0;
@media (min-width: 768px) {
top: 0;
margin-top: 8px;
@media (max-width: $screen-md-min) {
margin-top: 0;
}
a {
float:left;
@media (max-width: $screen-xs-min) {
width: 23px;
overflow-x: hidden;
}
}
img {
max-height: 45px;
@media (max-width: $screen-xs-min) {
width: 150px;
max-width: 150px;
......@@ -47,9 +42,11 @@
margin-left: 25px;
font-family: $font-family-serif;
font-size: $font-size-large;
margin-top: 8px;
@media (min-width: 768px) {
display: inline-block;
margin-top: 0;
}
a {
color: $mahara-green;
......@@ -63,16 +60,4 @@
}
}
+ .container {
// if container is directly after header, then it will need a margin
margin-top: 75px;
@media (max-width: $screen-sm-min) {
margin-top: -20px;
}
h1 {
padding-top: 10px;
}
}
}
......@@ -4,17 +4,9 @@
body {
max-width:100%;
overflow-x:hidden;
@media (min-width: 768px) {
padding-top: 65px; // Move down content because we have a fixed navbar on desktop/tablet that is 65px tall
}
&.admin {
background-color: lighten($brand-default, 5%);
@media (max-width: $screen-sm-min) {
.container {
margin-top: 20px;
}
}
}
.main {
margin: 0px 0 20px;
......
.profile-block.panel-heading {
fonf-family: $headings-font-family;
padding:0;
background: $mahara-green;
color: $mahara-green;
.panel-default > .profile-block.panel-heading {
padding: 0;
min-height: 80px;
.username {
padding: 10px 75px 10px 15px;
......@@ -28,10 +26,12 @@
}
}
a {
color: #FFFFFF;
&:after {
@include transition(opacity 0.5s);
@include fa-icon();
border-radius: 3px;
border-radius: 30px;
bottom: 0px;
background: darken(#f5f5f5, 1%);
color: #333;
......@@ -46,9 +46,14 @@
}
}
.user-panel {
> .panel-default {
border: 0;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
.panel .list-group {
border: 0;
}
}
\ No newline at end of file
......@@ -3,18 +3,18 @@
*/
.main-nav {
padding-top: 30px;
border-bottom: 1px solid #dcdcdc;
@media (max-width: $screen-sm-min) {
padding-top: 0;
border-bottom: 0;
}
&.dropdown-adminnav {
background: none;
.nav > .active > a,
.nav > .active > a:hover,
.nav > .active > a:focus {
background-color: #f9f9f9;
.nav > li > a {
padding: 10px 15px;
}
}
......@@ -72,12 +72,12 @@
.nav > li > a {
border-top:1px solid darken($navbar-inverse-bg, 2%);
border-bottom:1px solid lighten($navbar-inverse-bg, 2%);
padding: 10px 29px;
padding: 10px 20px;
line-height: 20px;
font-weight:normal;
@media (min-width: $screen-sm-min) {
border:none;
padding: 10px 29px;
padding: 10px 20px;
}
@media (min-width: $screen-sm-min) and (max-width: $screen-md-min - 1) {
padding: 15px 10px;
......@@ -93,12 +93,12 @@
min-width: 200px;
max-width: 100%;
overflow: hidden;
padding: 15px 17px;
padding: 0;
li {
display: block;
a { //styles that need to override bootstrap specificity
padding: 10px;
padding: 10px 20px;
font-weight: normal;
&:hover, &:focus {
text-decoration:none;
......@@ -156,7 +156,7 @@
z-index: $zindex-dropdown;
display: none; // none by default, but block on "open" of the menu
float: left;
padding: 5px 0;
padding: 0;
margin: 0 0 0 -1px; // override default ul
list-style: none;
font-size: $font-size-base;
......@@ -169,20 +169,22 @@
background-clip: padding-box;
// Links within the dropdown menu
> li a {
padding: 3px 20px;
> li a {
padding: 9px 15px;
clear: both;
font-weight: normal;
line-height: $line-height-base;
white-space: nowrap; // prevent links from randomly breaking onto new lines
}
> li > a {
color: $dropdown-link-color;
}
.dropdown-tertiary {
padding:0;
margin: 0;
font-size: $font-size-base - 2;
font-size: $font-size-base - 1;
> li a {
padding: 6px 15px 6px 25px;
}
}
}
}
......
.minor-nav {
background-color: #FFFFFF;
border-radius: 0;
margin-top:-1px; //overlay bottom border of main nav
border-top:0;
border-left: 0;
border-right: 0;
min-height: 26px;
.nav {
margin:7px 15px 7px 0;
margin: 3px 15px 3px 5px;
>li {
margin: 3px 0 3px 3px;
margin: 0 5px 0 0;
>a {
font-size: 13px;
padding: 3px 5px;
......
......@@ -3,6 +3,16 @@
li > a {
padding: 8px 10px;
font-size: $font-size-small + 1;
background-color: lighten(#f0f5ea, 2%);
border-bottom: 1px solid #dddddd;
&:hover {
color: darken($mahara-green, 5%);
}
}
.active > a {
background-color: #FFFFFF;
border-bottom: 1px solid #FFFFFF;
}
}
}
......
/*
* Modificatiosn to bootstraps default navbar components
*/
.navbar {
margin-bottom: 0;
}
.navbar.header {
margin-bottom:0;
......@@ -36,9 +39,11 @@ body:not(.admin) .navbar.minor-nav {
padding-right: 0;
clear: right;
margin-top: 0;
border: 0;
@media (min-width: $screen-xs-min) and (max-width: $screen-md-min) {
clear: none;
margin-top: 8px;
}
@media (max-width: $screen-sm-min - 1) {
......@@ -50,9 +55,6 @@ body:not(.admin) .navbar.minor-nav {
margin: 0 auto;
}
}
@media (min-width: $screen-sm-min) {
@include transition-duration(0.3s);
}
input[type=submit] {
display: none !important; // temp
}
......@@ -101,9 +103,13 @@ body:not(.admin) .navbar.minor-nav {
}
}
.navbar-default .navbar-brand {
height: auto;
line-height: 20px;
color: $mahara-green;
font-size: 13px;
.navbar-default {
background-color: transparent;
.nav-brand {
height: auto;
line-height: 20px;
color: $mahara-green;
font-size: 13px;
}
}
\ No newline at end of file
......@@ -4,7 +4,6 @@
padding: 0 10px;
@media (min-width: $screen-sm-min) {
margin-top: 0;
clear:none;
float:none;
margin-right: 0;
......