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

Markdown: video embedding #10

Open
boyeln opened this issue Jul 27, 2015 · 0 comments
Open

Markdown: video embedding #10

boyeln opened this issue Jul 27, 2015 · 0 comments

Comments

@boyeln
Copy link

boyeln commented Jul 27, 2015

Avhengigheter: #6

En shortcode som embedder youtube, vimeo og liknende responsivt.

Foreslått syntaks: [[youtube <id>]]

Eksempel:

[[youtube wE3fmFTtP9g]]

Gir:

<div class="videoWrapper">
    <iframe width="420" height="315"
        src="http://www.youtube.com/embed/wE3fmFTtP9g">
    </iframe>
</div>

Krever CSS for videoWrapper-klassen:

.videoWrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
}
.videoWrapper iframe {
    position: absolute;
    border: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant