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/obsoletePages.json b/data/obsoletePages.json index b1204d2624..ce4d0568a0 100644 --- a/data/obsoletePages.json +++ b/data/obsoletePages.json @@ -1,16 +1,28 @@ [ "2.3 icons versus 2.4", "2.4 Test Plan", + "2.7 Outcomes rubric outcomes", + "2.7 Outcomes scope", "A standard set of fixtures for unit tests?", "ADO connection object", "ADOdb", "AJAX marking block", + "AJAX mod editing", + "AJAX pre 2.9", + "ARIA", + "ASCII", + "Acceptance testing/Compatibility changes", + "Acceptance testing/Contributing to Moodle behat extension", "Accessibility notes", + "Activity Locking", + "Activity module tests", "Adaptive questions", "Add element", + "Add-ons trust model", "Adding blocks to lesson", "Adding courses and categories to the custom menu", "Address Bar", + "Advertising policy", "Alternate Icon Set", "Alternative Moodle API", "Anonymous Users", @@ -18,6 +30,7 @@ "Archive release process", "Aria Guidelines", "Auth External Database Release Notes", + "Auto-feedback shortanswer question", "Automatic Course Archival", "Backup 2.0", "Backup 2.0 - Converters review 2011-04", @@ -31,18 +44,23 @@ "Backup 2.0 requirements", "Backup and Restore UI Improvements", "Backup roles 1.7", + "Behat Driver Update", "Big Select List", "Blank Your Monitor and Easy Reading extension for Firefox", "Block formslib", "Blocks 2.0.3 UI", "Blocks/Appendix B", "Blocks/Appendix C", + "Blocks/Blocks for 1.5 to 1.9", "Bugathon", "Button", "CSS styles color.css", "CSS styles fonts.css", "CSS styles layout.css", "Caching system (proposed)", + "Calculated question function find all question dataset names", + "Capturing and sending to the server selection user piece of text on the web page", + "Categories editing interface improvment", "Center Forum Posts", "Chameleon theme", "Changes to issue assignment", @@ -57,22 +75,35 @@ "Cool Course Competition", "Course automation", "Course format ideas", + "Courses lists upgrade to 2.5", "Create YUI3 Module For Moodle", + "Creating a custom theme", "Creating a theme", "Creating different custom menu bars for different courses", "Creating roles programmatically", "Curl refactor proposal", "Custom Corners", "Custom corners theme", + "DDL functions - pre 2.0", + "DML functions - pre 2.0", + "DSpace Repository Plugin", + "DTL functions", "Database FAQ", "Database schema introduction", "Datalib notes", + "Debian Packaging Team", "Default Courses Extension", + "Deprecated functions in 2.0", "Developer Mode", "Developer notes", "Development:Developer FAQ", + "Dialogue 2.0 specification", + "Do we need named parameters", "Document Management API", + "Drag and drop question type flash development", "Dropdown Lists", + "Email processing", + "Email processing)", "Enroll External Database Release Notes", "Enrolment plugins 2.0", "Enrolment rewrite and role tweaks proposal", @@ -80,16 +111,24 @@ "Enrolment rewrite and role tweaks proposal - the fightback", "Events Subscriptions / Notifications sub-system", "Fast portable SQL", + "FebruaryPlatformSDK", "Feedback", + "Feedback (User Interface Guideline)", "Feedback page", "File API (old)", "Filters 1.9 and before", "Finding your way into the Moodle code", + "FirePHP", + "Firefox", "Firefox tracker search", "Fix a Moodle bug", "Fixed-width theme", + "Flexpage", + "Flickr Repository Plugin", "Footer positioning", "Form", + "Forum thread subscription", + "Free Dean's Office", "GSOC expectations", "Getting Started With Moodle Java Script Coding", "Git Migration", @@ -101,8 +140,11 @@ "Groupings and Groups", "Groups", "Groups documentation for module developers", + "Guide to adding third party jQuery for AMD", "Guideline template", "Header logo", + "Hijax", + "Hinting question behaviours(VSTU)", "Homepage design", "How Moodle outputs HTML", "How groups work in Moodle", @@ -114,11 +156,15 @@ "JavaScript namespacing proposal", "JavaScript usage guide", "Javascript Custom Modal Window", + "Javascript FAQ", + "Javascript-interface for repeat elements function", "Jira as a Test Case Management Software", + "LESS", "Language packs without maintainer", "Languages:Tim's crazy proposal based on maketext", "Left-align quiz", "Link", + "Linked activities", "Local customisation (Moodle 1.9)", "Logging API", "MDLQA-features", @@ -128,6 +174,9 @@ "Maintaining Moodle with Dreamweaver", "Major usability issues in Moodle", "Making a horizontal dock", + "MediaWiki TeX test", + "Migrating From WebCT To Moodle At UQÀM", + "Migrating contrib code to 2.0", "Migrating your code to the 2.0 rendering API", "Mnet 1.0 progress", "Moodle Accessibility Specification", @@ -155,11 +204,16 @@ "Moodle Mobile Development Process", "Moodle Mobile Testing with Phonegap Developer app", "Moodle Mobile custom apps", + "Moodle User Interface Guidelines", "Moodle User Interface Guidelines:Help requested", "Moodle forms library", + "Moodle-specific customisations to the HTML editor", + "MoodleMoot 2007 HackFest", "More theme", "NWiki roadmap", + "NanoGong/Converting to Moodle 2.0", "Navigation 2.0", + "Navigation 2.0 structure", "Notes about legacy page classes", "Offline Moodle", "Offline Moodle Create Environment", @@ -167,14 +221,19 @@ "Offline Moodle: Incremental Backups", "Old Events API", "Output Components", + "Overview of MFM code", "PHP5", + "POAS Assignment development", "Page structure and types", "Performance 2.x", + "Perth Hackfest October 2012/AJAX", "Plan to Convert question bank to activity module", + "Postgres Tuning For Developers", "Progressive Disclosure", "Progressive Disclosure Implementation", "Projects for new developers", "Question type plugin how to", + "Question-lesson link", "Quiz UI redesign - prototype testing background", "Radio button", "Ratings 2.0", @@ -185,11 +244,14 @@ "Replacing icons with CSS3", "Report Builder Specification", "Repository File Picker", + "Resource types", "Role overrides revisited", "Roles administration improvements for Moodle 2.0", "Roles and modules", "SSH key", + "Save category description in Moodle XML import/export", "Search engine adapters", + "Seattle Academy", "Setting up Eclipse", "Setting up Netbeans", "Setting up Sublime2", @@ -197,6 +259,7 @@ "Site-wide groups", "Slashes", "Snapshot - flat HTML export of complete course", + "Sortable list", "States of a quiz attempt", "Stats roles 1.7", "Student projects/Customisable theme", @@ -205,15 +268,22 @@ "Stylish", "Sub Groups", "Switch Button", + "T-shirt sizes", "Talk:Moodle User Interface Guidelines", + "Tasks completed", + "Temas 2.0", + "Temas 2.0 criando seu primeiro tema", "Theme changes in 2.0", "Theme config file", "Theme directory guide", "Theme reference", + "Theme upgrade notes", "Themes 1.9", "Themes 2.2 how to clone a Moodle 2.2 theme", + "Tim's Gradebook thoughts", "TinyMCE Upgrade", "Tooltip", + "TopicmapsWithMoodle", "Tracking Moodle CVS with git", "Translating Moodle video subtitles", "Translating User tours from Moodle.net", @@ -234,26 +304,89 @@ "UTF-8 solution", "UTF-8 unicode", "Unit test API", + "Unity Webapp", "Unsolved problems in roles", "Upgrading Airnotifier", + "Upgrading to Moodle 1.9", "Usability", "Usability FAQ", "Usability testing in August 2008/Test setting and tasks / background", "Usability testing protocol", "User Data Always Safe", "Using jQuery with Moodle", + "VSTU projects", "Virtual Sites", + "Voice", + "Voice Changelog", + "Voice Forms", + "Voice GsocFormslibExercise", + "Voice Moodle", + "Voice Navigation", + "Voice Project", + "Voice Timelog", + "Voice Timeplan", + "Voice ToDo", + "Voice VoiceXML", + "Voice VoiceXML Examples", + "Voice/GsocFormslibExercise", + "Voice/Moodle", + "Voice/Project", + "Voice/VoiceXML", "VoiceXML", "W3C validation", "Web Services:OK Tech Web Services", "Web developer extension", "Web services API Changes", + "Web services API for 1.9", "Weekly Code Review", + "Wiki features", + "Wikindx", + "Windows Installer", + "Windows Installer anywhere", "Wizard", "Wizard Examples and Code Samples", "WolframAlpha", + "Writing tests", "XHTML", + "YUI/Patching", + "YUI/Shifter", + "customscripts", + "how to distribute iPhone test app", + "iPhone App Development Process", + "ilp block", "jQuery pre2.9", + "lib/formslib.php", + "lib/moodlelib.php", + "mnet phase2", + "mod form extension specification", + "mod form.php", + "mod forum-subscriptions", + "quiz navigation", "reportbuilder", - "reportbuilder/API" + "reportbuilder/A Basic Join", + "reportbuilder/Adding a Column", + "reportbuilder/Adding a Filter", + "reportbuilder/Advanced Column Options", + "reportbuilder/Advanced Filter Options", + "reportbuilder/Advanced Joins", + "reportbuilder/Column Display Functions", + "reportbuilder/Combining Multiple Fields", + "reportbuilder/Features", + "reportbuilder/General Report Options", + "reportbuilder/Grouping and Aggregation", + "reportbuilder/Hello World Source", + "reportbuilder/Overview", + "reportbuilder/Predefined Common Options", + "reportbuilder/Setting Default Columns and Filters", + "reportbuilder/Sources", + "reportbuilder/Totara thoughts on integration", + "reportbuilder/Work outline", + "reportbuilder/benchmarks", + "reportbuilder/embeddedoverview", + "reportbuilder/spec as user stories", + "sandbox", + "testing LDAP on a Mac", + "tool pluginkenobi", + "unify all activities and resources", + "zIndex" ] \ No newline at end of file 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==