{"id":19098474,"url":"https://github.com/ucfopen/materia-theme-ucf","last_synced_at":"2026-06-04T16:31:49.045Z","repository":{"id":81722896,"uuid":"159388062","full_name":"ucfopen/Materia-Theme-UCF","owner":"ucfopen","description":"Materia theme used for UCF","archived":false,"fork":false,"pushed_at":"2024-12-06T21:17:27.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-03T00:51:27.389Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ucfopen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-27T19:28:16.000Z","updated_at":"2024-12-06T21:17:30.000Z","dependencies_parsed_at":"2023-10-02T18:01:01.975Z","dependency_job_id":"c5c62792-4147-4d4e-92ed-6d721d8f45c9","html_url":"https://github.com/ucfopen/Materia-Theme-UCF","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ucfopen%2FMateria-Theme-UCF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ucfopen%2FMateria-Theme-UCF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ucfopen%2FMateria-Theme-UCF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ucfopen%2FMateria-Theme-UCF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ucfopen","download_url":"https://codeload.github.com/ucfopen/Materia-Theme-UCF/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240152168,"owners_count":19756035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T03:46:00.937Z","updated_at":"2026-05-27T11:30:18.943Z","avatar_url":"https://github.com/ucfopen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Materia Theme for UCF\n\nThis repository contains the customized theme for the Materia server at UCF.\n\nVisit the [Materia Documentation](https://ucfopen.github.io/Materia-Docs) for more information.\n\n## Installing Theme into Materia\n\nAdd a custom repository to your Composer config:\n\n`composer config repositories.ucftheme '{\"type\": \"package\", \"package\": { \"name\": \"ucfopen/materia-theme-ucf\", \"type\": \"fuel-package\", \"version\": \"1.0.0\", \"source\": { \"no-api\": true, \"url\": \"https://github.com/ucfopen/Materia-Theme-UCF.git\", \"type\": \"git\", \"reference\": \"master\"}}}'`\n\nAdd as a dependency:\n\n`composer require ucfopen/materia-theme-ucf:2.0.0 --no-update`\n\nInstall the package: \n\n`composer update --optimize`\n\n\u003e Note: if this is a production deploy you may want to add `--no-dev` to the update command.\n\nTell Materia to use the theme:\n\nEnsure the `THEME_PACKAGE` environment variable is set to the name of your theme. If additional paths are required, you can add them by modifying `fuel/app/config/ENVIRONMENT/theme.php` with the following:\n\n```\n\u003c?php\n\nreturn [\n\t'active' =\u003e 'ucf',\n\t'paths' =\u003e array(\n\t\tAPPPATH.'themes',\n\t\tPKGPATH.'materia-theme-ucf',\n\t),\n];\n```\n\nAdditionally, as of Materia v10.0.0, it is required to add your theme package to the `FUEL_ALWAYS_LOAD_PACKAGES` environment variable:\n\n```\nFUEL_ALWAYS_LOAD_PACKAGES=\"orm,auth,materiaauth,ltiauth,materia-theme-ucf\"\n```\n\n### Custom Theming in Materia 10.0+ \n\nThe implementation of themes changes significantly with the introduction of Materia v10 and the incorporation of JavaScript and CSS assets back into the main repository. As such, some special considerations are required when authoring your own custom theme:\n\n#### Routing in the theme.php class\n\nMateria-Theme-UCF uses Event triggers in FuelPHP to return objects that describe the JS and CSS associated with a particular view. For example:\n\nIn `bootstrap.php` we register the event and callback:\n```\n\\Event::register('before_widget_login', 'UcfTheme\\\\UcfTheme::widget_login_redirect');\n```\nCorrespondingly, in the theme.php file (`ucftheme.php` for us):\n\n```\npublic static function widget_login_redirect()\n\t{\n\t\treturn [\n\t\t\t'css' =\u003e 'login',\n\t\t\t'js' =\u003e 'saml-login'\n\t\t];\n\t}\n```\n\nEach callback should return an array with a `js` and `css` index. The values correspond to groups that are appended to existing JS and CSS groups in the `js.php` and `css.php` configs, respectively. You can use existing groups (that are part of Materia itself) or add your own. Just make sure you include your own `config/js.php` or `config/css.php` file that includes the new groups.\n\nWebpack is configured to search `fuel/packages` for JS assets to append to its entry object by default. Each JS asset in the theme's `src/js` directory will be appended to the manifest emitted by webpack to `public/dist`.\n\nOn the Materia side, controllers can trigger an event and confirm if a corresponding theme registers a response. Consider this example:\n\n```\n$theme_overrides = \\Event::Trigger('before_widget_login', '', 'array');\n\tif ($theme_overrides)\n\t{\n\t\t$this-\u003etheme-\u003eset_template('layouts/react');\n\t\t$this-\u003etheme-\u003eget_template()\n\t\t\t-\u003eset('title', 'Login')\n\t\t\t-\u003eset('page_type', 'login');\n\n\t\tCss::push_group([$theme_overrides[0]['css']]);\n\t\tJs::push_group(['react', $theme_overrides[0]['js']]);\n\t}\n```\n\nIf `$theme_overrides` is populated, we use `Css::push_group()` and `Js::push_group()` to emit the values of the `css` and `js` array properties. If `$theme_overrides` does not return a value, we should instead render the default view associated with the controller method.\n\n#### Lang Configuration\n\nMateria-Theme-UCF additionally leverages FuelPHP's lang class to include theme-specific strings to certain views. We use it to include support information specific to UCF. You can choose to extend this feature to include additional strings, if desired. Make sure you include the required line in `bootstrap.php`:\n\n```\n\\Config::set('materia.lang_path.support', PKGPATH.'materia-theme-ucf');\n```\n\nLang strings can be acquired by using, for example, `\\Lang::get('support.sections')`. `sections` refers to the array index value in the `support.php` file in `config/lang/en`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fucfopen%2Fmateria-theme-ucf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fucfopen%2Fmateria-theme-ucf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fucfopen%2Fmateria-theme-ucf/lists"}