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

What's hot

Bts commissioning
Bts commissioningBts commissioning
Bts commissioningginorosido
 
Deep dark-side of git: How git works internally
Deep dark-side of git: How git works internallyDeep dark-side of git: How git works internally
Deep dark-side of git: How git works internallySeongJae Park
 
Beyond printk: Efficient Zynq UltraScale+ MPSoC Linux Debugging and Development
Beyond printk: Efficient Zynq UltraScale+ MPSoC Linux Debugging and DevelopmentBeyond printk: Efficient Zynq UltraScale+ MPSoC Linux Debugging and Development
Beyond printk: Efficient Zynq UltraScale+ MPSoC Linux Debugging and DevelopmentZach Pfeffer
 
VDS Guideline and VAT rate for the FY 2020-2021
VDS Guideline and VAT rate for the FY 2020-2021VDS Guideline and VAT rate for the FY 2020-2021
VDS Guideline and VAT rate for the FY 2020-2021Masum Gazi
 
3GPP 5G NSA Detailed explanation 1(EN-DC SgNB Addition Call Flow)
3GPP 5G NSA Detailed explanation 1(EN-DC SgNB Addition Call Flow)3GPP 5G NSA Detailed explanation 1(EN-DC SgNB Addition Call Flow)
3GPP 5G NSA Detailed explanation 1(EN-DC SgNB Addition Call Flow)Ryuichi Yasunaga
 
Zte macro bts introduction
Zte macro bts  introductionZte macro bts  introduction
Zte macro bts introductionRamanuj Kumar
 
RAO ABDUL KHALIQ-Probation Presentations-V1.0.pptx
RAO ABDUL KHALIQ-Probation Presentations-V1.0.pptxRAO ABDUL KHALIQ-Probation Presentations-V1.0.pptx
RAO ABDUL KHALIQ-Probation Presentations-V1.0.pptxMuhammadShahFaisal1
 
Основы Git
Основы GitОсновы Git
Основы Gitoelifantiev
 
Conan.io - The C/C++ package manager for Developers
Conan.io - The C/C++ package manager for DevelopersConan.io - The C/C++ package manager for Developers
Conan.io - The C/C++ package manager for DevelopersUilian Ries
 
Base Transceiver Station Equipment
Base Transceiver Station EquipmentBase Transceiver Station Equipment
Base Transceiver Station EquipmentArash Soltani
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git TutorialSage Sharp
 

What's hot (20)

ABB Price List 2019
ABB Price List 2019ABB Price List 2019
ABB Price List 2019
 
Bts commissioning
Bts commissioningBts commissioning
Bts commissioning
 
Cmake kitware
Cmake kitwareCmake kitware
Cmake kitware
 
Deep dark-side of git: How git works internally
Deep dark-side of git: How git works internallyDeep dark-side of git: How git works internally
Deep dark-side of git: How git works internally
 
Beyond printk: Efficient Zynq UltraScale+ MPSoC Linux Debugging and Development
Beyond printk: Efficient Zynq UltraScale+ MPSoC Linux Debugging and DevelopmentBeyond printk: Efficient Zynq UltraScale+ MPSoC Linux Debugging and Development
Beyond printk: Efficient Zynq UltraScale+ MPSoC Linux Debugging and Development
 
VDS Guideline and VAT rate for the FY 2020-2021
VDS Guideline and VAT rate for the FY 2020-2021VDS Guideline and VAT rate for the FY 2020-2021
VDS Guideline and VAT rate for the FY 2020-2021
 
CMake best practices
CMake best practicesCMake best practices
CMake best practices
 
3GPP 5G NSA Detailed explanation 1(EN-DC SgNB Addition Call Flow)
3GPP 5G NSA Detailed explanation 1(EN-DC SgNB Addition Call Flow)3GPP 5G NSA Detailed explanation 1(EN-DC SgNB Addition Call Flow)
3GPP 5G NSA Detailed explanation 1(EN-DC SgNB Addition Call Flow)
 
Git ve GitHub
Git ve GitHubGit ve GitHub
Git ve GitHub
 
Nec ODU.pdf
Nec ODU.pdfNec ODU.pdf
Nec ODU.pdf
 
IIJmio meeting 18 eSIMとMVNO
IIJmio meeting 18 eSIMとMVNOIIJmio meeting 18 eSIMとMVNO
IIJmio meeting 18 eSIMとMVNO
 
Zte macro bts introduction
Zte macro bts  introductionZte macro bts  introduction
Zte macro bts introduction
 
RAO ABDUL KHALIQ-Probation Presentations-V1.0.pptx
RAO ABDUL KHALIQ-Probation Presentations-V1.0.pptxRAO ABDUL KHALIQ-Probation Presentations-V1.0.pptx
RAO ABDUL KHALIQ-Probation Presentations-V1.0.pptx
 
Основы Git
Основы GitОсновы Git
Основы Git
 
Tms320F2812 Digital I/0
Tms320F2812 Digital I/0Tms320F2812 Digital I/0
Tms320F2812 Digital I/0
 
Conan.io - The C/C++ package manager for Developers
Conan.io - The C/C++ package manager for DevelopersConan.io - The C/C++ package manager for Developers
Conan.io - The C/C++ package manager for Developers
 
Elevation for atoll
Elevation for atollElevation for atoll
Elevation for atoll
 
BeagleBone Black Bootloaders
BeagleBone Black BootloadersBeagleBone Black Bootloaders
BeagleBone Black Bootloaders
 
Base Transceiver Station Equipment
Base Transceiver Station EquipmentBase Transceiver Station Equipment
Base Transceiver Station Equipment
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
 

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

Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfIdiosysTechnologies1
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 

Recently uploaded (20)

Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdf
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 

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