|
1 |
| -# moodle-theme_boost_union_snippets |
2 |
| -Boost Union CSS snippets |
| 1 | +# SCSS snippets repository for Moodle Boost Union Theme |
| 2 | + |
| 3 | +## About |
| 4 | + |
| 5 | +The [Boost Union](https://github.com/moodle-an-hochschulen/moodle-theme_boost_union) theme for Moodle allows administrators to enable / use SCSS snippets to enhance and style their particular Moodle instance. |
| 6 | + |
| 7 | +The theme ships with a [small default set of SCSS snippets](https://github.com/moodle-an-hochschulen/moodle-theme_boost_union/tree/main/snippets/builtin). |
| 8 | + |
| 9 | +In addition to these, the SCSS snippets in this repository are meant to be uploaded in the Boost Union SCSS snippets setting page by the administrator. Furthermore, a way to automatically download and include these SCSS snippets is on Boost Union's roadmap. |
| 10 | + |
| 11 | +## SCSS snippet structure |
| 12 | + |
| 13 | +### Components of a SCSS snippet |
| 14 | + |
| 15 | +A SCSS snippet consists of two components: |
| 16 | + |
| 17 | +- A simple plaintext SCSS file (.scss) |
| 18 | +- An optional image file, (.webp, .png, .jpg, .jpeg, .gif - ideally widescreen aspect ratio) |
| 19 | + |
| 20 | +Both files must share the same arbitrary filename and just differ by their file suffix. |
| 21 | + |
| 22 | +### SCSS snippet file metadata |
| 23 | + |
| 24 | +A SCSS snippet file contains, beside the necessary SCSS code, several metadata fields which allow us to categorize and manage the pile of SCSS snippets. |
| 25 | + |
| 26 | +These are attributes that are defined to be added at the top of the SCSS file: |
| 27 | + |
| 28 | +- `Snippet Title`: The title of the snippet which will be shown in the snippet list in Boost Union |
| 29 | +- `Scope`: A tag which highlights the scope of the snippet (see below) |
| 30 | +- `Goal`: A tag which highlights the goal of the snippet (see below) |
| 31 | +- `Description`: A few sentences which describe the snippet for humans |
| 32 | +- `Creator`: The creator of the snippet which will be shown in the snippet list in Boost Union |
| 33 | +- `Tested on`: A short information on which Moodle version and with which browser the snippet was tested |
| 34 | +- `Tracker issue`: The Moodle tracker issue number (MDL-xxxxx) where the bug / glitch / goal which is solved by the SCSS snippet was reported upstream |
| 35 | +- `Usage note`: An (optional) usage note to be shown in the snippet list in Boost Union |
| 36 | + |
| 37 | +#### List of scopes |
| 38 | + |
| 39 | +Each particular snippet should have a `Scope` tag and thereby be assigned to a single particular scope. The scope does not have a technical impact, it is rather an important metadata for structuring the pile of available snippets: |
| 40 | + |
| 41 | +- `global`: These snippets affect the entire site |
| 42 | +- `course`: These snippets affect only the course context |
| 43 | +- `dashboard`: These snippets affect only the dashboard of a user |
| 44 | + |
| 45 | +The list of scopes is not necessarily limited to these existing scopes, additional scopes can be added in the future. |
| 46 | + |
| 47 | +#### List of goals |
| 48 | + |
| 49 | +Each particular snippet should have a `Goal` tag and thereby be assigned to a single particular goal. The goal does not have a technical impact as well, it is a metadata for structuring the pile of available snippets as well: |
| 50 | + |
| 51 | +- `eyecandy`: These snippets focus on the (visual) styling of Moodle, especially to deviate from Moodle's and Bootstrap's default appearance |
| 52 | +- `bugfix`: These snippets fix Moodle CSS bugs and glitches, ideally temporarily until Moodle core fixes it itself |
| 53 | +- `accessibility`: These snippets try to Moodle more accessible |
| 54 | +- `easeofuse`: These snippets try to make Moodle easier to use |
| 55 | +- `devsonly`: These snippets add styling that mainly help developers who develop in Moodle |
| 56 | + |
| 57 | +The list of goals is not necessarily limited to these existing goals, additional goals can be added in the future. |
| 58 | + |
| 59 | +## Repository structure |
| 60 | + |
| 61 | +This repository is, for now, structured by snippet goals with each goal having a top level folder. Within this folder, all snippets are located on the same level |
| 62 | + |
| 63 | +## Using the community snippets in Boost Union |
| 64 | + |
| 65 | +You can use all of these snippets here directly in Boost Union: |
| 66 | + |
| 67 | +* Download this repository as ZIP file |
| 68 | +* In your Moodle instance, go to Site administration -> Appearance -> Boost Union -> SCSS snippets -> Settings |
| 69 | +* On this settings page, enable the 'Enable uploaded snippets' setting |
| 70 | +* Upload the ZIP file into the 'Upload snippets' setting and save the settings page. Upon saving, Boost Union will automatically unpack the ZIP file. |
| 71 | +* Go to Site administration -> Appearance -> Boost Union -> SCSS snippets -> Overview |
| 72 | +* Enable the particular SCSS snippets which you would like to use |
| 73 | + |
| 74 | +## Create and contribute your own snippet |
| 75 | + |
| 76 | +You are welcome to create your own SCSS snippet based on the [boilerplate](https://github.com/moodle-an-hochschulen/moodle-theme_boost_union_snippets/tree/main/boilerplate) and submit your new SCSS snippet as a pull request to this repository. |
0 commit comments