Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ucfopen/materia-server-client-assets
Common Javascript and CSS resources needed for Materia and the Materia Widget Development Kit.
https://github.com/ucfopen/materia-server-client-assets
hacktoberfest materia
Last synced: about 2 months ago
JSON representation
Common Javascript and CSS resources needed for Materia and the Materia Widget Development Kit.
- Host: GitHub
- URL: https://github.com/ucfopen/materia-server-client-assets
- Owner: ucfopen
- License: agpl-3.0
- Created: 2018-08-26T22:58:53.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-11T19:33:36.000Z (about 1 year ago)
- Last Synced: 2024-10-29T00:45:22.414Z (2 months ago)
- Topics: hacktoberfest, materia
- Language: JavaScript
- Homepage: https://ucfopen.github.io/Materia-Docs/
- Size: 3.39 MB
- Stars: 3
- Watchers: 5
- Forks: 10
- Open Issues: 40
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Materia Client Assets
## This repository is now deprecated. No additional commits to this repo are expected.
As of Materia v10.0.0, all static assets - JS and CSS - have been re-authored and re-integrated into the main repository. This repository will persist, but only for archival purposes.
---
This repository contains all the javascript and css needed for the Materia Server and some assets needed for the Materia Widget Development Kit.
Visit the [Materia Documentation](https://ucfopen.github.io/Materia-Docs) for more information.
# Conventions and Guidelines
## Angular
* Each module is in it's own file, in a directory matching the type of module it is
* use dashes to seperate words in file names
* tests use the same name of the module they are testing (`module.js` and `module.test.js`)
* file names start with the type of module it is: `filter-`, `dir-`, `ctrl-`, `srv-`
* reusable code that has a wider scope then a single module is placed in a service module### Order of Code Angular Controllers
By convention, all controllers are written in a certain order from top to bottom:
1. Variables and constants used in the controller
2. Function defenitions, do define directly on $scope
3. Expose variables and methods to $scope
4. Initialize state```javascript
const app = angular.module('materia')
app.controller('peopleController', function($scope) {
// define vars and consts
let _people = []// define functions
const _sortNames = (a, b) => `${a.first} ${a.last}`.localeCompare(`${b.first} ${b.last}`)const getPeople () => {
// load users from some place
_people.sort(_sortNames)
$scope.people = _people
}// Expose on scope
$scope.people = []
$scope.getPeople = getPeople// initialize
getPeople()
})
```