mirror of
https://github.com/jgthms/bulma.git
synced 2024-11-28 12:24:23 +00:00
359 lines
12 KiB
HTML
359 lines
12 KiB
HTML
|
---
|
||
|
layout: documentation
|
||
|
doc-tab: components
|
||
|
doc-subtab: media-object
|
||
|
---
|
||
|
|
||
|
{% include subnav-components.html %}
|
||
|
|
||
|
<section class="section">
|
||
|
<div class="container">
|
||
|
<h1 class="title">Media Object</h1>
|
||
|
<h2 class="subtitle">The famous <strong>media object</strong> prevalent in social media interfaces, but useful in any context</h2>
|
||
|
|
||
|
<hr>
|
||
|
|
||
|
<div class="content">
|
||
|
<p>The <a href="http://www.stubbornella.org/content/2010/06/25/the-media-object-saves-hundreds-of-lines-of-code">media object</a> is a UI element perfect for repeatable and nestable content.</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="structure">
|
||
|
<article class="media">
|
||
|
<figure class="media-left structure-item" title="media-left">
|
||
|
<p class="image is-64x64">
|
||
|
<img src="http://placehold.it/128x128">
|
||
|
</p>
|
||
|
</figure>
|
||
|
<div class="media-content structure-item is-structure-right" title="media-content">
|
||
|
<div class="content">
|
||
|
<p>
|
||
|
<strong>John Smith</strong> <small>@johnsmith</small> <small>31m</small>
|
||
|
<br>
|
||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin ornare magna eros, eu pellentesque tortor vestibulum ut. Maecenas non massa sem. Etiam finibus odio quis feugiat facilisis.
|
||
|
</p>
|
||
|
</div>
|
||
|
<nav class="level">
|
||
|
<div class="level-left">
|
||
|
<a class="level-item">
|
||
|
<span class="icon is-small"><i class="fa fa-reply"></i></span>
|
||
|
</a>
|
||
|
<a class="level-item">
|
||
|
<span class="icon is-small"><i class="fa fa-retweet"></i></span>
|
||
|
</a>
|
||
|
<a class="level-item">
|
||
|
<span class="icon is-small"><i class="fa fa-heart"></i></span>
|
||
|
</a>
|
||
|
</div>
|
||
|
</nav>
|
||
|
</div>
|
||
|
<div class="media-right structure-item" title="media-right">
|
||
|
<button class="delete"></button>
|
||
|
</div>
|
||
|
</article>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<div class="example">
|
||
|
<article class="media">
|
||
|
<figure class="media-left">
|
||
|
<p class="image is-64x64">
|
||
|
<img src="http://placehold.it/128x128">
|
||
|
</p>
|
||
|
</figure>
|
||
|
<div class="media-content">
|
||
|
<div class="content">
|
||
|
<p>
|
||
|
<strong>John Smith</strong> <small>@johnsmith</small> <small>31m</small>
|
||
|
<br>
|
||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin ornare magna eros, eu pellentesque tortor vestibulum ut. Maecenas non massa sem. Etiam finibus odio quis feugiat facilisis.
|
||
|
</p>
|
||
|
</div>
|
||
|
<nav class="level">
|
||
|
<div class="level-left">
|
||
|
<a class="level-item">
|
||
|
<span class="icon is-small"><i class="fa fa-reply"></i></span>
|
||
|
</a>
|
||
|
<a class="level-item">
|
||
|
<span class="icon is-small"><i class="fa fa-retweet"></i></span>
|
||
|
</a>
|
||
|
<a class="level-item">
|
||
|
<span class="icon is-small"><i class="fa fa-heart"></i></span>
|
||
|
</a>
|
||
|
</div>
|
||
|
</nav>
|
||
|
</div>
|
||
|
<div class="media-right">
|
||
|
<button class="delete"></button>
|
||
|
</div>
|
||
|
</article>
|
||
|
</div>
|
||
|
|
||
|
{% highlight html %}
|
||
|
<article class="media">
|
||
|
<figure class="media-left">
|
||
|
<p class="image is-64x64">
|
||
|
<img src="http://placehold.it/128x128">
|
||
|
</p>
|
||
|
</figure>
|
||
|
<div class="media-content">
|
||
|
<div class="content">
|
||
|
<p>
|
||
|
<strong>John Smith</strong> <small>@johnsmith</small> <small>31m</small>
|
||
|
<br>
|
||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin ornare magna eros, eu pellentesque tortor vestibulum ut. Maecenas non massa sem. Etiam finibus odio quis feugiat facilisis.
|
||
|
</p>
|
||
|
</div>
|
||
|
<nav class="level">
|
||
|
<div class="level-left">
|
||
|
<a class="level-item">
|
||
|
<span class="icon is-small"><i class="fa fa-reply"></i></span>
|
||
|
</a>
|
||
|
<a class="level-item">
|
||
|
<span class="icon is-small"><i class="fa fa-retweet"></i></span>
|
||
|
</a>
|
||
|
<a class="level-item">
|
||
|
<span class="icon is-small"><i class="fa fa-heart"></i></span>
|
||
|
</a>
|
||
|
</div>
|
||
|
</nav>
|
||
|
</div>
|
||
|
<div class="media-right">
|
||
|
<button class="delete"></button>
|
||
|
</div>
|
||
|
</article>
|
||
|
{% endhighlight %}
|
||
|
|
||
|
<div class="content">
|
||
|
<p>You can include <em>any</em> other Bulma element, like inputs, textareas, icons, buttons... or even a <strong>nav bar</strong>.</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="example">
|
||
|
<article class="media">
|
||
|
<figure class="media-left">
|
||
|
<p class="image is-64x64">
|
||
|
<img src="http://placehold.it/128x128">
|
||
|
</p>
|
||
|
</figure>
|
||
|
<div class="media-content">
|
||
|
<p class="control">
|
||
|
<textarea class="textarea" placeholder="Add a comment..."></textarea>
|
||
|
</p>
|
||
|
<nav class="level">
|
||
|
<div class="level-left">
|
||
|
<div class="level-item">
|
||
|
<a class="button is-info">Post comment</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="level-right">
|
||
|
<div class="level-item">
|
||
|
<label class="checkbox">
|
||
|
<input type="checkbox"> Press enter to submit
|
||
|
</label>
|
||
|
</div>
|
||
|
</div>
|
||
|
</nav>
|
||
|
</div>
|
||
|
</article>
|
||
|
</div>
|
||
|
|
||
|
{% highlight html %}
|
||
|
<article class="media">
|
||
|
<figure class="media-left">
|
||
|
<p class="image is-64x64">
|
||
|
<img src="http://placehold.it/128x128">
|
||
|
</p>
|
||
|
</figure>
|
||
|
<div class="media-content">
|
||
|
<p class="control">
|
||
|
<textarea class="textarea" placeholder="Add a comment..."></textarea>
|
||
|
</p>
|
||
|
<nav class="level">
|
||
|
<div class="level-left">
|
||
|
<div class="level-item">
|
||
|
<a class="button is-info">Post comment</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="level-right">
|
||
|
<div class="level-item">
|
||
|
<label class="checkbox">
|
||
|
<input type="checkbox"> Press enter to submit
|
||
|
</label>
|
||
|
</div>
|
||
|
</div>
|
||
|
</nav>
|
||
|
</div>
|
||
|
</article>
|
||
|
{% endhighlight %}
|
||
|
|
||
|
<hr>
|
||
|
|
||
|
<h3 class="title">Nesting</h3>
|
||
|
<div class="content">
|
||
|
<p>You can nest media objects up to <strong>3 levels</strong> deep.</p>
|
||
|
</div>
|
||
|
<div class="example">
|
||
|
<article class="media">
|
||
|
<figure class="media-left">
|
||
|
<p class="image is-64x64">
|
||
|
<img src="http://placehold.it/128x128">
|
||
|
</p>
|
||
|
</figure>
|
||
|
<div class="media-content">
|
||
|
<div class="content">
|
||
|
<p>
|
||
|
<strong>Barbara Middleton</strong>
|
||
|
<br>
|
||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis porta eros lacus, nec ultricies elit blandit non. Suspendisse pellentesque mauris sit amet dolor blandit rutrum. Nunc in tempus turpis.
|
||
|
<br>
|
||
|
<small><a>Like</a> · <a>Reply</a> · 3 hrs</small>
|
||
|
</p>
|
||
|
</div>
|
||
|
|
||
|
<article class="media">
|
||
|
<figure class="media-left">
|
||
|
<p class="image is-48x48">
|
||
|
<img src="http://placehold.it/96x96">
|
||
|
</p>
|
||
|
</figure>
|
||
|
<div class="media-content">
|
||
|
<div class="content">
|
||
|
<p>
|
||
|
<strong>Sean Brown</strong>
|
||
|
<br>
|
||
|
Donec sollicitudin urna eget eros malesuada sagittis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam blandit nisl a nulla sagittis, a lobortis leo feugiat.
|
||
|
<br>
|
||
|
<small><a>Like</a> · <a>Reply</a> · 2 hrs</small>
|
||
|
</p>
|
||
|
</div>
|
||
|
|
||
|
<article class="media">
|
||
|
Vivamus quis semper metus, non tincidunt dolor. Vivamus in mi eu lorem cursus ullamcorper sit amet nec massa.
|
||
|
</article>
|
||
|
|
||
|
<article class="media">
|
||
|
Morbi vitae diam et purus tincidunt porttitor vel vitae augue. Praesent malesuada metus sed pharetra euismod. Cras tellus odio, tincidunt iaculis diam non, porta aliquet tortor.
|
||
|
</article>
|
||
|
</div>
|
||
|
</article>
|
||
|
|
||
|
<article class="media">
|
||
|
<figure class="media-left">
|
||
|
<p class="image is-48x48">
|
||
|
<img src="http://placehold.it/96x96">
|
||
|
</p>
|
||
|
</figure>
|
||
|
<div class="media-content">
|
||
|
<div class="content">
|
||
|
<p>
|
||
|
<strong>Kayli Eunice </strong>
|
||
|
<br>
|
||
|
Sed convallis scelerisque mauris, non pulvinar nunc mattis vel. Maecenas varius felis sit amet magna vestibulum euismod malesuada cursus libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus lacinia non nisl id feugiat.
|
||
|
<br>
|
||
|
<small><a>Like</a> · <a>Reply</a> · 2 hrs</small>
|
||
|
</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
</article>
|
||
|
</div>
|
||
|
</article>
|
||
|
<article class="media">
|
||
|
<figure class="media-left">
|
||
|
<p class="image is-64x64">
|
||
|
<img src="http://placehold.it/128x128">
|
||
|
</p>
|
||
|
</figure>
|
||
|
<div class="media-content">
|
||
|
<p class="control">
|
||
|
<textarea class="textarea" placeholder="Add a comment..."></textarea>
|
||
|
</p>
|
||
|
<p class="control">
|
||
|
<button class="button">Post comment</button>
|
||
|
</p>
|
||
|
</div>
|
||
|
</article>
|
||
|
</div>
|
||
|
{% highlight html %}
|
||
|
<article class="media">
|
||
|
<figure class="media-left">
|
||
|
<p class="image is-64x64">
|
||
|
<img src="http://placehold.it/128x128">
|
||
|
</p>
|
||
|
</figure>
|
||
|
<div class="media-content">
|
||
|
<div class="content">
|
||
|
<p>
|
||
|
<strong>Barbara Middleton</strong>
|
||
|
<br>
|
||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis porta eros lacus, nec ultricies elit blandit non. Suspendisse pellentesque mauris sit amet dolor blandit rutrum. Nunc in tempus turpis.
|
||
|
<br>
|
||
|
<small><a>Like</a> · <a>Reply</a> · 3 hrs</small>
|
||
|
</p>
|
||
|
</div>
|
||
|
|
||
|
<article class="media">
|
||
|
<figure class="media-left">
|
||
|
<p class="image is-48x48">
|
||
|
<img src="http://placehold.it/96x96">
|
||
|
</p>
|
||
|
</figure>
|
||
|
<div class="media-content">
|
||
|
<div class="content">
|
||
|
<p>
|
||
|
<strong>Sean Brown</strong>
|
||
|
<br>
|
||
|
Donec sollicitudin urna eget eros malesuada sagittis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam blandit nisl a nulla sagittis, a lobortis leo feugiat.
|
||
|
<br>
|
||
|
<small><a>Like</a> · <a>Reply</a> · 2 hrs</small>
|
||
|
</p>
|
||
|
</div>
|
||
|
|
||
|
<article class="media">
|
||
|
Vivamus quis semper metus, non tincidunt dolor. Vivamus in mi eu lorem cursus ullamcorper sit amet nec massa.
|
||
|
</article>
|
||
|
|
||
|
<article class="media">
|
||
|
Morbi vitae diam et purus tincidunt porttitor vel vitae augue. Praesent malesuada metus sed pharetra euismod. Cras tellus odio, tincidunt iaculis diam non, porta aliquet tortor.
|
||
|
</article>
|
||
|
</div>
|
||
|
</article>
|
||
|
|
||
|
<article class="media">
|
||
|
<figure class="media-left">
|
||
|
<p class="image is-48x48">
|
||
|
<img src="http://placehold.it/96x96">
|
||
|
</p>
|
||
|
</figure>
|
||
|
<div class="media-content">
|
||
|
<div class="content">
|
||
|
<p>
|
||
|
<strong>Kayli Eunice </strong>
|
||
|
<br>
|
||
|
Sed convallis scelerisque mauris, non pulvinar nunc mattis vel. Maecenas varius felis sit amet magna vestibulum euismod malesuada cursus libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus lacinia non nisl id feugiat.
|
||
|
<br>
|
||
|
<small><a>Like</a> · <a>Reply</a> · 2 hrs</small>
|
||
|
</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
</article>
|
||
|
</div>
|
||
|
</article>
|
||
|
<article class="media">
|
||
|
<figure class="media-left">
|
||
|
<p class="image is-64x64">
|
||
|
<img src="http://placehold.it/128x128">
|
||
|
</p>
|
||
|
</figure>
|
||
|
<div class="media-content">
|
||
|
<p class="control">
|
||
|
<textarea class="textarea" placeholder="Add a comment..."></textarea>
|
||
|
</p>
|
||
|
<p class="control">
|
||
|
<button class="button">Post comment</button>
|
||
|
</p>
|
||
|
</div>
|
||
|
</article>
|
||
|
{% endhighlight %}
|
||
|
|
||
|
</div>
|
||
|
</section>
|