Commit d3adae31 authored by Lisa Wood's avatar Lisa Wood Committed by Robert Lyon

Design change to modern theme by Lisa

Change-Id: I77f74c99e963551ade1621717c33d13a2567d21e
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 71f286e7
......@@ -29,7 +29,8 @@ mahara-*.zip
/debian/mahara-apache2.postrm.debhelper
/debian/mahara-apache2.substvars
/debian/mahara-apache2
.DS_Store
*.DS_Store
.__*
/external
logfile
node_modules/
// Include gulp
var gulp = require('gulp');
// Include Our Plugins
// Polyfill so we don't need >= node 0.12
require('es6-promise').polyfill();
// Include plugins
var sass = require('gulp-sass');
var postcss = require('gulp-postcss');
var path = require('path');
var minifyCSS = require('gulp-minify-css');
var autoprefixer = require('autoprefixer-core');
var autoprefixer = require('gulp-autoprefixer');
var bless = require('gulp-bless');
// Turn sass into css
// Turn sass into css, prefix, minify and bless
gulp.task('sass', function () {
return gulp.src('sass/**/*.scss')
.pipe(sass({
paths: [ path.join(__dirname, 'sass', 'includes') ]
.pipe(sass().on('error', sass.logError))
.pipe(autoprefixer({
browsers: ['last 4 version'],
cascade: false
}))
.on('error', function(err){
console.log(err); // catch and log the error, don't kill the process
this.emit('end');
})
.pipe(gulp.dest('style/'));
});
// Prefix and minify css files
// this will first run the 'sass' task above, then this one
gulp.task('css', ['sass'], function () {
return gulp.src('style/*.css')
.pipe(postcss([ autoprefixer({ browsers: ['last 4 version'] }) ]))
.on('error', function(err){
console.log(err); // catch and log the error, don't kill the process
this.emit('end');
})
.pipe(minifyCSS())
.pipe(bless())
.pipe(gulp.dest('style/'));
});
// Watch Files For Changes
// Watch files for changes
gulp.task('watch', function() {
gulp.watch(['sass/**/*.scss', '../raw/sass/**/*.scss'], ['css']);
gulp.watch('sass/**/*.scss', ['sass']);
});
// Default Task
gulp.task('default', ['watch']);
// Default task (recompile on init before watching)
gulp.task('default', ['sass', 'watch']);
{
"name": "mysubthemename",
"name": "Modern",
"version": "1.0.0",
"description": "Mahara's mysubthemename theme",
"description": "",
"main": "gulpfile.js",
"dependencies": {
"es6-promise": "^3.0.2",
"gulp": "^3.9.0",
"gulp-postcss": "^5.1.8",
"gulp-autoprefixer": "^3.0.1",
"gulp-bless": "^3.0.1",
"gulp-minify-css": "^1.1.6",
"autoprefixer-core": "^5.2.0",
"gulp-sass": "^2.0.1",
"path": "^0.11.14"
"gulp-sass": "^2.0.1"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
}
......
......@@ -5,11 +5,17 @@
}
}
.nav-inpage.nav {
li > a {
color: #FFF;
&:hover {
li {
a {
color: #FFF;
background-color: $theme-secondary-color;
&:hover {
color: #FFF;
background-color: $theme-secondary-color;
}
}
&.active a {
background-color: #FFF;
color: #333;
}
}
}
......
//adjust header and fixed elements for sitemessages
@for $i from 1 through 5 {
.header.message-count-#{$i} {
+ .main-nav {
@media (max-width: $screen-sm-min) {
margin-top: $i * 0px !important;
}
}
}
}
.user-icon {
border: none;
padding: 0;
background: none;
img {
border-radius: 50%;
border: 2px solid #FFF;
}
a.user-icon {
border: none;
padding: 0;
background: none;
img {
border-radius: 50%;
border: 0px solid #FFF;
}
&:hover {
background-color: transparent;
}
}
\ No newline at end of file
......@@ -19,4 +19,4 @@ form#filter {
margin-right: 4px;
border-radius: 4px;
}
}
\ No newline at end of file
}
/*
* Non-bootstrap column layout. Used by the page builder
*/
.column {
&.editing {
}
}
......@@ -8,11 +8,14 @@ header {
}
.admin-title {
padding: 5px 10px;
margin-top: 24px;
padding: 2px 8px;
margin-top: 12px;
height: auto;
background-color: $state-info-bg;
background-color: darken($brand-secondary, 10%);
border-radius: 3px;
a{
color: #FFF;
}
&:before,
&:after {
display: none;
......
......@@ -22,33 +22,36 @@
@media (max-width: 768px) {
.navbar-default .navbar-toggle {
border-color: transparent;
background-color: lighten($theme-primary-color, 1%);
color: #FFF;
&:hover {
background-color: lighten($theme-primary-color, 3%);
.navbar-inverse {
.navbar-toggle, {
border-color: transparent;
background-color: lighten($theme-primary-color, 1%);
color: #FFF;
&:hover {
background-color: lighten($theme-primary-color, 3%);
}
}
}
.navbar-showchildren:focus,
.navbar-showchildren:hover {
background: none;
}
.main-nav {
margin-top: 0;
li > a {
border-bottom-color: darken($theme-primary-color, 10%);
.navbar-showchildren:focus,
.navbar-showchildren:hover {
background: none;
}
.child-nav {
background-color: darken($theme-primary-color, 5%);
a {
color: lighten($theme-primary-color, 60%);
.main-nav {
margin-top: 0;
li > a {
border-bottom-color: darken($theme-primary-color, 10%);
}
.active > a {
color: #FFF;
background-color: darken($theme-primary-color, 8%);
.child-nav {
background-color: darken($theme-primary-color, 5%);
a {
color: lighten($theme-primary-color, 60%);
}
.active > a {
color: #FFF;
background-color: darken($theme-primary-color, 8%);
}
}
}
}
}
......@@ -8,11 +8,17 @@
* This file is licensed under the same terms as Mahara itself
*/
// Import theme based variables (colors, fonts, padding, etc)
@import "utilities/theme-variables"; // Import our brand variables
@import "utilities/bootstrap-variables"; // ...and our custom bootstrap variables file
@import "utilities/custom-variables"; // ...and our custom variables file
// Import raw default variables (colors, fonts, padding, etc)
@import "../../raw/sass/utilities/theme-variables";
@import "../../raw/sass/utilities/bootstrap-variables";
@import "../../raw/sass/utilities/custom-variables";
@import "../../raw/sass/utilities/bootstrap-index"; // bootstrap scss dependency file
@import "../../raw/sass/utilities/index"; // raw sass files (if you want heavier customisation you can copy this file and replace partials with your own sass)
......
// When true, asset path helpers are used, otherwise the regular CSS `url()` is used.
// When there no function is defined, `fn('')` is parsed as string that equals the right hand side
// NB: in Sass 3.3 there is a native function: function-exists(twbs-font-path)
$bootstrap-sass-asset-helper: (twbs-font-path("") != unquote('twbs-font-path("")')) !default;
$bootstrap-sass-asset-helper: (twbs-font-path("") != unquote('twbs-font-path("")'));
//
// Variables
......@@ -12,42 +12,42 @@ $bootstrap-sass-asset-helper: (twbs-font-path("") != unquote('twbs-font-path("")
//
//## Gray and brand colors for use across Bootstrap.
$gray-base: #000 !default;
$gray-darker: lighten($gray-base, 13.5%) !default; // #222
$gray-dark: lighten($gray-base, 20%) !default; // #333
$gray: lighten($gray-base, 33.5%) !default; // #555
$gray-light: lighten($gray-base, 46.7%) !default; // #777
$gray-lighter: lighten($gray-base, 93.5%) !default; // #eee
$gray-base: #000;
$gray-darker: lighten($gray-base, 13.5%); // #222
$gray-dark: lighten($gray-base, 20%); // #333
$gray: lighten($gray-base, 33.5%); // #555
$gray-light: lighten($gray-base, 46.7%); // #777
$gray-lighter: lighten($gray-base, 93.5%); // #eee
$brand-default: #ECECEC !default;
$brand-primary: $theme-primary-color !default;
$brand-secondary: $theme-secondary-color !default;
$brand-success: #8DC129 !default;
$brand-info: #5bc0de !default;
$brand-warning: #f0ad4e !default;
$brand-danger: #d9534f !default;
$brand-default: #ECECEC;
$brand-primary: $theme-primary-color ;
$brand-secondary: $theme-secondary-color;
$brand-success: #8DC129;
$brand-info: #5bc0de;
$brand-warning: #f0ad4e;
$brand-danger: #d9534f;
//== Form states and alerts
//
//## Define colors for form feedback states and, by default, alerts.
$state-success-text: #FFFFFF !default;
$state-success-bg: $brand-success !default;
$state-success-border: $brand-success !default;
$state-success-text: #FFFFFF;
$state-success-bg: $brand-success;
$state-success-border: $brand-success;
$state-info-text: #FFFFFF !default;
$state-info-bg: #3498CA !default;
$state-info-border: #3498CA !default;
$state-info-text: #FFFFFF;
$state-info-bg: #3498CA;
$state-info-border: #3498CA;
$state-warning-text: #8a6d3b !default;
$state-warning-bg: #F3D840 !default;
$state-warning-border: $state-warning-bg !default;
$state-warning-text: #8a6d3b;
$state-warning-bg: #F3D840;
$state-warning-border: $state-warning-bg;
$state-danger-text: #FFFFFF !default;
$state-danger-bg: #CF2C33 !default;
$state-danger-border: #CF2C33 !default;
$state-danger-text: #FFFFFF;
$state-danger-bg: #CF2C33;
$state-danger-border: #CF2C33;
//== Scaffolding
......@@ -55,7 +55,7 @@ $state-danger-border: #CF2C33 !default;
//## Settings for some of the most global styles.
//** Background color for `<body>`.
// $body-bg: #fff !default;
// $body-bg: #fff;
$body-bg: #fff;
//** Global text color on `<body>`.
$text-color: $theme-text-color;
......@@ -65,40 +65,40 @@ $link-color: #4DB1D6;
//** Link hover color set via `darken()` or `lighten()` function.
$link-hover-color: darken($link-color, 5%);
//** Link hover decoration.
$link-hover-decoration: underline !default;
$link-hover-decoration: underline;
//== Typography
//
//## Font, line-height, and color for body text, headings, and more.
$font-family-sans-serif: 'Raleway', "Helvetica Neue", Helvetica, Arial, sans-serif !default;
$font-family-sans-serif: 'Raleway', "Helvetica Neue", Helvetica, Arial, sans-serif;
// $font-family-sans-serif: Arial,"Nimbus Sans L", Helvetica,sans-serif;
$font-family-serif: 'Raleway', "Helvetica Neue", Helvetica, Arial, sans-serif !default;
$font-family-serif: 'Raleway', "Helvetica Neue", Helvetica, Arial, sans-serif;
//** Default monospace fonts for `<code>`, `<kbd>`, and `<pre>`.
$font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace !default;
$font-family-base: $font-family-sans-serif !default;
$font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace;
$font-family-base: $font-family-sans-serif;
$font-size-base: 14px !default;
$font-size-large: ceil(($font-size-base * 1.25)) !default; // ~18px
$font-size-small: ceil(($font-size-base * 0.85)) !default; // ~12px
$font-size-base: 14px;
$font-size-large: ceil(($font-size-base * 1.25)); // ~18px
$font-size-small: ceil(($font-size-base * 0.85)); // ~12px
$font-size-h1: floor(($font-size-base * 2.15)) !default; // ~36px
$font-size-h2: floor(($font-size-base * 1.7)) !default; // ~30px
$font-size-h3: ceil(($font-size-base * 1.5)) !default; // ~24px
$font-size-h4: ceil(($font-size-base * 1.25)) !default; // ~18px
$font-size-h5: $font-size-base !default;
$font-size-h6: ceil(($font-size-base * 0.85)) !default; // ~12px
$font-size-h1: floor(($font-size-base * 2.15)); // ~36px
$font-size-h2: floor(($font-size-base * 1.7)); // ~30px
$font-size-h3: ceil(($font-size-base * 1.5)); // ~24px
$font-size-h4: ceil(($font-size-base * 1.25)); // ~18px
$font-size-h5: $font-size-base;
$font-size-h6: ceil(($font-size-base * 0.85)); // ~12px
//** Unit-less `line-height` for use in components like buttons.
$line-height-base: 1.5 !default; // 20/14
$line-height-base: 1.5; // 20/14
//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
$line-height-computed: floor(($font-size-base * $line-height-base)) !default; // ~20px
$line-height-computed: floor(($font-size-base * $line-height-base)); // ~20px
//** By default, this inherits from the `<body>`.
$headings-font-family: $font-family-sans-serif !default;
$headings-font-weight: 600 !default;
$headings-line-height: 1.3 !default;
$headings-font-family: $font-family-sans-serif;
$headings-font-weight: 600;
$headings-line-height: 1.3;
$headings-color: rgb(51, 51, 51);
......@@ -109,46 +109,46 @@ $headings-color: rgb(51, 51, 51);
//** Load fonts from this directory.
// [converter] Asset helpers such as Sprockets and Node.js Mincer do not resolve relative paths
$icon-font-path: if($bootstrap-sass-asset-helper, "bootstrap/", "../fonts/bootstrap/") !default;
$icon-font-path: if($bootstrap-sass-asset-helper, "bootstrap/", "../fonts/bootstrap/");
//** File name for all font files.
$icon-font-name: "glyphicons-halflings-regular" !default;
$icon-font-name: "glyphicons-halflings-regular";
//** Element ID within SVG icon file.
$icon-font-svg-id: "glyphicons_halflingsregular" !default;
$icon-font-svg-id: "glyphicons_halflingsregular";
//== Components
//
//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
$padding-base-vertical: 6px !default;
$padding-base-horizontal: 12px !default;
$padding-base-vertical: 6px;
$padding-base-horizontal: 12px;
$padding-large-vertical: 10px !default;
$padding-large-horizontal: 16px !default;
$padding-large-vertical: 10px;
$padding-large-horizontal: 16px;
$padding-small-vertical: 2.3px !default;
$padding-small-horizontal: 10px !default;
$padding-small-vertical: 2.3px;
$padding-small-horizontal: 10px;
$padding-xs-vertical: 1px !default;
$padding-xs-horizontal: 7px !default;
$padding-xs-vertical: 1px;
$padding-xs-horizontal: 7px;
$line-height-large: 1.33 !default;
$line-height-small: 1.5 !default;
$line-height-large: 1.33;
$line-height-small: 1.5;
$border-radius-base: 2px !default;
$border-radius-large: 4px !default;
$border-radius-small: 3px !default;
$border-radius-base: 2px;
$border-radius-large: 4px;
$border-radius-small: 3px;
//** Global color for active items (e.g., navs or dropdowns).
$component-active-color: #fff !default;
$component-active-color: #fff;
//** Global background color for active items (e.g., navs or dropdowns).
$component-active-bg: $brand-primary !default;
$component-active-bg: $brand-primary;
//** Width of the `border` for generating carets that indicator dropdowns.
$caret-width-base: 4px !default;
$caret-width-base: 4px;
//** Carets increase slightly in size for larger components.
$caret-width-large: 5px !default;
$caret-width-large: 5px;
//== Tables
......@@ -156,53 +156,53 @@ $caret-width-large: 5px !default;
//## Customizes the `.table` component with basic values, each used across all table variations.
//** Padding for `<th>`s and `<td>`s.
$table-cell-padding: 8px !default;
$table-cell-padding: 8px;
//** Padding for cells in `.table-condensed`.
$table-condensed-cell-padding: 5px !default;
$table-condensed-cell-padding: 5px;
//** Default background color used for all tables.
$table-bg: transparent !default;
$table-bg: transparent;
//** Background color used for `.table-striped`.
$table-bg-accent: #f9f9f9 !default;
$table-bg-accent: #f9f9f9;
//** Background color used for `.table-hover`.
$table-bg-hover: #f5f5f5 !default;
$table-bg-active: $table-bg-hover !default;
$table-bg-hover: #f5f5f5;
$table-bg-active: $table-bg-hover;
//** Border color for table and cell borders.
$table-border-color: #ddd !default;
$table-border-color: #ddd;
//== Buttons
//
//## For each of Bootstrap's buttons, define text, background and border color.
$btn-font-weight: normal !default;
$btn-font-weight: normal;
$btn-default-color: #374757 !default;
$btn-default-bg: #e8eaec !default;
$btn-default-border: #caced3 !default;
$btn-default-color: #374757;
$btn-default-bg: #e8eaec;
$btn-default-border: #caced3;
$btn-primary-color: #fff !default;
$btn-primary-bg: $brand-primary !default;
$btn-primary-border: darken($btn-primary-bg, 8%) !default;
$btn-primary-color: #fff;
$btn-primary-bg: $brand-primary;
$btn-primary-border: darken($btn-primary-bg, 8%);
$btn-success-color: #fff !default;
$btn-success-bg: $brand-primary !default;
$btn-success-border: darken($btn-success-bg, 5%) !default;
$btn-success-color: #fff;
$btn-success-bg: $brand-primary;
$btn-success-border: darken($btn-success-bg, 5%);
$btn-info-color: $state-info-text !default;
$btn-info-bg: $state-info-bg !default;
$btn-info-border: darken($btn-info-bg, 5%) !default;
$btn-info-color: $state-info-text;
$btn-info-bg: $state-info-bg;
$btn-info-border: darken($btn-info-bg, 5%);
$btn-warning-color: $state-warning-text !default;
$btn-warning-bg: $state-warning-bg !default;
$btn-warning-border: darken($btn-warning-bg, 15%) !default;
$btn-warning-color: $state-warning-text;
$btn-warning-bg: $state-warning-bg;
$btn-warning-border: darken($btn-warning-bg, 15%);
$btn-danger-color: #fff !default;
$btn-danger-bg: $brand-danger !default;
$btn-danger-border: darken($btn-danger-bg, 5%) !default;
$btn-danger-color: #fff;
$btn-danger-bg: $brand-danger;
$btn-danger-border: darken($btn-danger-bg, 5%);
$btn-link-disabled-color: $gray-light !default;
$btn-link-disabled-color: $gray-light;
//== Forms
......@@ -210,47 +210,47 @@ $btn-link-disabled-color: $gray-light !default;
//##
//** `<input>` background color
$input-bg: #fff !default;
$input-bg: #fff;
//** `<input disabled>` background color
$input-bg-disabled: $gray-lighter !default;
$input-bg-disabled: $gray-lighter;
//** Text color for `<input>`s
$input-color: $gray !default;
$input-color: $gray;
//** `<input>` border color
$input-border: #ccc !default;
$input-border: #ccc;
// TODO: Rename `$input-border-radius` to `$input-border-radius-base` in v4
//** Default `.form-control` border radius
$input-border-radius: $border-radius-base !default;
$input-border-radius: $border-radius-base;
//** Large `.form-control` border radius
$input-border-radius-large: $border-radius-large !default;
$input-border-radius-large: $border-radius-large;
//** Small `.form-control` border radius
$input-border-radius-small: $border-radius-small !default;
$input-border-radius-small: $border-radius-small;
//** Border color for inputs on focus
$input-border-focus: $brand-secondary !default;
$input-border-focus: $brand-secondary;
$input-bg-focus: lighten($brand-secondary, 60%);
//** Placeholder text color
$input-color-placeholder: #999 !default;
$input-color-placeholder: #999;
//** Default `.form-control` height
$input-height-base: ($line-height-computed + ($padding-base-vertical * 2) + 2) !default;
$input-height-base: ($line-height-computed + ($padding-base-vertical * 2) + 2);
//** Large `.form-control` height
$input-height-large: (ceil($font-size-large * $line-height-large) + ($padding-large-vertical * 2) - 4) !default;
$input-height-large: (ceil($font-size-large * $line-height-large) + ($padding-large-vertical * 2) - 4);
//** Small `.form-control` height
$input-height-small: (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 5) !default;
$input-height-small: (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 5);
$legend-color: $gray-dark !default;
$legend-border-color: #e5e5e5 !default;
$legend-color: $gray-dark;
$legend-border-color: #e5e5e5;
//** Background color for textual input addons
$input-group-addon-bg: $gray-lighter !default;
$input-group-addon-bg: $gray-lighter;
//** Border color for textual input addons
$input-group-addon-border-color: $input-border !default;
$input-group-addon-border-color: $input-border;
//** Disabled cursor for form controls and buttons.
$cursor-disabled: not-allowed !default;
$cursor-disabled: not-allowed;
//== Dropdowns
......@@ -258,34 +258,34 @@ $cursor-disabled: not-allowed !default;
//## Dropdown menu container and contents.
//** Background for the dropdown menu.
$dropdown-bg: #fff !default;
$dropdown-bg: #fff;
//** Dropdown menu `border-color`.
$dropdown-border: rgba(0,0,0,.15) !default;
$dropdown-border: rgba(0,0,0,.15);
//** Dropdown menu `border-color` **for IE8**.
$dropdown-fallback-border: #ccc !default;
$dropdown-fallback-border: #ccc;
//** Divider color for between dropdown items.
$dropdown-divider-bg: #e5e5e5 !default;
$dropdown-divider-bg: #e5e5e5;
//** Dropdown link text color.
$dropdown-link-color: $gray-dark !default;
$dropdown-link-color: $gray-dark;
//** Hover color for dropdown links.
$dropdown-link-hover-color: darken($gray-dark, 5%) !default;
$dropdown-link-hover-color: darken($gray-dark, 5%);
//** Hover background for dropdown links.
$dropdown-link-hover-bg: #f5f5f5 !default;
$dropdown-link-hover-bg: #f5f5f5;
//** Active dropdown menu item text color.
$dropdown-link-active-color: $component-active-color !default;
$dropdown-link-active-color: $component-active-color;
//** Active dropdown menu item background color.
$dropdown-link-active-bg: $component-active-bg !default;
$dropdown-link-active-bg: $component-active-bg;
//** Disabled dropdown menu item background color.
$dropdown-link-disabled-color: $gray-light !default;
$dropdown-link-disabled-color: $gray-light;
//** Text color for headers within dropdown menus.
$dropdown-header-color: $gray-light !default;
$dropdown-header-color: $gray-light;
//** Deprecated `$dropdown-caret-color` as of v3.1.0
$dropdown-caret-color: #000 !default;
$dropdown-caret-color: #000;
//-- Z-index master list
......@@ -295,12 +295,12 @@ $dropdown-caret-color: #000 !default;
//
// Note: These variables are not generated into the Customizer.
$zindex-navbar: 1000 !default;
$zindex-dropdown: 1000 !default;
$zindex-popover: 1060 !default;
$zindex-tooltip: 1070 !default;
$zindex-navbar-fixed: 1030 !default;
$zindex-modal: 1040 !default;
$zindex-navbar: 1000;