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
Asset helper: video #396
Labels
Comments
I'll give this one a go... my first time contributing to Lotus though so it may take a little bit and I may have some questions :) |
@leighhalliday Lovely, thank you! Ping me here on in chat for questions 😄 |
leighhalliday
added a commit
to leighhalliday/helpers
that referenced
this issue
Nov 24, 2015
hanami/hanami#396 This commit exposes a `video` method to the view which can be used to generate HTML5 video tags. It accepts options to generate HTML attributes along with a block for creating fallback content and/or `source` and `track` tags.
leighhalliday
added a commit
to leighhalliday/helpers
that referenced
this issue
Nov 25, 2015
hanami/hanami#396 This commit exposes a `video` method to the view which can be used to generate HTML5 video tags. It accepts options to generate HTML attributes along with a block for creating fallback content and/or `source` and `track` tags.
leighhalliday
added a commit
to leighhalliday/lotus
that referenced
this issue
Dec 1, 2015
hanami#396 This commit exposes a `video` method to the view which can be used to generate HTML5 video tags. It accepts options to generate HTML attributes along with a block for creating fallback content and/or `source` and `track` tags.
Merged
leighhalliday
added a commit
to leighhalliday/lotus
that referenced
this issue
Dec 1, 2015
hanami#396 This commit exposes a `video` method to the view which can be used to generate HTML5 video tags. It accepts options to generate HTML attributes along with a block for creating fallback content and/or `source` and `track` tags.
leighhalliday
added a commit
to leighhalliday/lotus
that referenced
this issue
Dec 1, 2015
hanami#396 This commit exposes a `video` method to the view which can be used to generate HTML5 video tags. It accepts options to generate HTML attributes along with a block for creating fallback content and/or `source` and `track` tags.
Implemented by #407 |
jodosha
pushed a commit
to hanami/assets
that referenced
this issue
Dec 13, 2015
hanami/hanami#396 This commit exposes a `video` method to the view which can be used to generate HTML5 video tags. It accepts options to generate HTML attributes along with a block for creating fallback content and/or `source` and `track` tags.
jodosha
pushed a commit
to hanami/assets
that referenced
this issue
Dec 13, 2015
hanami/hanami#396 This commit exposes a `video` method to the view which can be used to generate HTML5 video tags. It accepts options to generate HTML attributes along with a block for creating fallback content and/or `source` and `track` tags.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Implement
video
helper.See
Lotus::Assets::Helpers
andLotus::Helpers::HtmlHelper
for reference.Usage
Basic Usage
HTML Attributes
It must accept optional HTML attributes.
Fallback Content
It accepts an optional block for fallback content for browsers not supporting
<video>
tag.Tracks
It should support
<track>
tag.A few notes:
<video>
reference, see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/videotrack
invocations, useLotus::Helpers::HtmlHelper
internally.asset_path
, isn't implemented yet. See Asset path/url helpers #394Sources
It should support
<source>
tag.A few notes:
<video>
reference, see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/videosource
invocations, useLotus::Helpers::HtmlHelper
internally.text
doesn't map any HTML tag, but it's useful to concat pure text. See Add support for text inside other tags. helpers#30asset_path
, isn't implemented yet. See Asset path/url helpers #394URL Prefix
This should take account of the
prefix
defined inLotus::Assets::Configuration
.That means, if an application has a prefix:
/admin
, when one this helper is used, the prefix should be used.Digest Mode
If "Digest Mode" is enabled (usually in production), it should generate the file name with the digest suffix (see https://github.com/lotus/assets/blob/master/lib/lotus/assets/configuration.rb#L37).
Testing Notes
Add an integration test with Lotus::View, in order to make sure that the output isn't escaped twice and produces a valid HTML.
The text was updated successfully, but these errors were encountered: