diff --git a/.editorconfig b/.editorconfig index 3c5d800bfd..58ccd51b78 100644 --- a/.editorconfig +++ b/.editorconfig @@ -32,3 +32,7 @@ charset = utf-8 # Use spaces for all indents with a width of 4 characters. indent_style = space indent_size = 4 + + +[*.css] +indent_size = 2 diff --git a/.github/workflows/lighthouse-report.yml b/.github/workflows/lighthouse-report.yml index 1005adfe4e..6aeaf30d63 100644 --- a/.github/workflows/lighthouse-report.yml +++ b/.github/workflows/lighthouse-report.yml @@ -4,6 +4,7 @@ on: pull_request_target: branches: - main + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} @@ -16,21 +17,23 @@ jobs: steps: - name: Checkout uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3 + - name: Wait for the Netlify Preview - uses: jakepartusch/wait-for-netlify-action@7ccf91c9ba3d64aa4389c0d3adcba0a6e77e5421 # v1 + uses: andrewnicols/wait-for-netlify-preview@main id: netlify with: - site_name: moodledevdocs + site_id: "3c056055-e1bd-4cfd-8a02-ed35ab7aedfa" max_timeout: 600 + netlify_secret: ${{ secrets.NETLIFY_SECRET }} - name: Audit URLs using Lighthouse id: lighthouse_audit uses: treosh/lighthouse-ci-action@b4dfae3eb959c5226e2c5c6afd563d493188bfaf # 9.3.0 with: urls: | - https://deploy-preview-$PR_NUMBER--moodledevdocs.netlify.app/ - https://deploy-preview-$PR_NUMBER--moodledevdocs.netlify.app/docs/apis/commonfiles - https://deploy-preview-$PR_NUMBER--moodledevdocs.netlify.app/general/development/gettingstarted - https://deploy-preview-$PR_NUMBER--moodledevdocs.netlify.app/general/releases + ${{ steps.netlify.deployUrl }}/ + ${{ steps.netlify.deployUrl }}//docs/apis/commonsfiles + ${{ steps.netlify.deployUrl }}/general/development/gettingstarted + ${{ steps.netlify.deployUrl }}/general/releases configPath: ./.github/workflows/lighthouserc.json uploadArtifacts: true temporaryPublicStorage: true diff --git a/config/footer.js b/config/footer.js index c5514bb3b4..4774d8567d 100644 --- a/config/footer.js +++ b/config/footer.js @@ -72,7 +72,7 @@ module.exports = { items: [ { label: 'GitHub', - href: 'https://github.com/moodlehq', + href: 'https://github.com/moodle', }, { html: ` diff --git a/config/navbar.js b/config/navbar.js index f80cdd24d7..51520c877b 100644 --- a/config/navbar.js +++ b/config/navbar.js @@ -22,12 +22,12 @@ const ArchivedVersionsDropdownItems = Object.entries(VersionsArchived).splice( ); const navbar = { - title: 'Moodle', + title: '', logo: { alt: '', - src: 'img/Moodle_M_icon.svg', - height: '32px', - width: '32px', + src: 'img/Moodle.svg', + height: '35px', + width: '138px', }, items: [ { @@ -75,7 +75,7 @@ const navbar = { ], }, { - href: 'https://github.com/moodle/moodle', + href: 'https://github.com/moodle', label: 'GitHub', position: 'right', }, diff --git a/data/component-spelling.txt b/data/component-spelling.txt index 314cbcc9c5..27e0f5c114 100644 --- a/data/component-spelling.txt +++ b/data/component-spelling.txt @@ -21,6 +21,7 @@ calendar calendartype cohort comment +communication competency completion contentbank @@ -38,6 +39,7 @@ editor edufields enrol error +external favourites fileconverter filepicker diff --git a/data/master/components.json b/data/master/components.json index eaaf7d4e9f..651654cc58 100644 --- a/data/master/components.json +++ b/data/master/components.json @@ -6,6 +6,7 @@ "mod": "mod", "auth": "auth", "calendartype": "calendar\/type", + "communication": "communication\/provider", "customfield": "customfield\/field", "enrol": "enrol", "message": "message\/output", @@ -59,6 +60,7 @@ "calendar": "calendar", "cohort": "cohort", "comment": "comment", + "communication": "communication", "competency": "competency", "completion": "completion", "contentbank": "contentbank", @@ -73,6 +75,7 @@ "edufields": null, "enrol": "enrol", "error": null, + "external": "lib/external", "favourites": "favourites", "filepicker": null, "fileconverter": "files\/converter", diff --git a/data/moodle-contributors.txt b/data/moodle-contributors.txt index 76f3ca8e65..6d18960377 100644 --- a/data/moodle-contributors.txt +++ b/data/moodle-contributors.txt @@ -13,7 +13,9 @@ Ackermann Ackland-Snow Adam Adamcik +Adermann Adrian +Adrien Afrar Agarwal Agheda @@ -35,6 +37,7 @@ Alex Alexander Alexandre Alexandru +Alexey Alexnader Alfonso Alison @@ -46,11 +49,15 @@ Amaia Amanda Amanpreet Amaya +Amrita +Amrita1991 Anabitarte Anandani Anant Anastasios +Anders Anderson +Andolo Andrea Andreas Andres @@ -69,6 +76,7 @@ Apetrei Araujo Ardanza Arenaza +Ariste Arjen Arjona Arnaud @@ -78,6 +86,7 @@ Ashruf Astashov Atanas Atanasov +Audun Automation Avdeev BKelada @@ -97,6 +106,7 @@ Barnes Barras Barrett Barry +Bartel Basset Bateson Baxter @@ -131,6 +141,8 @@ Boyatt Bozhko Bram Brands +Brat +Bravo Brendan Brent Brian @@ -156,6 +168,7 @@ Carlos Carrick Carrier Carson +Carsten Carter Castillo Castro @@ -175,6 +188,7 @@ Chernyavskiy Chris Christian Christiansen +Christina Christopher Churchward Ciaran @@ -209,6 +223,7 @@ D'souza Dageförde Dallimore Dalton +Damian Damiani Damien Damyon @@ -216,6 +231,7 @@ Dang Dani Daniel Daniele +Daniil Danny Daren Darko @@ -236,6 +252,7 @@ Dela Delamarre Delius Demeshev +Denis Deniz Derek Derick @@ -248,6 +265,7 @@ Dickman Didier Dieckmann Dikih +Dinesh Dinh Djunaidi Dmitri @@ -263,8 +281,11 @@ Dougiamas Drlík Dulk Dunand +Durai Durber +Dutta Dvorovenko +Dymshits Déniz EVAN Ebarvia @@ -287,9 +308,11 @@ Erlachner Eugene Evan Evans +Everling Fabrice Fabriczy Faisal +Fajnberg Falcon Falcón Faller @@ -305,6 +328,7 @@ Fish Fletcher Follin Fonseca +Forget Forth Foster Fotis @@ -325,6 +349,7 @@ Fábio GUINOISEAU Galiszek Gancarz +Garapati Gareth Garrett Garske @@ -379,6 +404,7 @@ Gustav Haemmerle Hager Hagey, +Hanauska Hancox Hanusch Hardin @@ -404,11 +430,14 @@ Herrmann Heywood Hien Hilton +Hippisley +Hiroto Hittesh Hoang Holden Holladay Holland +Holliday Holman Hoobin Howard @@ -425,6 +454,7 @@ ISHIKAWA Igor Ilicic Ilya +Imhof Inaki Informática Inhofer @@ -449,9 +479,11 @@ Jamie Janek Jaravaza Jason +Javed JayChurchward Jayaprakash Jayathissa +Jaydn Jayesh Jayswal Jean-Michel @@ -476,7 +508,9 @@ Johnson Johnston Jonathan Jonathon +Jones Jordan +Jordao Jordi Jorgensen Joseph @@ -492,8 +526,10 @@ Jung Justin Justus Jwalit +Jørstad KNDeepa Kabalin +Kagotani Kaleem Kalinin Kania @@ -513,6 +549,7 @@ Kelsh Kelty Kenneth Kenny +Kepa Kevin Khajuria Khattar @@ -561,6 +598,7 @@ Lauri Lawson-Perfect Leach Leblanc +Lemaire Lengyel Lennard Lentz @@ -572,25 +610,31 @@ Levy Lewis Leyva Ligne +Lillekjendlie Limekiller Lior +Lipson Lloyd Lock Logan +Loison Lorenzo Luca Lukas Luke Lundberg Luuk +Lyons Lévesque Macgirvin Madden +Mady Magill Mahmoud Mahmoud.Kassaei Malith Malley +Maneggia Mano Maoz Marc @@ -618,12 +662,14 @@ Massart Mastny Matamoros Materka +Matheus Mathew Mathieu Matt Matteo Matthew Mayank +Mayer McCormack McDermott McGettrick @@ -631,12 +677,15 @@ McLean McQuillan Mcneill Mehr +Meirza Meisberger +Melanie Melihov Melissa Melià Melo Melton +Memmel Menéndez Merrill Metelkin @@ -654,7 +703,9 @@ Miletic Milette Miller Milling +Miri Mirko +Misha Mitin Mitsuhiro Mitxel @@ -682,10 +733,12 @@ Myles Ménard Møller Nadav +Nagargoje Namur Narissa Nathan Nathanial +Nathuji Nayab Naydenov Nefedov @@ -714,11 +767,13 @@ Nigel Nikhil Nikita Nikoloutsopoulos +Nils Nina Nitzan Nivedita Nobelium Noel +Noemie Noll Noorenberghe Norfor @@ -745,6 +800,7 @@ Pablo Palou Panagiotis Panning +Paola Parry Pataleta Patrick @@ -754,11 +810,14 @@ Paula Pavel Pawełczak Peachey +Pedro Pegenau Penelope Penner Penny +Percy Perez +Pesce Pete Peter Petit-Clair @@ -793,6 +852,7 @@ Price Pruett Pujol Pytlick +Qihui Quan Raadt Rabellino @@ -808,11 +868,13 @@ Ramindu Ramiro Ransom Raphaël +Rasmussen Rawson Raymond Recio Reischmann Renaat +Renaud Reynolds Rezaie Rezeau @@ -821,11 +883,16 @@ Riddell Riekkinen Rimas Ringer +Ripal Risner Ritchey Robert +Roberto Robot +Robotta Robynstar +Rodrigo +Rodrigues Roes Roeser Roger @@ -846,15 +913,18 @@ Russell Ryan Rézeau SSRF +Saad Sachan Safat Sagar Sagie +Salces Salih Sammarco Sander Sanecki Santos +Santosh Sanya Sara Sarjoshi @@ -889,12 +959,16 @@ Shashikant Sheremeta Shintaro Shwab +Siegmund +Silva Silver Silvia Simeon Simey Simon Singh +Sirisha +Sistrom Situ Skandalis Skoda @@ -917,13 +991,16 @@ Steele Stefan Steffen Steffensen +Stephan Stephane Stephen +Stevani Steve Stewart Streltsov Stringer Sujith +Sumaiya Sumit Susanna Switlik @@ -960,6 +1037,7 @@ Thomas.Ludwig Thompson Thong Thorpe +Thorsten Tien Tindell Tobias @@ -977,6 +1055,7 @@ Torres Totaram Travis Tregubov +Treitinger Treu Trevor Trisha @@ -996,6 +1075,7 @@ Tõnis Umberto University Ureña +Urzelai Vadim Vaishnav Valerii @@ -1062,6 +1142,7 @@ Wirianto Wojciech Woldeselassie Wolf +Woloszyn Wolters Woods Woolard @@ -1071,6 +1152,8 @@ Xuan YVANES Yair Yang +Yannick +Yeung Yevhenii Yolanda Yoshida @@ -1107,6 +1190,7 @@ andrew andrewnicols andro-bg andyjdavis +anisa anthonyforth anvergara aparup @@ -1116,6 +1200,7 @@ aredkin arjun-kallapur ashleyholman aszora +aya.saad barbararamiro barias barrasroger @@ -1129,12 +1214,14 @@ carlesbellver carlos cataluke cescobedo +chen comete-upn compuproggy coolbit cperves crbusch csantossaenz +danghieu1407 danielfetzer danmarsden danstowell @@ -1164,6 +1251,7 @@ evlice evltuma exe-cutor fabmen +fcbsd fdallet ferran.recio fhuebler @@ -1181,17 +1269,22 @@ gniske godric gregb_cc gthomas2 +guillermogomez gustav_delius hanna hansdezwart havran hiendinh +hieuvu iarenaza iclearn ikawhero importer +info@eWallah.net info@ewallah.net inigozendegi +ishatalkin +james-cnz jamiepratt jamiesensei jbeedell @@ -1217,6 +1310,7 @@ kaipe koenr kordan kritisingh1 +kusumadewi lameze lamsdev lapsa @@ -1224,6 +1318,7 @@ lashaalt laurentdavid lazydaisy les_kopari +levy lfrodrigues liorgi lonecatz @@ -1239,6 +1334,8 @@ mathusiast mattc-catalyst mchampan mchurch +meirzamoodle +michaelkotlyar michaelpenne mikewaters miksik @@ -1246,6 +1343,7 @@ mindforge minkowski mits mjollnir_ +mkassaei mohalisad moodler moodlerobot @@ -1279,6 +1377,7 @@ prateeksachan ptrkmkl rajesh ralf-bonn +raortegar rcantada rezaie9 rkingdon @@ -1304,6 +1403,7 @@ skaldrom skodak spvickers stabijoh +stevando stigbjarne stronk7 thepurpleblob @@ -1330,6 +1430,7 @@ vinhle vinkmar vpisabeywardana vthung +vtos vyshane watcanz wehr diff --git a/docusaurus.config.js b/docusaurus.config.js index 808a1ddbe2..ed25cb14a1 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -55,8 +55,8 @@ const getBaseUrl = () => { /** @type {import('@docusaurus/types').Config} */ const config = { - title: 'Moodle', - tagline: '(Un)official Developer Resources', + title: 'Moodle Developer Resources', + tagline: 'Nurturing Moodle Developers', // url: 'https://develop.moodle.org', url: process.env?.URL || 'https://moodledev.io', diff --git a/general/community/intro.md b/general/community/intro.md index 7be42391c9..5c237dfc31 100644 --- a/general/community/intro.md +++ b/general/community/intro.md @@ -23,7 +23,7 @@ There are many other people contributing to Moodle in many ways. For a full list ## How we develop the Roadmap -The [Roadmap](./roadmap.md) lists the new features being developed for the next major version. This list is derived mostly from the issues with large numbers of votes in the Moodle [Tracker](https://docs.moodle.org/dev/Tracker), so please vote for what you want! Other influences include general discussion, surveys and feature requests at Moodle Moots and in the Moodle forums. +The [Roadmap](./roadmap.md) lists the new features being developed for the next major version. This list is derived mostly from the issues with large numbers of votes in the Moodle [Tracker](/general/development/tracker/guide), so please vote for what you want! Other influences include general discussion, surveys and feature requests at Moodle Moots and in the Moodle forums. Component leads decide on features in individual components so make your case to them! diff --git a/package.json b/package.json index cbcdc26b89..b8860059bf 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "hast-util-from-parse5": "^5.0.0", "mdx-mermaid": "^1.2.2", "mermaid": "^8.14.0", + "netlify": "^11.0.1", "plugin-image-zoom": "flexanalytics/plugin-image-zoom", "prism-react-renderer": "^1.3.1", "raw-loader": "^4.0.2", diff --git a/scripts/getNetlifyBuildState.mjs b/scripts/getNetlifyBuildState.mjs new file mode 100755 index 0000000000..42e89315fa --- /dev/null +++ b/scripts/getNetlifyBuildState.mjs @@ -0,0 +1,78 @@ +#!/usr/bin/env node +/** + * Copyright (c) Moodle Pty Ltd. + * + * Moodle is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Moodle is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Moodle. If not, see . + */ +import { NetlifyAPI } from 'netlify'; +import { getLogger } from './utils.js'; +import { program } from 'commander'; + +const client = new NetlifyAPI(process.env.NETLIFY_API_SECRET); +const logger = getLogger(); + +const getBuildId = async (prNumber) => { + const builds = await client.listSiteBuilds({ + site_id: '3c056055-e1bd-4cfd-8a02-ed35ab7aedfa', + }); + const build = builds.find((data) => (data.sha === `pull/${prNumber}/head`)); + if (!build) { + return null; + } + + return client.getDeploy({ deploy_id: build.deploy_id }); +}; + +const pollUntilReady = async (prNumber, timeout = 300) => { + const startTime = Date.now(); + + do { + const build = await getBuildId(prNumber); + logger.debug('Checking'); + + if (build?.state === 'ready') { + return build; + } + } while (((Date.now() - startTime) / 1000) < timeout); + + return null; +}; + +const poll = async (prNumber, timeout = 450) => { + const deploy = await pollUntilReady(prNumber, timeout); + if (!deploy) { + logger.error(`Unable to find a build for ${prNumber}`); + process.exit(2); + } + + logger.debug(JSON.stringify(deploy, ' ')); + if (deploy.state === 'ready') { + console.log(deploy); + logger.info(`Build was successful and is available at ${deploy.deploy_ssl_url}`); + process.exit(0); + } + + logger.error('Unable to find a successful build'); + process.exit(1); +}; + +program + .name('getNetlifyBuildState') + .description('Get the Netlify Build State for a Pull Request') + .version('1.0.0') + .arguments(' Pull Request Number') + .action((pr) => { + poll(pr); + }) + .parse(process.argv); diff --git a/src/components/HomepageFeatures/index.js b/src/components/HomepageFeatures/index.js index 722752c2ed..577d7635ba 100644 --- a/src/components/HomepageFeatures/index.js +++ b/src/components/HomepageFeatures/index.js @@ -25,15 +25,16 @@ import Link from '@docusaurus/Link'; const FeatureList = [ { link: '/general/development/gettingstarted', - title: 'Quick start', + title: 'Getting started', Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, description: ( <> New to Moodle Development?
- Read our quick start to Moodle Development. + Our quick start guide helps you take your first steps. ), + linkText: 'Get Started', }, { link: '/general/development/policies/codingstyle', @@ -41,51 +42,82 @@ const FeatureList = [ Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, description: ( <> - Learn about our coding standards, styles, and conventions. + Read our style guidelines, including coding standards and naming conventions. ), + linkText: 'View Standards', }, { link: '/docs/apis', - title: 'Read our API Guides', + title: 'API Guides', Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, description: ( <> - Want to learn more about our APIs? -
- Learn about them through our series of deep-dive guides, complete with examples and explanations. + Learn all about Moodle APIs with our deep-dive guides, complete with examples and explanations. ), + linkText: 'Read API Guides', }, { link: '/general/community', - title: 'Join our community', + title: 'Developer community', + Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, + description: ( + <> + Join the open source community that makes Moodle. + + ), + linkText: 'Discover Communities', + }, + { + link: '/general/releases', + title: 'Release notes', Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, description: ( <> - Discover our community, and learn about our mission, and our roadmap. + Technical specs and new features of Moodle releases, supported versions and more. ), + linkText: 'Check the Release notes', + }, + { + link: '/docs/moodleapp', + title: 'Moodle App', + Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, + description: ( + <> + Interested in app development? Learn how to get started working with the Moodle App. + + ), + linkText: 'Learn More', }, ]; function Feature({ - Svg, link, title, description, + index, link, title, description, linkText, }) { return ( -
-
-
- -
-
- -

{title}

- -

{description}

+
+
+
+
+ + + +
+

{title}

+
+ {description} +
+
+ + + {linkText} + + +
@@ -96,10 +128,9 @@ export default function HomepageFeatures() { return (
-

Moodle Documentation

-
+
{FeatureList.map((props, idx) => ( - + ))}
diff --git a/src/components/HomepageFeatures/styles.module.css b/src/components/HomepageFeatures/styles.module.css index 3a36f24b82..9868c431d6 100644 --- a/src/components/HomepageFeatures/styles.module.css +++ b/src/components/HomepageFeatures/styles.module.css @@ -23,3 +23,127 @@ z-index: 1; content: ""; } + +.cards { + display: flex; + flex-wrap: wrap; + justify-content: center; +} + +.card { + flex: 0 0 30%; + padding: 1rem; + max-width: none; +} + +.card .card-inner { + display: flex; + flex-direction: column; + justify-content: center; + min-height: 16rem; + border-radius: 1rem; + height: 100%; + overflow: hidden; + position: relative; +} + +.card-content { + padding: 3rem; +} + +.card-content h2 { + vertical-align: middle; + padding: 2rem 0; + height: 6rem; +} + +.card-description { + min-height: 6rem; +} + +.card-button { + margin-top: 2rem; +} + +.card-button a { + background-color: #194866; + color: #fff; + border: solid 1px #194866; + border-radius: 2rem; + line-height: 2rem; + padding: 1rem 2rem; + display: inline-block; + text-decoration: none; + transition: border-color 0.2s, background-color 0.2s, color 0.2s, line-heifght 0.2s; + width: auto; + font-size: 1.1rem; + text-align: left; + font-weight: 600; +} + +.card-button a:hover { + background-color: #f98012; + border-color: #194866; +} + +.card-corner { + shape-outside: circle(30%) margin-box; + width: 180px; + height: 180px; + margin-top: -130px; + margin-right: -120px; + float: right; +} + +.card-corner svg { + fill: var(--ifm-color-primary); +} + +.card-0 .card-inner { + background-color: #194866; + color: white; +} + +.card-0 .card-corner svg { + fill: #69e0ff; +} + +.card-0 .card-button a { + border-color: white; + color: white; +} + +.card-1 .card-inner { + background-color: #fedfc1; + color: #545454; +} + +.card-1 .card-corner svg { + fill: #bd5b00; +} + +.card-1 .card-button a { + border-color: #545454; + color: #545454; + background-color: transparent; +} + +.card-2 .card-inner { + border-color: #69e0ff; + background-color: #69e0ff; + color: #194866; +} + +.card-2 .card-corner svg { + fill: #bd5b00; +} + +.card-3 .card-inner { + border-color: #bd5b00; + background-color: #bd5b00; + color: #fff; +} + +.card-3 .card-corner svg { + fill: #fedfc1; +} diff --git a/src/css/custom.css b/src/css/custom.css index d42d8dac52..77e41efabb 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -1,3 +1,5 @@ +/* stylelint-disable selector-class-pattern */ + /** * Any CSS included here will be global. The classic template * bundles Infima by default. Infima is a CSS framework designed to @@ -13,6 +15,19 @@ --ifm-color-primary-light: #d06400; --ifm-color-primary-lighter: #d96900; --ifm-color-primary-lightest: #f67600; + --ifm-color-contrasting: #194866; + --ifm-font-family-base: "Open Sans"; + --ifm-navbar-height: 5.5rem; + --ifm-navbar-padding-horizontal: 5.5rem; + --ifm-navbar-padding-vertical: 0; + --ifm-navbar-link-color: #194866; + --ifm-navbar-link-hover-color: #bd5b00; +} + +@media (max-width: 767px) { + :root { + --ifm-navbar-sidebar-width: 100vw; + } } /* For readability concerns, you should choose a lighter palette in dark mode. */ @@ -24,6 +39,9 @@ --ifm-color-primary-light: #f6a65b; --ifm-color-primary-lighter: #f6ae69; --ifm-color-primary-lightest: #f9c595; + --ifm-color-contrasting: var(--ifm-color-primary-lightest); + --ifm-navbar-link-color: #f0c505; + --ifm-navbar-link-hover-color: #f27e13; } .docusaurus-highlight-code-line { @@ -40,3 +58,63 @@ .docusaurus-hidden { display: none; } + +html { + font-family: "Open Sans", sans-serif; +} + +@font-face { + font-family: "Open Sans"; + src: url("/static/font/OpenSans-VariableFont_wdth,wght.woff2") format("woff2"); +} + +.navbar__logo { + width: 12.5rem; +} + +.navbar__link { + border-bottom: solid 2px transparent; + border-top: solid 2px transparent; + box-sizing: content-box; + color: var(--ifmr-navbar-link-color); + font-size: 1rem; + font-weight: 600; + height: 3rem; + line-height: 3rem; + padding: 1rem 0; + transition: border-color 0.2s, color 0.2s, padding 0.2s; + margin-right: 2rem; +} + +.navbar__link:hover { + border-bottom-color: var(--ifm-navbar-link-hover-color); +} + +.navbar { + padding: 1rem; +} + +@media (min-width: 1200px) { + .navbar { + padding: var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal); + } +} + +@media (max-width: 1199px) { + .navbar-sidebar__brand { + padding: var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal); + } + + .navbar-sidebar__close, + .navbar__toggle { + padding: var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal); + position: absolute; + right: var(--ifm-menu-link-padding-horizontal); + } +} + +@media (max-width: 576px) { + :root .markdown h1 { + --ifm-h1-font-size: 3rem; + } +} diff --git a/src/pages/index.js b/src/pages/index.js index 75e796e254..a7ded3e652 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -18,25 +18,27 @@ import React from 'react'; import clsx from 'clsx'; import Layout from '@theme/Layout'; -import Link from '@docusaurus/Link'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import styles from './index.module.css'; import HomepageFeatures from '@site/src/components/HomepageFeatures'; function HomepageHeader() { - const { siteConfig } = useDocusaurusContext(); return ( -
-
-

{siteConfig.title}

-

{siteConfig.tagline}

-
- - Quick start - 5min ⏱️ - +
+
+
+

+ Developer +
+ Resource centre +

+
+
+
+

+ Learn how to build, develop, + and contribute to the world's most customisable Learning Management System. +

+
diff --git a/src/pages/index.module.css b/src/pages/index.module.css index c95a66c11e..567a488f66 100644 --- a/src/pages/index.module.css +++ b/src/pages/index.module.css @@ -5,10 +5,7 @@ .hero-banner { padding: 4rem 0; - text-align: center; - position: relative; - overflow: hidden; - background-color: #bd5b00; + width: 100%; } @media screen and (max-width: 996px) { @@ -22,3 +19,65 @@ align-items: center; justify-content: center; } + +.header-content { + padding-bottom: 4rem; + padding-top: 6rem; +} + +@media (max-width: 767px) { + .header-content { + padding-bottom: 2rem; + } +} + +.header-title { + flex: 0 0 56%; +} + +@media (min-width: 1024px) { + .header-content-inner { + display: flex; + justify-content: space-between; + } + + .header-right { + display: flex; + flex-direction: column; + justify-content: flex-start; + flex: 0 0 370px; + min-height: 100%; + margin-left: 60px; + margin-top: 0; + position: relative; + max-width: 500px; + } + + .copy { + padding: 2rem; + } +} + +@font-face { + font-family: "DM Sans Serif"; + src: url("/static/font/DMSerifDisplay-Regular.woff2") format("woff2"); +} + +h1 { + --ifm-h1-font-size: 4.5rem; + + font-family: "DM Sans Serif", sans-serif; + color: var(--ifm-color-contrasting); + font-weight: normal; +} + +h1 em { + color: #f98012; + font-style: normal; +} + +@media (max-width: 1023px) { + h1 { + max-width: 600px; + } +} diff --git a/src/theme/ColorModeToggle/index.js b/src/theme/ColorModeToggle/index.js new file mode 100644 index 0000000000..5539642e34 --- /dev/null +++ b/src/theme/ColorModeToggle/index.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) Moodle Pty Ltd. + * + * Moodle is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Moodle is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Moodle. If not, see . + */ + +import React from 'react'; +import ColorModeToggle from '@theme-original/ColorModeToggle'; +import styles from './index.module.css'; + +export default function ColorModeToggleWrapper(props) { + return ( +
+ +
+ ); +} diff --git a/src/theme/ColorModeToggle/index.module.css b/src/theme/ColorModeToggle/index.module.css new file mode 100644 index 0000000000..97095f31d0 --- /dev/null +++ b/src/theme/ColorModeToggle/index.module.css @@ -0,0 +1,5 @@ +.wrapper { + position: absolute; + right: calc(var(--ifm-menu-link-padding-horizontal) * 4); + float: right; +} diff --git a/static/font/DMSerifDisplay-Regular.woff2 b/static/font/DMSerifDisplay-Regular.woff2 new file mode 100644 index 0000000000..2c1056e31e Binary files /dev/null and b/static/font/DMSerifDisplay-Regular.woff2 differ diff --git a/static/font/OpenSans-Italic-VariableFont_wdth,wght.woff2 b/static/font/OpenSans-Italic-VariableFont_wdth,wght.woff2 new file mode 100644 index 0000000000..57fca025d7 Binary files /dev/null and b/static/font/OpenSans-Italic-VariableFont_wdth,wght.woff2 differ diff --git a/static/font/OpenSans-VariableFont_wdth,wght.woff2 b/static/font/OpenSans-VariableFont_wdth,wght.woff2 new file mode 100644 index 0000000000..be7804afbb Binary files /dev/null and b/static/font/OpenSans-VariableFont_wdth,wght.woff2 differ diff --git a/static/img/Moodle.svg b/static/img/Moodle.svg new file mode 100644 index 0000000000..47ceb3633b --- /dev/null +++ b/static/img/Moodle.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/yarn.lock b/yarn.lock index 7efc9946bc..b70516e7b4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3149,6 +3149,11 @@ prop-types "^15.7.2" react-is "^17.0.2" +"@netlify/open-api@^2.8.0": + version "2.9.0" + resolved "https://registry.yarnpkg.com/@netlify/open-api/-/open-api-2.9.0.tgz#3fd18a95c06e7f11aad20b15c1e525accc86369f" + integrity sha512-XhGmVR8gldH9+3CzBg8C7aj7x/cThzlW/ob/o8ZAGMMJ7aVjs8WqzYpVsjdo4nulYi0zd0enlcuG9VwM1tsJyA== + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -9565,6 +9570,11 @@ lodash.bind@^4.1.4: resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35" integrity sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU= +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== + lodash.curry@^4.0.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.curry/-/lodash.curry-4.1.1.tgz#248e36072ede906501d75966200a86dab8b23170" @@ -9970,6 +9980,11 @@ methods@~1.1.2: resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= +micro-api-client@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/micro-api-client/-/micro-api-client-3.3.0.tgz#52dd567d322f10faffe63d19d4feeac4e4ffd215" + integrity sha512-y0y6CUB9RLVsy3kfgayU28746QrNMpSm9O/AYGNsBgOkJr/X/Jk0VLGoO8Ude7Bpa8adywzF+MzXNZRFRsNPhg== + micromark@~2.11.0: version "2.11.4" resolved "https://registry.yarnpkg.com/micromark/-/micromark-2.11.4.tgz#d13436138eea826383e822449c9a5c50ee44665a" @@ -10161,6 +10176,19 @@ netlify-plugin-cache@^1.0.3: resolved "https://registry.yarnpkg.com/netlify-plugin-cache/-/netlify-plugin-cache-1.0.3.tgz#f60514e259dff2b3286b6d60b570bb1c81206794" integrity sha512-CTOwNWrTOP59T6y6unxQNnp1WX702v2R/faR5peSH94ebrYfyY4zT5IsRcIiHKq57jXeyCrhy0GLuTN8ktzuQg== +netlify@^11.0.1: + version "11.0.1" + resolved "https://registry.yarnpkg.com/netlify/-/netlify-11.0.1.tgz#ab2551001e3d2d845ac0c14c2138427c90a3935e" + integrity sha512-TkVuTvmhlAtvAdgqb+iA5wMehEHS5QcPOrULm1t809Q6KmZIhe+7b0+jwZSsDqgX3OWK/P3xgk/AU0ZbTv7ufw== + dependencies: + "@netlify/open-api" "^2.8.0" + lodash.camelcase "^4.3.0" + micro-api-client "^3.3.0" + node-fetch "^3.0.0" + omit.js "^2.0.2" + p-wait-for "^4.0.0" + qs "^6.9.6" + no-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" @@ -10188,6 +10216,15 @@ node-fetch@2.6.7: dependencies: whatwg-url "^5.0.0" +node-fetch@^3.0.0: + version "3.2.5" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.2.5.tgz#7d31da657804db5185540ddac7ddd516a9a2bd26" + integrity sha512-u7zCHdJp8JXBwF09mMfo2CL6kp37TslDl1KP3hRGTlCInBtag+UO3LGVy+NF0VzvnL3PVMpA2hXh1EtECFnyhQ== + dependencies: + data-uri-to-buffer "^4.0.0" + fetch-blob "^3.1.4" + formdata-polyfill "^4.0.10" + node-fetch@^3.2.4: version "3.2.4" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.2.4.tgz#3fbca2d8838111048232de54cb532bd3cf134947" @@ -10381,6 +10418,11 @@ obuf@^1.0.0, obuf@^1.1.2: resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== +omit.js@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/omit.js/-/omit.js-2.0.2.tgz#dd9b8436fab947a5f3ff214cb2538631e313ec2f" + integrity sha512-hJmu9D+bNB40YpL9jYebQl4lsTW6yEHRTroJzNLqQJYHm7c+NQnJGfZmIWh8S3q3KoaxV1aLhV6B3+0N0/kyJg== + on-finished@2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" @@ -10541,6 +10583,11 @@ p-retry@^4.5.0: "@types/retry" "^0.12.0" retry "^0.13.1" +p-timeout@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-5.1.0.tgz#b3c691cf4415138ce2d9cfe071dba11f0fee085b" + integrity sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew== + p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" @@ -10551,6 +10598,13 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== +p-wait-for@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-wait-for/-/p-wait-for-4.1.0.tgz#290f126f49bbd7c84e0cedccb342cd631aaa0f16" + integrity sha512-i8nE5q++9h8oaQHWltS1Tnnv4IoMDOlqN7C0KFG2OdbK0iFJIt6CROZ8wfBM+K4Pxqfnq4C4lkkpXqTEpB5DZw== + dependencies: + p-timeout "^5.0.0" + package-json@^6.3.0: version "6.5.0" resolved "https://registry.yarnpkg.com/package-json/-/package-json-6.5.0.tgz#6feedaca35e75725876d0b0e64974697fed145b0" @@ -11216,7 +11270,7 @@ pure-color@^1.2.0: resolved "https://registry.yarnpkg.com/pure-color/-/pure-color-1.3.0.tgz#1fe064fb0ac851f0de61320a8bf796836422f33e" integrity sha1-H+Bk+wrIUfDeYTIKi/eWg2Qi8z4= -qs@6.10.3: +qs@6.10.3, qs@^6.9.6: version "6.10.3" resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.3.tgz#d6cde1b2ffca87b5aa57889816c5f81535e22e8e" integrity sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==