bbc/device-switcher

Name: device-switcher

Owner: BBC

Description: :iphone: BBC Device Switcher

Created: 2015-12-09 11:39:37.0

Updated: 2018-05-05 11:51:02.0

Pushed: 2016-06-15 07:43:31.0

Homepage: http://bbc.github.io/device-switcher

Size: 489

Language: CSS

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

BBC News Labs
BBC Device Switcher
Description

The BBC Device Switcher is an open-source web app that has been designed to allow editorial staff and developers to view the websites upon which they work in their mobile, tablet and desktop forms, with ease.

Setup

Clone the BBC Device Switcher via the following command:

clone git@github.com:bbc/device-switcher.git

BBC Device Switcher uses the jQuery and RequireJS JavaScript libraries, which you may download using the Bower dependency management system.

Once you have installed Bower, execute the following command within the BBC Device Switcher directory to install the necessary dependencies:

r install

As the BBC Device Switcher is solely comprised of a single static web page, it is possible to test the app by opening index.html in a web browser.

However, if you would prefer to test the app on a server, you may instantiate one via the following Python command:

on -m SimpleHTTPServer 5705

and open the page via http://localhost:5705.

Parameters

Two parameters may be used to specify the state of the switcher:

Parameters should be specified after a hash (#) that follows the base News Switcher URL, like so:

Please note: in order to avoid the app being used maliciously, the demo of the app has been set up to only allow URLs of BBC web-pages to be specified in the url parameter; any other URLs will redirect to the BBC News website; to remove this behaviour on your own version of the Device Switcher, simply pass false as the value of the aIsDemo argument to the setUpSwitcher function

Fonts

The following font files have been used (and distributed under the SIL Open Font License, 1.1) to brand the BBC Device Switcher:


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.