Summary Files Commits Branches @commit @diff @stats
path: root / docs / elements / media.html
diff options
context:
space:
mode:
Commit81ee834ec6914f8b284e0724d541ed927513e6bd (patch)
Author
 Yan Zhu <picturepan2@hotmail.com>
2018-11-20 11:54:48 +0800
Committer
 GitHub <noreply@github.com>
2018-11-20 11:54:48 +0800
Filesac0c29f2a5fa344bb7a05638602dd6dc60ce9e37 /docs/elements/media.html
Spectre-Dark-Gruvbox-81ee834ec6914f8b284e0724d541ed927513e6bd.tar
Spectre-Dark-Gruvbox-81ee834ec6914f8b284e0724d541ed927513e6bd.tar.gz
Spectre-Dark-Gruvbox-81ee834ec6914f8b284e0724d541ed927513e6bd.zip
Parentca1bdc5d86edb4d1baf3e9d1fabc89977950a2b4 (diff)
Parentba4c380af32bc75dad1e03c2386b5f8a3fb9118f (diff)
Merge pull request #534 from picturepan2/0.5.6 v0.5.6
0.5.6
1 files changed, 23 insertions, 4 deletions
-rw-r--r--docs/elements/media.html27
diff --git a/docs/elements/media.html b/docs/elements/media.html
index 2495c9b..f01c193 100644
--- a/docs/elements/media.html
+++ b/docs/elements/media.html
@@ -19,7 +19,9 @@
<body>
<div class="docs-container off-canvas off-canvas-sidebar-show">
<div class="docs-navbar"><a class="off-canvas-toggle btn btn-link btn-action" href="#sidebar"><i class="icon icon-menu"></i></a>
- <div class="btns"><a class="btn btn-primary float-right" href="https://github.com/picturepan2/spectre" target="_blank">GitHub</a><a class="btn mr-1 float-right" href="https://www.paypal.me/picturepan2" target="_blank">Sponsor</a></div>
+ <div class="btns d-flex">
+ <input class="docs-search form-input" type="text" placeholder="Search Docs"><a class="btn ml-1" href="https://www.paypal.me/picturepan2" target="_blank">PayPal</a><a class="btn btn-primary ml-1" href="https://github.com/picturepan2/spectre" target="_blank">GitHub</a>
+ </div>
</div>
<div class="docs-sidebar off-canvas-sidebar" id="sidebar">
<div class="docs-brand"><a class="docs-logo" href="../index.html"><img src="../img/spectre-logo.svg" alt="Spectre.css CSS Framework">
@@ -76,6 +78,8 @@
</li>
<li class="menu-item"><a href="../layout/responsive.html">Responsive</a>
</li>
+ <li class="menu-item"><a href="../layout/hero.html">Hero</a>
+ </li>
<li class="menu-item"><a href="../layout/navbar.html">Navbar</a>
</li>
</ul>
@@ -202,9 +206,11 @@
<p>Media includes responsive images, figures and video classes.</p>
<h4 class="s-subtitle" id="media-images">Images<a class="anchor" href="#media-images" aria-hidden="true">#</a></h4>
<p>Add the <code>img-responsive</code> class to &lt;img&gt; elements. The images will scale with the parent sizes.</p>
- <div class="columns">
+ <div class="docs-demo columns">
<div class="column col-12"><img class="img-responsive rounded" src="../img/osx-el-capitan.jpg" alt="macOS El Capitan Wallpaper"></div>
</div>
+ <pre class="code" data-lang="HTML"><code><span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"img/osx-el-capitan.jpg"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"img-responsive ..."</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">"..."</span>&gt;</span>
+</code></pre>
<p>Add the <code>img-fit-contain</code> or <code>img-fit-cover</code> class to &lt;img&gt; or &lt;video&gt; elements. The media will crop itself to fit inside the element (and you don't need another container).
This feature can replace the classic background image trick. Microsoft Edge support <a href="https://developer.microsoft.com/en-us/microsoft-edge/platform/status/objectfitandobjectposition/" target="_blank">is shipped</a> with Build Number 16299+.
</p>
@@ -220,8 +226,7 @@
</figure>
</div>
</div>
- <pre class="code" data-lang="HTML"><code><span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"img/osx-el-capitan.jpg"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"img-responsive ..."</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">"..."</span>&gt;</span>
-<span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"img/osx-el-capitan.jpg"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"img-fit-contain ..."</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">"..."</span>&gt;</span>
+ <pre class="code" data-lang="HTML"><code><span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"img/osx-el-capitan.jpg"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"img-fit-contain ..."</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">"..."</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"img/osx-el-capitan.jpg"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"img-fit-cover ..."</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">"..."</span>&gt;</span>
</code></pre>
<h4 class="s-subtitle" id="media-figure">Figure<a class="anchor" href="#media-figure" aria-hidden="true">#</a></h4>
@@ -238,6 +243,11 @@
</figure>
</div>
</div>
+ <pre class="code" data-lang="HTML"><code><span class="hljs-tag">&lt;<span class="hljs-name">figure</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"figure"</span>&gt;</span>
+ <span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"img-responsive ..."</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"img/osx-yosemite-2.jpg"</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">"macOS Yosemite Wallpaper"</span>&gt;</span>
+ <span class="hljs-tag">&lt;<span class="hljs-name">figcaption</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"figure-caption text-center"</span>&gt;</span>macOS Yosemite wallpaper<span class="hljs-tag">&lt;/<span class="hljs-name">figcaption</span>&gt;</span>
+<span class="hljs-tag">&lt;/<span class="hljs-name">figure</span>&gt;</span>
+</code></pre>
<h4 class="s-subtitle" id="media-video">Video<a class="anchor" href="#media-video" aria-hidden="true">#</a></h4>
<p>For responsive video, add a container with the <code>video-responsive</code> class.
Insert any YouTube, Youku or other iframe/embed video inside the container.
@@ -269,6 +279,15 @@
</div>
</div>
</div>
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
+ <script>
+ docsearch({
+ apiKey: 'bede06373c5a1fa3c1bbe8401e24c653',
+ indexName: 'picturepan2_spectre',
+ inputSelector: '.docs-search',
+ debug: true
+ });
+ </script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),