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

Particular Poll-View via optional URL-Parameters #96

Merged
merged 7 commits into from
May 17, 2021
Merged

Particular Poll-View via optional URL-Parameters #96

merged 7 commits into from
May 17, 2021

Conversation

foxytocin
Copy link
Contributor

@foxytocin foxytocin commented May 15, 2021

Here we go ... implements optional URL-Parameter to set the visual representation. That was a little tricky because of pug. I wasn't able the pass the variables directly to the footer.pug (the options menu). Therefore i've used a data-attribute within the poll.pug (template(data-styling=styling)) to pass the styling-attributes from the url-query-parameters around.

If url-query-parameters are submitted the localStorage attributes of font-simple, no-gradient and overlay-on are deleted and the url-query-parameters are prioritized to set the visual look.

Monotone Gradient
Parameter monotone accepts a boolean

monotone=true
monotone=false

Simple Font Option
Parameter simple accepts a boolean

simple=true
simple=false

Overlay Option
Parameter transparent accepts a boolean or a number (0 - 100)
true will be cast to 100 and false will be cast to 0
Values ​​between 0 and 100 reflect percentages and determine the level of transparency

transparent=true
transparent=false
transparent=0
transparent=100
  • transparent=100 -> background: rgba(255, 255, 255, 0);
  • transparent=70 -> background: rgba(255, 255, 255, 0.3);
  • transparent=50 -> background: rgba(255, 255, 255, 0.5);
  • transparent=20 -> background: rgba(255, 255, 255, 0.8);
  • transparent=0 -> background: rgba(255, 255, 255);

Endpoint

/poll/id?monotone=true&simple=true&transparent=true
/poll/id?monotone=true&simple=true&transparent=100

URL Parameters for OBS Overlay by Andreas Fuchs https://anfuchs.com

Greetings Andi

@shiffman
Copy link
Member

Wow, this is amazing!

@shiffman
Copy link
Member

Ooops, I decided to merge your pull requests in reverse chronological order but now there is a conflict! Happy to take a look myself but let me know if you have a chance to review the conflicts, thank you!!

@foxytocin
Copy link
Contributor Author

@shiffman Fortunately, I'm online right now and can look at it. I think it should fit that way. After the merge, I would also look at it again and correct it if the indentations in the .pug are not quite correct. Overall, I think that's how it works.

@shiffman
Copy link
Member

Ok, merging!

@shiffman shiffman merged commit 603d043 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 settings-endpoint 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