Giter Club home page Giter Club logo

themeswitcher's Introduction

CSH ThemeSwitcher

A service that allows the user to preview and select a bootstrap theme which can then be pulled to other services via an api to allow a continuous, user customised experience across various CSH services.

Themeswitcher uses node and express to serve the static site and preform api routing, OIDC for authentication, AngularJS for a responsive frontend, and bootstrap for styling.

API

https://themeswitcher.csh.rit.edu/api/get Redirects to the currently logged in member's theme.

https://themeswitcher.csh.rit.edu/api/colour Returns the theme's primary colour, e.g. #ffffff

Implement as:

<link rel="stylesheet" href="https://themeswitcher.csh.rit.edu/api/get" media="screen">

Contributing

Pull Requests

To contribute to themeswitcher, please fork this repository and submit a pull request. If it is a significant change (more than a couple lines) please create a new branch. Excluding ReadMe changes, pull requests to site will not be accepted.

Issues

As themeswitcher is hosted on GitHub, it uses GitHub's issue tracker to document issues. Please open any issues there.

Adding Themes

Themes are stored in /pub/data/themes.json in the style of

  {
    "name": "Material",
    "shortName": "csh-material-bootstrap",
    "cdn": "https://s3.csh.rit.edu/csh-material-bootstrap/4.0.0/dist/csh-material-bootstrap.min.css",
    "colour": "b0197e"
  },

If you'd like to add a theme, add it to themes.json in the same pattern, detailed below.

  • name: The string to display in the selector. This is how your theme is identified to users.
  • shortName: A string to identify your theme to the api. Cannot include spaces.
  • cdn: The url to the minified stylesheet.
  • colour: The primary colour of the theme.

All themes should be bootstrap ~>4.1.2

themeswitcher's People

Contributors

asimonson1125 avatar devinmatte avatar joeleager avatar jsangsrichan avatar mfrancis95 avatar mobmaker55 avatar mxmeinhold avatar ramzallan avatar rdausilio avatar willnilges avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

themeswitcher's Issues

No fallback if not authed

If some pyoidc app fails to refresh sso, themeswitcher will return the login page.... which is html, not css.

Return a nice, default css, so stuff doesn't break.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.