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

Internal Shortcodes: vimeo_simple + vimeo (default) #4787

Closed
wants to merge 1 commit into from
Closed

Internal Shortcodes: vimeo_simple + vimeo (default) #4787

wants to merge 1 commit into from

Conversation

onedrawingperday
Copy link
Contributor

Based on the work of @bep see: 448081b
Related issue: #4749

Added the following:

  • A simple variant for Vimeo
  • Modified the Privacy Config to include simple mode for Vimeo
  • Added again __h_simple_assets.html and changed the classes prefix to __h_video since this is meant to be used in both Vimeo and (hopefully) YouTube simple shortcodes.
  • Added a SVG play button that I designed and release it under the Apache 2.0 Licence
  • Also updated the standard Vimeo shortcode.
  • Removed the frameborder attribute from the iframe because it is obsolete, added border: 0; and removed the 30px top-margin from the inline style.

N.B.
I was unable to have these changes reflected in a compiled binary. I think I'm missing something. I was able to run mage generate but still I didn't see anything new when I run go build.

I was only able to test these shortcodes locally when I included them in a Hugo project.

So this PR needs to be tested some more.

@onedrawingperday
Copy link
Contributor Author

@bep I tried to fix the following Test error for the Vimeo shortcode but it's beyond me.

I will leave this as is for now.
You can take whatever you want from this PR whenever you want.

FAIL: TestShortcodeVimeo (0.03s)
	Error Trace:	testhelpers_test.go:491
			embedded_shortcodes_test.go:265
	Error:      	Should be true
	Test:       	TestShortcodeVimeo
	Messages:   	File no match for
	            	"(?s)\n<div style=\".*?\">.*?<iframe src=\"//player.vimeo.com/video/146022717\" style=\".*?\" webkitallowfullscreen mozallowfullscreen allowfullscreen>.*?</iframe>.*?</div>\n" in
	            	"public\\simple\\index.html":
	            	
	            	 <div style="position: relative; padding-bottom: 56.25%%; padding-top: 0px; height: 0; overflow: hidden;">
	            	   <iframe src="//player.vimeo.com/video/146022717" style="position: absolute; top: 0; left: 0; width: 100%%; height: 100%%; border:0;" title="Vimeo Video" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
	            	 </div>
FAIL
FAIL	github.com/gohugoio/hugo/hugolib	26.669s 

@github-actions
Copy link

github-actions bot commented Feb 5, 2022

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant