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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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.
Clone this repo:
t clone git@github.com:liveslides/quote_server.git && cd ./quote_server
Install dependencies via bundler:
ndle
Run the Sinatra web server:
by quote_server.rb
Open http://127.0.0.1:4567
on your web browser and you should see white quote text on a black background.
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;
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.