Creating Moodle Mobile Remote Themes
Creating Moodle Mobile Remote Themes
remote themes
the world’s open source
learning platform
@moodlemobileapp #mootieuk16
@jleyvadelgado
What will we do?
1.Learn how to run Moodle Mobile in a browser.
2.Create a Mobile theme progressively.
3.Upload and configure this new theme in Moodle.
4.Learn some tricks to improve how the theme is
downloaded.
the world’s open source learning platform Copyright 2016 © Moodle Pty Ltd - CC SA - [email protected]
Moodle Mobile in the browser
Several ways to do that:
1.Advanced:
https://docs.moodle.org/dev/Setting_up_your_development_environme
nt_for_Moodle_Mobile_2
2.Simple:
Download the latest build, and open it in your browser:
https://github.com/moodlehq/moodlemobile-phonegapbuild
the world’s open source learning platform Copyright 2016 © Moodle Pty Ltd - CC SA - [email protected]
Moodle Mobile in the browser
You can add your custom CSS via the browser inspection
tools:
the world’s open source learning platform Copyright 2016 © Moodle Pty Ltd - CC SA - [email protected]
Mobile theme
Change the top bars:
.bar-header {
background-color: #5069A1;
}
the world’s open source learning platform Copyright 2016 © Moodle Pty Ltd - CC SA - [email protected]
Mobile theme
Change the side menu elements:
ion-side-menu li .item {
background-color: #313848;
border-color: #4F5865;
color: #BCC3CF;
}
ion-side-menu li.item {
border-color: #4F5865;
}
ion-side-menu li.item.item-divider {
background-color: #3E4755;
}
the world’s open source learning platform Copyright 2016 © Moodle Pty Ltd - CC SA - [email protected]
Mobile theme
Change icon colors:
.ion-ionic { .ion-folder {
color: orange; color: purple;
} }
.ion-home { .ion-earth {
color: blue; color: maroon;
} }
.ion-ios-bell { .ion-help-buoy {
color: yellow; color: orange;
} }
.ion-chatbox { .ion-gear-b {
color: green; color: dimgray;
} }
.ion-calendar { .ion-log-out {
color: white; color: red;
} }
the world’s open source learning platform Copyright 2016 © Moodle Pty Ltd - CC SA - [email protected]
Mobile theme
Change icons:
.ion-ionic:before {
content: "\f3ea";
}
For changing icons just search for the unicode tag near
the icon name in:
/www/lib/ionic/fonts/ionicons.svg (open it using a
text editor)
the world’s open source learning platform Copyright 2016 © Moodle Pty Ltd - CC SA - [email protected]
Mobile theme
Change other elements in pages
inside the app:
Every page has a different and unique base class, you
can find it in the <ion-content> element.
.mm-site_mm_courses .tabs-icon-left {
background-color: #EBEFF8;
}
.mm-site_mm_courses section h2 span {
font-weight: bold;
}
the world’s open source learning platform Copyright 2016 © Moodle Pty Ltd - CC SA - [email protected]
Upload the theme
Upload and configure the theme in Moodle:
● Upload the file containing the CSS code into your theme
directory: theme/mytheme/mobileapp.css
the world’s open source learning platform Copyright 2016 © Moodle Pty Ltd - CC SA - [email protected]
Minify your CSS
There are lots of online tools for doing that, use Google :)
● https://cssminifier.com/
● http://www.cleancss.com/css-minify/
the world’s open source learning platform Copyright 2016 © Moodle Pty Ltd - CC SA - [email protected]
RTL
This is not fully supported in the app but it can
be partially achieved applying this style into the
body tag:
body {
direction: rtl;
text-align: right;
}
the world’s open source learning platform Copyright 2016 © Moodle Pty Ltd - CC SA - [email protected]
the world’s open source learning platform
Thank you
Community: moodle.org
Commercial: moodle.com
@moodle