Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds QR-CODE API to request the latest Poll-URL via QR-Code #97

Merged
merged 8 commits into from
May 17, 2021
Merged

Adds QR-CODE API to request the latest Poll-URL via QR-Code #97

merged 8 commits into from
May 17, 2021

Conversation

foxytocin
Copy link
Contributor

@foxytocin foxytocin commented May 16, 2021

QR-CODE API

This adds a new route and functionality to the API
/qrcode

This will response with a page with a qr-code including the URL to the newest poll. In this way, viewers can simply scan the code to take part in the voting.

The qr-code page provides an forced transparent background, in this way it is perfect for use in OBS.

QR Code API to newest Poll by Andreas Fuchs https://anfuchs.com

For demo purposes, the QR code in the screenshot leads to my own website. In production it contains the url for the newest poll.

RESPONSIVE DESIGN

I added a responsive design to the voting page. Users who have followed the qr-code get an optimized display for voting, with larger buttons and more space around / between them.

To prevent merge conflicts, all style changes are in PR #95

Responsive Design for Voting Page by Andreas Fuchs https://anfuchs.com

Greetings Andi

@foxytocin
Copy link
Contributor Author

To retrieve the host address i'am using this code within route in web.js

const hostAddress = req.get('host');
const pollURL = `http://${hostAddress}/vote/${poll._id}`;

I am not entirely sure that this works with the way of hosting and that the correct url to the server can be determined. Also it's hardcoded to use http instead of https. Maybe this must be changed.

@shiffman
Copy link
Member

I'm going to go ahead and merge this and we can sort out #96 separately!

@shiffman shiffman merged commit c28e934 into CodingTrain:main May 17, 2021
shiffman pushed a commit that referenced this pull request May 25, 2021
* new options-button styling with hover effect

* moves everthing into a MAIN tag

* fixes some cross effects

* adds hover effect to vote button, fixes hover effects on selections

* fix

* fix

* textf-flow on poll-result view back to left orientated. to free up space on livestreams / overlays

* implement a qrcode api with the url to the newest poll

* removes authentification on qrcode to be able to display it within OBS

* Delete package-lock.json

* Delete package.json

* Revert "Delete package.json"

This reverts commit bf99793.

* fixes package.json

* saves styling parameters from url-query within a template data-attribute

* adds styling via url-params to all routes

* add missing options view
@foxytocin foxytocin deleted the qr-code branch May 25, 2021 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants