Commit 0d36b127 authored by Jen Zajac's avatar Jen Zajac Committed by Jinelle Foley-Barnes

Make a subtheming skeleton theme + update docs. Bug #1465107

  behatnotneeded

Change-Id: Ie9598feab59343fc098db1ce5ccb3eb874172d4e
parent 4bfe2719
......@@ -678,6 +678,7 @@ function get_all_themes() {
if (is_null($themes)) {
$themes = array();
$themelist = get_all_theme_objects();
foreach ($themelist AS $subdir => $theme) {
$themes[$subdir] = isset($theme->displayname) ? $theme->displayname : $subdir;
}
......@@ -765,7 +766,10 @@ function get_all_theme_objects() {
if (is_readable($config_path)) {
require($config_path);
if (empty($theme->disabled) || !$theme->disabled) {
$themes[$subdir] = $theme;
// don't include the special subthemestarter theme in the options
if ($subdir != 'subthemestarter') {
$themes[$subdir] = $theme;
}
}
}
}
......
This diff is collapsed.
// Include gulp
var gulp = require('gulp');
// Include Our 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');
// Turn sass into css
gulp.task('sass', function () {
return gulp.src('sass/**/*.scss')
.pipe(sass({
paths: [ path.join(__dirname, 'sass', 'includes') ]
}))
.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(gulp.dest('style/'));
});
// Watch Files For Changes
gulp.task('watch', function() {
gulp.watch(['sass/**/*.scss', '../raw/sass/**/*.scss'], ['css']);
});
// Default Task
gulp.task('default', ['watch']);
{
"name": "mysubthemename",
"version": "1.0.0",
"description": "Mahara's mysubthemename theme",
"main": "gulpfile.js",
"dependencies": {
"gulp": "^3.9.0",
"gulp-postcss": "^5.1.8",
"gulp-minify-css": "^1.1.6",
"autoprefixer-core": "^5.2.0",
"gulp-sass": "^2.0.1",
"path": "^0.11.14"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
}
}
// Generic custom css (anything longer than a screen view should have its own component file)
// *
// * This file is for hotfixes, hacks, and anything that you don't have time to test
// * or implement properly. If you are unsure where to put something, it is ok to put it
// * here.
// *
// * Please comment your code to make it easier for someone to fix or hunt down later.
// *
// *
/**
* Stylesheet index for Mahara's Bootstrap theme.
*
* @author Catalyst IT Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later
* @copyright For copyright information on Mahara, please see the README file distributed with this software.
*
* This file is licensed under the same terms as Mahara itself
*/
// Import our theme based variables (colors, fonts, padding, etc)
@import "../../raw/sass/utilities/brand-variables"; // Import our brand variables
@import "../../raw/sass/utilities/bootstrap-variables"; // ...and our custom bootstrap variables file
@import "../../raw/sass/utilities/custom-variables"; // ...and our custom variables file
@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)
// Keep these files last to override all other style sheets
@import "custom";
@import "shame";
<?php
/**
*
* @package mahara
* @subpackage core
* @author Catalyst IT Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later
* @copyright For copyright information on Mahara, please see the README file distributed with this software.
*/
$theme = new stdClass();
/* Give your new theme a name here */
$theme->displayname = 'Sub Theme Starter kit';
/* Set parent to boolean FALSE to specify the theme has no parent */
$theme->parent = 'raw';
/* If we are using normal CSS, this should be false. If we are using SASS, it should be true. */
$theme->overrideparentcss = true;
/**
* The following themeconfig options are available. If you make new themeconfig
* options please add them here and explain what they do.
*/
/* Allow skins to be used on this theme */
$theme->skins = true;
/* Limit this theme to certain institutions */
// $theme->institutions = array('institution_a', 'institution_b');
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment