SlideShare a Scribd company logo
1 of 42
Talk: Customization of the new Boost theme
Summary: Introduction to the essential features of the theme and ways to customize it.
Speaker: Raul G Roig
Short resume: Web Developer experienced on creation, development and management of
websites, Virtual Learning Environments and systems since 2008.Learning Technologies specialist
and Visual Arts graduated.
Personal website: http://www.raulgroig.com/
Customization of the new Boost theme| Raul G Roig
Section 1 - History > 1.1 - Introducing the Clean theme
Moodle 2.5 was released in May 2013 including the Clean theme, the first
core theme based on Bootstrap. Clean is a Bootstrapbase’s child theme
intended to be used as a template for developing themes based on
Bootstrap, which is the most popular framework in the world for building
responsive web projects.
Moodle 2.5 release notes: https://goo.gl/C8l7PF
The Clean's documentation describes how to clone and customize the
theme: https://goo.gl/ZuXpTn
Section 1 - History > 1.2 - Neew theme need
During the development of Moodle 3.2, in June 2016, was announced the
inclusion of a new core theme:
“Our current default theme is based on a CSS framework which is no
longer supported”
“We would also like to see an obvious difference in the visual design” and
“make some big changes to the navigation”
Announcement's post: https://goo.gl/ymbkMo
Customization of the new Boost theme| Raul G Roig
Section 2 - Introduction > 2.1 - Introducing the Boost Theme
Moodle 3.2 was released in December 2016 including Boost theme, also
based on Bootstrap. The main features pointed out in the release were:
“Reduced reliance on blocks… we advise trying to avoid them, because
remember, these don't show on the Mobile app”
“New ‘Flat nav’ menu on the left with key navigation points”
“Gear icons... with a drop down menu that presents the key things from
the old Settings block”
Announcement's post: https://goo.gl/GwOF3r
Customization of the new Boost theme| Raul G Roig
Section 2 - Introduction > 2.2 – Bootstrap
Clean was a child theme of Bootstrapbase, since Boost is not a child
theme, Bootstrap is contained within the theme itself.
Bootstrap 2 used Less and the 4 uses Sass. Bootstrap 4 is in the alpha
version, so a stable version has not yet been released.
The clean custom CSS do not allow you to use Less, but the raw
SCSS/preset of Boost and its child themes allow you to use Sass.
When styling pages and components in Moodle it is recommended to
always re-use the components from Bootstrap
Moodle’s documentation about Bootstrap: https://goo.gl/oSYAJM
Bootstrap 4 release notes: https://goo.gl/F3UQCt
Customization of the new Boost theme| Raul G Roig
Section 2 - Introduction > 2.3 - Preset
Preset is an innovation of Boost, it is a scss file designed to be added to the
theme.
Presets can also be created from Bootswatch files, which are themes for
Bootstrap.
Documentation about preset: https://goo.gl/LsLuE3
Boost presets repository: https://goo.gl/4LN4gU
Bootswatch’s website: https://bootswatch.com/
Customization of the new Boost theme| Raul G Roig
Section 2 - Introduction > 2.4 - Logo
From Moodle 3.2 the logo upload is no longer linked to the theme, there is
a new section for this in Site Administration> Appearance> Logo.
That way the logo will be maintained even if the theme is changed, as
long as the theme offers this option.
Documentation about logo: https://goo.gl/k1juM3
Customization of the new Boost theme| Raul G Roig
Section 3 - Ways to customize > 3.1 – Raw SCSS and preset
Raw SCSS and preset are two ways to modify or add style rules to the
theme.
Raw SCSS is located in the advanced settings of the theme with two fields
where you can enter variables and style rules.
The preset is an scss file that can be sent and selected in the general
theme settings.
Customization of the new Boost theme| Raul G Roig
Section 3 - Ways to customize > 3.2 – Child theme
It is a theme that imports the features of another theme allowing to modify
and extend its functions, facilitates the insertion of images, as it has a
specific directory for that, allows to manipulate the structure of the pages
and to insert scripts.
A child theme is a directory with basic plugin configuration files pointing to
the parent theme as a dependency. Only the files of the parent theme
that you want to modify are copied to the child theme.
The advantage of creating a child theme is that isolating the changes
made to the parent theme allows you to update it without losing those
changes.
Customization of the new Boost theme| Raul G Roig
Section 3 - Ways to customize > 3.3 - Examples
Raw SCSS is ideal for projects that only need small layout adjustments, as it
is the most practical way to change the style of the site. Raw SCSS takes
effect immediately when saving the change, so it is more practical to use
to test changes than the preset, which needs to be resubmitted after the
change is made.
Preset is useful when it is necessary to reuse these layout adjustments in
another theme or another environment, since it is a separate file from the
Moodle installation. The preset can also be used to import a ready-made
model (Bootswatch).
Child theme is the most complete way to modify the Boost theme, being
suitable for projects with more customization requirements.
Customization of the new Boost theme| Raul G Roig
Section 4 - Raw SCSS and preset > 4.1 - Structure
The raw SCSS is divided into 2 fields. The first one is intended to define
variables and is inserted before the other SCSS files. The variables defined
first overlap the later ones because of the !default value of Sass. The
second field is intended for style rules and is inserted after the other SCSS
files, overlapping the previous rules.
The preset has the same division, the variables must be entered first, then
all the SCSS files are imported (@import moodle) and the style rules must
be inserted in the end.
Customization of the new Boost theme| Raul G Roig
Section 4 - Raw SCSS and preset > 4.2 - Variables
The most practical way to change a style is to reset variables, however it is
necessary to know which variable stores the value you want to change.
To do this you can either search directly for the name in the list of variables
or search the Boost scss directory for the attribute defined in the rule you
want to change, and then check if the value is stored in a variable and
find the name of the variable.
Boost’s file with the list of variables: https://goo.gl/JolCAX
Customization of the new Boost theme| Raul G Roig
Section 4 - Raw SCSS and preset > 4.3 - Style rules
Overlapping or adding style rules can be done as it was in older themes,
such as in Clean for example. Just inspect the element you want to
change and rewrite the same rule for the same attribute with the new
value.
The only innovation is the possibility of using Sass.
Customization of the new Boost theme| Raul G Roig
Section 4 - Raw SCSS and preset > 4.4 - Sass
Sass is an extension of CSS that adds power and elegance to the basic
language. It allows you to use variables, nested rules, mixins, inline imports,
and more, all with a fully CSS-compatible syntax.
Documentation of Sass: https://goo.gl/9zkJMY
Customization of the new Boost theme| Raul G Roig
Section 5 - Child theme > 5.1 - Photo theme
Photo is a theme created by the Moodle developers to serve as an
example of how to create a Boost's child theme. Its documentation is a
tutorial for developers showing step by step how the theme was created.
The only function added to Boost in this theme is uploading background
images to certain pages.
Page of the theme : https://goo.gl/qJF2Tj
Documentation of the theme: https://goo.gl/GMwz1o
Customization of the new Boost theme| Raul G Roig
Section 5 - Child theme > 5.2 - Clone
The documentation about cloning a theme is considered outdated,
instead it is suggested to create a child theme, however, cloning a child
theme of Boost may be a good option to start a project.
Documentation about cloning a theme: https://goo.gl/nhE9rq
Customization of the new Boost theme| Raul G Roig
Section 5 - Child theme > 5.3 - SCSS
There are 2 files within the scss directory of the Photo theme, pre.scss,
where the variables must be declared, and post.scss, where the style rules
should be inserted.
It is possible to include new scss files by copying the moodle.scss file to the
root of your theme's scss directory, changing the path of all imports to
fetch the files in the boost theme, and including the import of your new file
into the end, as was done in the Fordson theme.
moodle.scss file of Fordson theme: https://goo.gl/iIGtT7
Customization of the new Boost theme| Raul G Roig
Section 5 - Child theme > 5.4 - Template
Templates are files that allow to manipulate the structure of pages in a
simple way, because the template code is very close to the final aspect of
the HTML.
The template language is intentionally limited, allowing to manipulate the
structure of the pages without breaking the programming logic behind
them.
Documentation about template: https://goo.gl/8pcUGh
Customization of the new Boost theme| Raul G Roig
Section 5 - Child theme > 5.5 - Script
Moodle uses the AMD Javascript API since the version 2.9, so the scripts
should be inserted as modules following this pattern. This feature has a
great advantage over the organization of the code and allows the reuse
of parts.
Documentation about Javascript modules: https://goo.gl/gQBKIy
Customization of the new Boost theme| Raul G Roig
Section 6 - Tutorial > 6.1 – Clone the Photo theme
Download the Photo theme and follow the documentation guidelines to
clone it and create your theme. Update your database and activate your
new theme.
Documentation of the Photo theme: https://goo.gl/qJF2Tj
Documentation about cloning a theme: https://goo.gl/nhE9rq
Example theme of the tutorial on Github: https://goo.gl/ZDrzzy
Customization of the new Boost theme| Raul G Roig
Section 6 - Tutorial > 6.2 – Copy the header template
1) Create the layout and template directories in the root directory of your
new theme.
2) Copy from the Boost theme the template file:
/templates/header.mustache
and its dependencies :
/templates/columns2.mustache
/layout/columns2.php
Customization of the new Boost theme| Raul G Roig
Section 6 - Tutorial > 6.2 – Copy the header template
3) Change the template columns2 call in the /layout/columns2.php file,
changing boost by the name of your theme.
Commit on Github : https://goo.gl/RBIVOq
Customization of the new Boost theme| Raul G Roig
Section 6 - Tutorial > 6.2 – Copy the header template
4) Change in the same way the template header call in the
/templates/columns2.mustache file
Commit on Github : https://goo.gl/T4GIH0
Customization of the new Boost theme| Raul G Roig
Section 6 - Tutorial > 6.3 - Add subtitle
1) Insert the subtitle icon image into the pix directory of the new theme.
2) In the /layout/columns2.php file store the image path in the
templatecontext array. The element created in the array is flag-br-img.
Commit on Github : https://goo.gl/06eQcY
Customization of the new Boost theme| Raul G Roig
Section 6 - Tutorial > 6.3 - Add subtitle
3) Remove the code from the language menu and add an image and
subtitle by inserting {{{ flag-br-img }}} into the path value of the image in
the /templates/header.mustache file.
Customization of the new Boost theme| Raul G Roig
Section 6 - Tutorial > 6.3 - Add subtitle
Commit on Github: https://goo.gl/UT5STo
Customization of the new Boost theme| Raul G Roig
Section 6 - Tutorial > 6.4 - Reset variables
1) Inspect the element and find the attribute with the rule that you want to
change. In this case, the change will be the background color of the side
menu, so I selected the [data-region = "drawer"] attribute that has the
background-color rule.
Customization of the new Boost theme| Raul G Roig
Section 6 - Tutorial > 6.4 - Reset variables
2) Search for the attribute in the files of the boost theme and find the
name of the variable. In this case, the file is /boost/scss/drawer.scss and
the variable assigned to background-color is $drawer-bg.
Customization of the new Boost theme| Raul G Roig
Section 6 - Tutorial > 6.4 - Reset variables
3) Reset the value of the variable in the file /scss/pre.scss
Commit on Github : https://goo.gl/NxMExO
Customization of the new Boost theme| Raul G Roig
Section 6 - Tutorial > 6.5 - Add style rules
1) Select the id or class attribute of the body element. I selected the id
page-site-index.
Customization of the new Boost theme| Raul G Roig
Section 6 - Tutorial > 6.5 - Add style rules
2) In the /scss/post.scss file, add style rules
using the attribute selected to restrict the rule
application to the current page only.
Commit on Github : https://goo.gl/DtnBbU
Customization of the new Boost theme| Raul G Roig
Section 6 - Tutorial > 6.5 - Add style rules
3) Add other style rules that will be used on all pages, such as subtitle
settings for example.
Commit on Github: https://goo.gl/ekMQWn
Customization of the new Boost theme| Raul G Roig
For further information, questions or suggestions, please
contact:
raulgroig@gmail.com
www.raulgroig.com
Thank you!
Customization of the new Boost theme| Raul G Roig

More Related Content

Similar to Customization of the new Boost theme

Developing Branding Solutions for 2013
Developing Branding Solutions for 2013Developing Branding Solutions for 2013
Developing Branding Solutions for 2013Thomas Daly
 
Drupal Camp Manila 2014 - Theming with Zen
Drupal Camp Manila 2014 - Theming with ZenDrupal Camp Manila 2014 - Theming with Zen
Drupal Camp Manila 2014 - Theming with ZenJapo Domingo
 
Bootstrap Framework and Drupal
Bootstrap Framework and DrupalBootstrap Framework and Drupal
Bootstrap Framework and DrupalJim Birch
 
HTML and CSS Coding Standards
HTML and CSS Coding StandardsHTML and CSS Coding Standards
HTML and CSS Coding StandardsSaajan Maharjan
 
Mastering Drupal Theming
Mastering Drupal ThemingMastering Drupal Theming
Mastering Drupal Themingvaluebound
 
Know the reason behind choosing bootstrap as css framework
Know the reason behind choosing bootstrap as css frameworkKnow the reason behind choosing bootstrap as css framework
Know the reason behind choosing bootstrap as css frameworkOmkarsoft Bangalore
 
Developing Branding Solutions for 2013
Developing Branding Solutions for 2013Developing Branding Solutions for 2013
Developing Branding Solutions for 2013Thomas Daly
 
Designing for magento
Designing for magentoDesigning for magento
Designing for magentohainutemicute
 
How to Create a Drupal 8 Theme Using Bootstrap
How to Create a Drupal 8 Theme Using Bootstrap How to Create a Drupal 8 Theme Using Bootstrap
How to Create a Drupal 8 Theme Using Bootstrap Acquia
 
Sitecore 10 XC SXA frontend development using the SXA Storefront Branded
Sitecore 10 XC SXA frontend development using the SXA Storefront BrandedSitecore 10 XC SXA frontend development using the SXA Storefront Branded
Sitecore 10 XC SXA frontend development using the SXA Storefront BrandedSerge van den Oever
 
Introduction to BOOTSTRAP
Introduction to BOOTSTRAPIntroduction to BOOTSTRAP
Introduction to BOOTSTRAPJeanie Arnoco
 
Drupal 7 install with modules and themes
Drupal 7 install with modules and themesDrupal 7 install with modules and themes
Drupal 7 install with modules and themesGeshan Manandhar
 
Bb Tour ANZ 2017 - Workshop - Enhancing Learn CSS
Bb Tour ANZ 2017 - Workshop - Enhancing Learn CSSBb Tour ANZ 2017 - Workshop - Enhancing Learn CSS
Bb Tour ANZ 2017 - Workshop - Enhancing Learn CSSBlackboard APAC
 
Customizing WordPress Themes
Customizing WordPress ThemesCustomizing WordPress Themes
Customizing WordPress ThemesLaura Hartwig
 
Beginner's guide to drupal
Beginner's guide to drupalBeginner's guide to drupal
Beginner's guide to drupalmayank.grd
 

Similar to Customization of the new Boost theme (20)

Developing Branding Solutions for 2013
Developing Branding Solutions for 2013Developing Branding Solutions for 2013
Developing Branding Solutions for 2013
 
Drupal Camp Manila 2014 - Theming with Zen
Drupal Camp Manila 2014 - Theming with ZenDrupal Camp Manila 2014 - Theming with Zen
Drupal Camp Manila 2014 - Theming with Zen
 
Bootstrap Framework and Drupal
Bootstrap Framework and DrupalBootstrap Framework and Drupal
Bootstrap Framework and Drupal
 
HTML and CSS Coding Standards
HTML and CSS Coding StandardsHTML and CSS Coding Standards
HTML and CSS Coding Standards
 
Mastering Drupal Theming
Mastering Drupal ThemingMastering Drupal Theming
Mastering Drupal Theming
 
Know the reason behind choosing bootstrap as css framework
Know the reason behind choosing bootstrap as css frameworkKnow the reason behind choosing bootstrap as css framework
Know the reason behind choosing bootstrap as css framework
 
Developing Branding Solutions for 2013
Developing Branding Solutions for 2013Developing Branding Solutions for 2013
Developing Branding Solutions for 2013
 
Designing for magento
Designing for magentoDesigning for magento
Designing for magento
 
How to Create a Drupal 8 Theme Using Bootstrap
How to Create a Drupal 8 Theme Using Bootstrap How to Create a Drupal 8 Theme Using Bootstrap
How to Create a Drupal 8 Theme Using Bootstrap
 
Sitecore 10 XC SXA frontend development using the SXA Storefront Branded
Sitecore 10 XC SXA frontend development using the SXA Storefront BrandedSitecore 10 XC SXA frontend development using the SXA Storefront Branded
Sitecore 10 XC SXA frontend development using the SXA Storefront Branded
 
CustomThesis
CustomThesisCustomThesis
CustomThesis
 
CustomThesis
CustomThesisCustomThesis
CustomThesis
 
Introduction to BOOTSTRAP
Introduction to BOOTSTRAPIntroduction to BOOTSTRAP
Introduction to BOOTSTRAP
 
Drupal
DrupalDrupal
Drupal
 
Creating custom themes in AtoM
Creating custom themes in AtoMCreating custom themes in AtoM
Creating custom themes in AtoM
 
Readme
ReadmeReadme
Readme
 
Drupal 7 install with modules and themes
Drupal 7 install with modules and themesDrupal 7 install with modules and themes
Drupal 7 install with modules and themes
 
Bb Tour ANZ 2017 - Workshop - Enhancing Learn CSS
Bb Tour ANZ 2017 - Workshop - Enhancing Learn CSSBb Tour ANZ 2017 - Workshop - Enhancing Learn CSS
Bb Tour ANZ 2017 - Workshop - Enhancing Learn CSS
 
Customizing WordPress Themes
Customizing WordPress ThemesCustomizing WordPress Themes
Customizing WordPress Themes
 
Beginner's guide to drupal
Beginner's guide to drupalBeginner's guide to drupal
Beginner's guide to drupal
 

Recently uploaded

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 

Recently uploaded (20)

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 

Customization of the new Boost theme

  • 1.
  • 2. Talk: Customization of the new Boost theme Summary: Introduction to the essential features of the theme and ways to customize it. Speaker: Raul G Roig Short resume: Web Developer experienced on creation, development and management of websites, Virtual Learning Environments and systems since 2008.Learning Technologies specialist and Visual Arts graduated. Personal website: http://www.raulgroig.com/
  • 3. Customization of the new Boost theme| Raul G Roig Section 1 - History > 1.1 - Introducing the Clean theme Moodle 2.5 was released in May 2013 including the Clean theme, the first core theme based on Bootstrap. Clean is a Bootstrapbase’s child theme intended to be used as a template for developing themes based on Bootstrap, which is the most popular framework in the world for building responsive web projects. Moodle 2.5 release notes: https://goo.gl/C8l7PF The Clean's documentation describes how to clone and customize the theme: https://goo.gl/ZuXpTn
  • 4. Section 1 - History > 1.2 - Neew theme need During the development of Moodle 3.2, in June 2016, was announced the inclusion of a new core theme: “Our current default theme is based on a CSS framework which is no longer supported” “We would also like to see an obvious difference in the visual design” and “make some big changes to the navigation” Announcement's post: https://goo.gl/ymbkMo Customization of the new Boost theme| Raul G Roig
  • 5. Section 2 - Introduction > 2.1 - Introducing the Boost Theme Moodle 3.2 was released in December 2016 including Boost theme, also based on Bootstrap. The main features pointed out in the release were: “Reduced reliance on blocks… we advise trying to avoid them, because remember, these don't show on the Mobile app” “New ‘Flat nav’ menu on the left with key navigation points” “Gear icons... with a drop down menu that presents the key things from the old Settings block” Announcement's post: https://goo.gl/GwOF3r Customization of the new Boost theme| Raul G Roig
  • 6. Section 2 - Introduction > 2.2 – Bootstrap Clean was a child theme of Bootstrapbase, since Boost is not a child theme, Bootstrap is contained within the theme itself. Bootstrap 2 used Less and the 4 uses Sass. Bootstrap 4 is in the alpha version, so a stable version has not yet been released. The clean custom CSS do not allow you to use Less, but the raw SCSS/preset of Boost and its child themes allow you to use Sass. When styling pages and components in Moodle it is recommended to always re-use the components from Bootstrap Moodle’s documentation about Bootstrap: https://goo.gl/oSYAJM Bootstrap 4 release notes: https://goo.gl/F3UQCt Customization of the new Boost theme| Raul G Roig
  • 7. Section 2 - Introduction > 2.3 - Preset Preset is an innovation of Boost, it is a scss file designed to be added to the theme. Presets can also be created from Bootswatch files, which are themes for Bootstrap. Documentation about preset: https://goo.gl/LsLuE3 Boost presets repository: https://goo.gl/4LN4gU Bootswatch’s website: https://bootswatch.com/ Customization of the new Boost theme| Raul G Roig
  • 8. Section 2 - Introduction > 2.4 - Logo From Moodle 3.2 the logo upload is no longer linked to the theme, there is a new section for this in Site Administration> Appearance> Logo. That way the logo will be maintained even if the theme is changed, as long as the theme offers this option. Documentation about logo: https://goo.gl/k1juM3 Customization of the new Boost theme| Raul G Roig
  • 9. Section 3 - Ways to customize > 3.1 – Raw SCSS and preset Raw SCSS and preset are two ways to modify or add style rules to the theme. Raw SCSS is located in the advanced settings of the theme with two fields where you can enter variables and style rules. The preset is an scss file that can be sent and selected in the general theme settings. Customization of the new Boost theme| Raul G Roig
  • 10. Section 3 - Ways to customize > 3.2 – Child theme It is a theme that imports the features of another theme allowing to modify and extend its functions, facilitates the insertion of images, as it has a specific directory for that, allows to manipulate the structure of the pages and to insert scripts. A child theme is a directory with basic plugin configuration files pointing to the parent theme as a dependency. Only the files of the parent theme that you want to modify are copied to the child theme. The advantage of creating a child theme is that isolating the changes made to the parent theme allows you to update it without losing those changes. Customization of the new Boost theme| Raul G Roig
  • 11. Section 3 - Ways to customize > 3.3 - Examples Raw SCSS is ideal for projects that only need small layout adjustments, as it is the most practical way to change the style of the site. Raw SCSS takes effect immediately when saving the change, so it is more practical to use to test changes than the preset, which needs to be resubmitted after the change is made. Preset is useful when it is necessary to reuse these layout adjustments in another theme or another environment, since it is a separate file from the Moodle installation. The preset can also be used to import a ready-made model (Bootswatch). Child theme is the most complete way to modify the Boost theme, being suitable for projects with more customization requirements. Customization of the new Boost theme| Raul G Roig
  • 12. Section 4 - Raw SCSS and preset > 4.1 - Structure The raw SCSS is divided into 2 fields. The first one is intended to define variables and is inserted before the other SCSS files. The variables defined first overlap the later ones because of the !default value of Sass. The second field is intended for style rules and is inserted after the other SCSS files, overlapping the previous rules. The preset has the same division, the variables must be entered first, then all the SCSS files are imported (@import moodle) and the style rules must be inserted in the end. Customization of the new Boost theme| Raul G Roig
  • 13. Section 4 - Raw SCSS and preset > 4.2 - Variables The most practical way to change a style is to reset variables, however it is necessary to know which variable stores the value you want to change. To do this you can either search directly for the name in the list of variables or search the Boost scss directory for the attribute defined in the rule you want to change, and then check if the value is stored in a variable and find the name of the variable. Boost’s file with the list of variables: https://goo.gl/JolCAX Customization of the new Boost theme| Raul G Roig
  • 14. Section 4 - Raw SCSS and preset > 4.3 - Style rules Overlapping or adding style rules can be done as it was in older themes, such as in Clean for example. Just inspect the element you want to change and rewrite the same rule for the same attribute with the new value. The only innovation is the possibility of using Sass. Customization of the new Boost theme| Raul G Roig
  • 15. Section 4 - Raw SCSS and preset > 4.4 - Sass Sass is an extension of CSS that adds power and elegance to the basic language. It allows you to use variables, nested rules, mixins, inline imports, and more, all with a fully CSS-compatible syntax. Documentation of Sass: https://goo.gl/9zkJMY Customization of the new Boost theme| Raul G Roig
  • 16. Section 5 - Child theme > 5.1 - Photo theme Photo is a theme created by the Moodle developers to serve as an example of how to create a Boost's child theme. Its documentation is a tutorial for developers showing step by step how the theme was created. The only function added to Boost in this theme is uploading background images to certain pages. Page of the theme : https://goo.gl/qJF2Tj Documentation of the theme: https://goo.gl/GMwz1o Customization of the new Boost theme| Raul G Roig
  • 17. Section 5 - Child theme > 5.2 - Clone The documentation about cloning a theme is considered outdated, instead it is suggested to create a child theme, however, cloning a child theme of Boost may be a good option to start a project. Documentation about cloning a theme: https://goo.gl/nhE9rq Customization of the new Boost theme| Raul G Roig
  • 18. Section 5 - Child theme > 5.3 - SCSS There are 2 files within the scss directory of the Photo theme, pre.scss, where the variables must be declared, and post.scss, where the style rules should be inserted. It is possible to include new scss files by copying the moodle.scss file to the root of your theme's scss directory, changing the path of all imports to fetch the files in the boost theme, and including the import of your new file into the end, as was done in the Fordson theme. moodle.scss file of Fordson theme: https://goo.gl/iIGtT7 Customization of the new Boost theme| Raul G Roig
  • 19. Section 5 - Child theme > 5.4 - Template Templates are files that allow to manipulate the structure of pages in a simple way, because the template code is very close to the final aspect of the HTML. The template language is intentionally limited, allowing to manipulate the structure of the pages without breaking the programming logic behind them. Documentation about template: https://goo.gl/8pcUGh Customization of the new Boost theme| Raul G Roig
  • 20. Section 5 - Child theme > 5.5 - Script Moodle uses the AMD Javascript API since the version 2.9, so the scripts should be inserted as modules following this pattern. This feature has a great advantage over the organization of the code and allows the reuse of parts. Documentation about Javascript modules: https://goo.gl/gQBKIy Customization of the new Boost theme| Raul G Roig
  • 21. Section 6 - Tutorial > 6.1 – Clone the Photo theme Download the Photo theme and follow the documentation guidelines to clone it and create your theme. Update your database and activate your new theme. Documentation of the Photo theme: https://goo.gl/qJF2Tj Documentation about cloning a theme: https://goo.gl/nhE9rq Example theme of the tutorial on Github: https://goo.gl/ZDrzzy Customization of the new Boost theme| Raul G Roig
  • 22.
  • 23. Section 6 - Tutorial > 6.2 – Copy the header template 1) Create the layout and template directories in the root directory of your new theme. 2) Copy from the Boost theme the template file: /templates/header.mustache and its dependencies : /templates/columns2.mustache /layout/columns2.php Customization of the new Boost theme| Raul G Roig
  • 24. Section 6 - Tutorial > 6.2 – Copy the header template 3) Change the template columns2 call in the /layout/columns2.php file, changing boost by the name of your theme. Commit on Github : https://goo.gl/RBIVOq Customization of the new Boost theme| Raul G Roig
  • 25. Section 6 - Tutorial > 6.2 – Copy the header template 4) Change in the same way the template header call in the /templates/columns2.mustache file Commit on Github : https://goo.gl/T4GIH0 Customization of the new Boost theme| Raul G Roig
  • 26. Section 6 - Tutorial > 6.3 - Add subtitle 1) Insert the subtitle icon image into the pix directory of the new theme. 2) In the /layout/columns2.php file store the image path in the templatecontext array. The element created in the array is flag-br-img. Commit on Github : https://goo.gl/06eQcY Customization of the new Boost theme| Raul G Roig
  • 27. Section 6 - Tutorial > 6.3 - Add subtitle 3) Remove the code from the language menu and add an image and subtitle by inserting {{{ flag-br-img }}} into the path value of the image in the /templates/header.mustache file. Customization of the new Boost theme| Raul G Roig
  • 28. Section 6 - Tutorial > 6.3 - Add subtitle Commit on Github: https://goo.gl/UT5STo Customization of the new Boost theme| Raul G Roig
  • 29.
  • 30.
  • 31. Section 6 - Tutorial > 6.4 - Reset variables 1) Inspect the element and find the attribute with the rule that you want to change. In this case, the change will be the background color of the side menu, so I selected the [data-region = "drawer"] attribute that has the background-color rule. Customization of the new Boost theme| Raul G Roig
  • 32.
  • 33. Section 6 - Tutorial > 6.4 - Reset variables 2) Search for the attribute in the files of the boost theme and find the name of the variable. In this case, the file is /boost/scss/drawer.scss and the variable assigned to background-color is $drawer-bg. Customization of the new Boost theme| Raul G Roig
  • 34. Section 6 - Tutorial > 6.4 - Reset variables 3) Reset the value of the variable in the file /scss/pre.scss Commit on Github : https://goo.gl/NxMExO Customization of the new Boost theme| Raul G Roig
  • 35.
  • 36.
  • 37. Section 6 - Tutorial > 6.5 - Add style rules 1) Select the id or class attribute of the body element. I selected the id page-site-index. Customization of the new Boost theme| Raul G Roig
  • 38. Section 6 - Tutorial > 6.5 - Add style rules 2) In the /scss/post.scss file, add style rules using the attribute selected to restrict the rule application to the current page only. Commit on Github : https://goo.gl/DtnBbU Customization of the new Boost theme| Raul G Roig
  • 39. Section 6 - Tutorial > 6.5 - Add style rules 3) Add other style rules that will be used on all pages, such as subtitle settings for example. Commit on Github: https://goo.gl/ekMQWn Customization of the new Boost theme| Raul G Roig
  • 40.
  • 41.
  • 42. For further information, questions or suggestions, please contact: raulgroig@gmail.com www.raulgroig.com Thank you! Customization of the new Boost theme| Raul G Roig