polleverywhere/quote_server

Name: quote_server

Owner: Poll Everywhere

Description: Example of a web server that adapts content for display in a presentation.

Created: 2015-07-20 07:25:12.0

Updated: 2015-11-21 01:44:09.0

Pushed: 2015-07-20 18:19:13.0

Homepage: null

Size: 160

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Example Live Slides application

This example application demonstrates how to build a web server that responds to the Live Slides slide color headers and the projector CSS media type.

Getting started
  1. Clone this repo:

    t clone git@github.com:liveslides/quote_server.git && cd ./quote_server
    
  2. Install dependencies via bundler:

    ndle
    
  3. Run the Sinatra web server:

    by quote_server.rb
    
  4. Open http://127.0.0.1:4567 on your web browser and you should see white quote text on a black background.

Simulate a Live Slides request

To simulate a Live Slides HTTP request, run the following:

rl http://127.0.0.1:4567/projector.css \
 "Slide-Background-Color: #000000" \
 "Slide-Foreground-Color: #ffffff"

You should get an output like this:

 {
lor: #ffffff;
ckground-color: #000000;
nt-family: sans-serif;

How it works

Live Slides makes all requests with the Slide-Background-Color and Slide-Foreground-Color requests. Your applicaiton can read these headers to change the look and feel of the content to more closely match the presenters formatting.

It's recommended that you dynamically generate stylesheets based on these headers that is applied to the content. The stylesheets should be a projection CSS media type.


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.