Skip to content

bhasterix/wasdev.github.io

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Pages for wasdev.github.io

Features

  • This pages displayes all repositories from github.com/wasdev
  • It allows the user to use a custom filter in the 'Filer Repositories' box.
  • It suggests a number of filters based on the prefix ie. selecting the 'Samples' filter box will filter the repositories to only show the repositories prefixed by 'sample'. These filter boxes have to be defined in the code, more details below.
  • It also suggests filters based on #tags found in the descriptions of the repos. As more #tags are used, the app will automatically add a filter box for it.
  • When one of these filters are selected, the URL changes. This is useful when linking a user to the page with a predefined filter.
  • The user is able to sort the repos based on the last time they were updated.

Style

The style is inherited from the wasdev.net and it's css files. github.css is the css file that contains all the styling specific to this page.

Scripting

The wasdev.net javascript is all contained in js/wasdev/ The scripting for this specific page was written using the Angular framework The GitHub API is called using the service in js/services/github.js The rest of the logic is contained in the single controller, js/controllers/MainController.js This is due to the small scope of the application.

The Controller

The GitHub API paginates its responses to HTTP requests. The maximum number of repos displayed per page is 100. Therefore we need to make multiple requesets in order to obtain all the repositores. This is performed in the getAllGitHubData() function, by parsing the HTTP response header to see if it refers to a following page. Once there are no more pages, we call the three functions, generateFilters, generateTags and pushToArray.

The primary functions within the controller deal with obtaining, parsing and formatting the list of repositories from the github organisation at github.com/wasdev

Testing

[Deploy to Bluemix](https://bluemix.net/deploy?repository=https://github.com/WASdev/wasdev.github.io # [required]) To test this website, either deploy to Bluemix or take a fork of this repo and push to your own GitHub page. In the 'MainController.js' file there are currently two query strings, '?test' and '?official', which currently link to a small test file and a raw copy of the official data (at the time the official.json file was created), respectively. You can add (or remove) as many of these query string parameters as you need and link them to raw json test data inside your repo to simulate any circumstances you require.

About

GitHub Pages for wasdev.github.io

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 55.1%
  • JavaScript 37.6%
  • HTML 7.1%
  • Vim Script 0.2%