mirror of
https://github.com/jgthms/bulma.git
synced 2025-01-09 15:44:25 +00:00
Move level and media object
This commit is contained in:
parent
cda59a3101
commit
1776d601da
@ -411,7 +411,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bd-is-unique">
|
||||
<a href="{{ site.url }}/documentation/components/level/">
|
||||
<a href="{{ site.url }}/documentation/layout/level/">
|
||||
level
|
||||
</a>
|
||||
</td>
|
||||
@ -431,7 +431,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ site.url }}/documentation/components/media-object/">
|
||||
<a href="{{ site.url }}/documentation/layout/media-object/">
|
||||
media object
|
||||
</a>
|
||||
</td>
|
||||
|
@ -594,7 +594,7 @@
|
||||
<div class="columns">
|
||||
<div class="column is-3">
|
||||
<h4 class="subtitle is-4 bd-feature-title">
|
||||
<a href="{{ site.url }}/documentation/components/media-object/">
|
||||
<a href="{{ site.url }}/documentation/layout/media-object/">
|
||||
Media object
|
||||
</a>
|
||||
</h4>
|
||||
|
@ -14,9 +14,6 @@
|
||||
Dropdown
|
||||
</a>
|
||||
{% endif %}
|
||||
<a class="navbar-item is-tab {% if page.doc-subtab == 'level' %}is-active{% endif %}" href="{{ site.url }}/documentation/components/level/">
|
||||
Level
|
||||
</a>
|
||||
<a class="navbar-item is-tab {% if page.doc-subtab == 'media-object' %}is-active{% endif %}" href="{{ site.url }}/documentation/components/media-object/">
|
||||
Media object
|
||||
</a>
|
||||
|
@ -4,6 +4,12 @@
|
||||
<a class="navbar-item is-tab {% if page.doc-subtab == 'container' %}is-active{% endif %}" href="{{ site.url }}/documentation/layout/container/">
|
||||
Container
|
||||
</a>
|
||||
<a class="navbar-item is-tab {% if page.doc-subtab == 'level' %}is-active{% endif %}" href="{{ site.url }}/documentation/layout/level/">
|
||||
Level
|
||||
</a>
|
||||
<a class="navbar-item is-tab {% if page.doc-subtab == 'media-object' %}is-active{% endif %}" href="{{ site.url }}/documentation/layout/media-object/">
|
||||
Media Object
|
||||
</a>
|
||||
<a class="navbar-item is-tab {% if page.doc-subtab == 'hero' %}is-active{% endif %}" href="{{ site.url }}/documentation/layout/hero/">
|
||||
Hero
|
||||
</a>
|
||||
|
@ -123,4 +123,6 @@
|
||||
color: #2aa198
|
||||
|
||||
.content .highlight
|
||||
text-align: left
|
||||
margin-left: 0
|
||||
margin-right: 0
|
||||
text-align: left
|
||||
|
@ -8828,6 +8828,8 @@ label.panel-block:hover {
|
||||
}
|
||||
|
||||
.content .highlight {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,8 @@ doc-tab: components
|
||||
doc-subtab: level
|
||||
---
|
||||
|
||||
<meta http-equiv="refresh" content="0; url={{ site.url }}/documentation/layout/level/">
|
||||
|
||||
{% include subnav-components.html %}
|
||||
|
||||
<section class="section">
|
||||
|
@ -4,6 +4,8 @@ doc-tab: components
|
||||
doc-subtab: media-object
|
||||
---
|
||||
|
||||
<meta http-equiv="refresh" content="0; url={{ site.url }}/documentation/layout/media-object/">
|
||||
|
||||
{% include subnav-components.html %}
|
||||
|
||||
<section class="section">
|
||||
|
227
docs/documentation/layout/level.html
Normal file
227
docs/documentation/layout/level.html
Normal file
@ -0,0 +1,227 @@
|
||||
---
|
||||
layout: documentation
|
||||
doc-tab: layout
|
||||
doc-subtab: level
|
||||
---
|
||||
|
||||
{% capture nav_example %}
|
||||
<!-- Main container -->
|
||||
<nav class="level">
|
||||
<!-- Left side -->
|
||||
<div class="level-left">
|
||||
<div class="level-item">
|
||||
<p class="subtitle is-5">
|
||||
<strong>123</strong> posts
|
||||
</p>
|
||||
</div>
|
||||
<div class="level-item">
|
||||
<div class="field has-addons">
|
||||
<p class="control">
|
||||
<input class="input" type="text" placeholder="Find a post">
|
||||
</p>
|
||||
<p class="control">
|
||||
<button class="button">
|
||||
Search
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Right side -->
|
||||
<div class="level-right">
|
||||
<p class="level-item"><strong>All</strong></p>
|
||||
<p class="level-item"><a>Published</a></p>
|
||||
<p class="level-item"><a>Drafts</a></p>
|
||||
<p class="level-item"><a>Deleted</a></p>
|
||||
<p class="level-item"><a class="button is-success">New</a></p>
|
||||
</div>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
|
||||
{% capture nav_centered_example %}
|
||||
<nav class="level">
|
||||
<div class="level-item has-text-centered">
|
||||
<div>
|
||||
<p class="heading">Tweets</p>
|
||||
<p class="title">3,456</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="level-item has-text-centered">
|
||||
<div>
|
||||
<p class="heading">Following</p>
|
||||
<p class="title">123</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="level-item has-text-centered">
|
||||
<div>
|
||||
<p class="heading">Followers</p>
|
||||
<p class="title">456K</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="level-item has-text-centered">
|
||||
<div>
|
||||
<p class="heading">Likes</p>
|
||||
<p class="title">789</p>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
|
||||
{% capture nav_centered_bis_example %}
|
||||
<nav class="level">
|
||||
<p class="level-item has-text-centered">
|
||||
<a class="link is-info">Home</a>
|
||||
</p>
|
||||
<p class="level-item has-text-centered">
|
||||
<a class="link is-info">Menu</a>
|
||||
</p>
|
||||
<p class="level-item has-text-centered">
|
||||
<img src="{{ site.url }}/images/bulma-type.png" alt="" style="height: 30px;">
|
||||
</p>
|
||||
<p class="level-item has-text-centered">
|
||||
<a class="link is-info">Reservations</a>
|
||||
</p>
|
||||
<p class="level-item has-text-centered">
|
||||
<a class="link is-info">Contact</a>
|
||||
</p>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
|
||||
{% capture nav_mobile_example %}
|
||||
<nav class="level is-mobile">
|
||||
<div class="level-item has-text-centered">
|
||||
<div>
|
||||
<p class="heading">Tweets</p>
|
||||
<p class="title">3,456</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="level-item has-text-centered">
|
||||
<div>
|
||||
<p class="heading">Following</p>
|
||||
<p class="title">123</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="level-item has-text-centered">
|
||||
<div>
|
||||
<p class="heading">Followers</p>
|
||||
<p class="title">456K</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="level-item has-text-centered">
|
||||
<div>
|
||||
<p class="heading">Likes</p>
|
||||
<p class="title">789</p>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
|
||||
{% include subnav-layout.html %}
|
||||
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<h1 class="title">Level</h1>
|
||||
<h2 class="subtitle">A multi-purpose <strong>horizontal level</strong>, which can contain almost any other element</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="content">
|
||||
<p>The <strong>structure</strong> of a level is the following:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<code>level</code>: main container
|
||||
<ul>
|
||||
<li><code>level-left</code> for the left side. This element is <em>required</em>, even if it is empty</li>
|
||||
<li>
|
||||
<code>level-right</code> for the right side
|
||||
<ul>
|
||||
<li><code>level-item</code> for each individual element</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>In a <code>level-item</code>, you can then insert almost <em>anything</em> you want: a title, a button, a text input, or just simple text. No matter what elements you put inside a Bulma <code>level</code>, they will always be <strong>vertically centered</strong>.</p>
|
||||
</div>
|
||||
|
||||
<div class="bd-structure">
|
||||
<nav class="level bd-structure-item bd-is-structure-container" title="level">
|
||||
<div class="level-left bd-structure-item" title="level-left">
|
||||
<div class="level-item">
|
||||
<p class="subtitle is-5">
|
||||
<strong>123</strong> posts
|
||||
</p>
|
||||
</div>
|
||||
<div class="level-item">
|
||||
<div class="field has-addons">
|
||||
<p class="control">
|
||||
<input class="input" type="text" placeholder="Find a post">
|
||||
</p>
|
||||
<p class="control">
|
||||
<button class="button">
|
||||
Search
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="level-right bd-structure-item" title="level-right">
|
||||
<p class="level-item">
|
||||
<strong>All</strong>
|
||||
</p>
|
||||
<p class="level-item">
|
||||
<a>Published</a>
|
||||
</p>
|
||||
<p class="level-item">
|
||||
<a>Drafts</a>
|
||||
</p>
|
||||
<p class="level-item">
|
||||
<a>Deleted</a>
|
||||
</p>
|
||||
<p class="level-item">
|
||||
<a class="button is-success">
|
||||
New
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="bd-example">
|
||||
{{nav_example}}
|
||||
</div>
|
||||
{% highlight html %}{{nav_example}}{% endhighlight %}
|
||||
|
||||
{% include anchor.html name="Centered level" %}
|
||||
|
||||
<div class="content">
|
||||
If you want a <strong>centered level</strong>, you can use as many <code>level-item</code> as you want, as long as they are <strong>direct</strong> children of the <code>level</code> container.
|
||||
</div>
|
||||
|
||||
<div class="bd-example">
|
||||
{{nav_centered_example}}
|
||||
</div>
|
||||
|
||||
{% highlight html %}{{nav_centered_example}}{% endhighlight %}
|
||||
|
||||
<div class="bd-example">
|
||||
{{nav_centered_bis_example}}
|
||||
</div>
|
||||
|
||||
{% highlight html %}{{nav_centered_bis_example}}{% endhighlight %}
|
||||
|
||||
{% include anchor.html name="Mobile level" %}
|
||||
|
||||
<div class="content">
|
||||
By default, for space concerns, the level is vertical on mobile. If you want the level to be horizontal on mobile as well, add the <code>is-mobile</code> modifier on the <code>level</code> container.
|
||||
</div>
|
||||
|
||||
<div class="bd-example">
|
||||
{{nav_mobile_example}}
|
||||
</div>
|
||||
|
||||
{% highlight html %}{{nav_mobile_example}}{% endhighlight %}
|
||||
|
||||
</div>
|
||||
</section>
|
236
docs/documentation/layout/media-object.html
Normal file
236
docs/documentation/layout/media-object.html
Normal file
@ -0,0 +1,236 @@
|
||||
---
|
||||
layout: documentation
|
||||
doc-tab: layout
|
||||
doc-subtab: media-object
|
||||
---
|
||||
|
||||
{% capture media_example %}
|
||||
<article class="media">
|
||||
<figure class="media-left">
|
||||
<p class="image is-64x64">
|
||||
<img src="{{site.url}}/images/placeholders/128x128.png">
|
||||
</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 is-mobile">
|
||||
<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>
|
||||
{% endcapture %}
|
||||
|
||||
{% capture media_bis_example %}
|
||||
<article class="media">
|
||||
<figure class="media-left">
|
||||
<p class="image is-64x64">
|
||||
<img src="{{site.url}}/images/placeholders/128x128.png">
|
||||
</p>
|
||||
</figure>
|
||||
<div class="media-content">
|
||||
<div class="field">
|
||||
<p class="control">
|
||||
<textarea class="textarea" placeholder="Add a comment..."></textarea>
|
||||
</p>
|
||||
</div>
|
||||
<nav class="level">
|
||||
<div class="level-left">
|
||||
<div class="level-item">
|
||||
<a class="button is-info">Submit</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>
|
||||
{% endcapture %}
|
||||
{% capture media_nested_example %}
|
||||
<article class="media">
|
||||
<figure class="media-left">
|
||||
<p class="image is-64x64">
|
||||
<img src="{{site.url}}/images/placeholders/128x128.png">
|
||||
</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="{{site.url}}/images/placeholders/96x96.png">
|
||||
</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="{{site.url}}/images/placeholders/96x96.png">
|
||||
</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="{{site.url}}/images/placeholders/128x128.png">
|
||||
</p>
|
||||
</figure>
|
||||
<div class="media-content">
|
||||
<div class="field">
|
||||
<p class="control">
|
||||
<textarea class="textarea" placeholder="Add a comment..."></textarea>
|
||||
</p>
|
||||
</div>
|
||||
<div class="field">
|
||||
<p class="control">
|
||||
<button class="button">Post comment</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
{% endcapture %}
|
||||
|
||||
{% include subnav-layout.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="bd-structure">
|
||||
<article class="media">
|
||||
<figure class="media-left bd-structure-item" title="media-left">
|
||||
<p class="image is-64x64">
|
||||
<img src="{{site.url}}/images/placeholders/128x128.png">
|
||||
</p>
|
||||
</figure>
|
||||
<div class="media-content bd-structure-item bd-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 bd-structure-item" title="media-right">
|
||||
<button class="delete"></button>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<div class="bd-example">
|
||||
{{media_example}}
|
||||
</div>
|
||||
|
||||
{% highlight html %}{{media_example}}{% 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="bd-example">
|
||||
{{media_bis_example}}
|
||||
</div>
|
||||
|
||||
{% highlight html %}{{media_bis_example}}{% 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="bd-example">
|
||||
{{media_nested_example}}
|
||||
</div>
|
||||
|
||||
{% highlight html %}{{media_nested_example}}{% endhighlight %}
|
||||
|
||||
</div>
|
||||
</section>
|
@ -291,7 +291,7 @@ route: index
|
||||
<span class="icon is-medium">
|
||||
<i class="fa fa-arrows-h"></i>
|
||||
</span>
|
||||
<a href="{{ site.url }}/documentation/components/level/">
|
||||
<a href="{{ site.url }}/documentation/layout/level/">
|
||||
Flexible <strong>horizontal level</strong>
|
||||
</a>
|
||||
</h3>
|
||||
@ -359,7 +359,7 @@ route: index
|
||||
<span class="icon is-medium">
|
||||
<i class="fa fa-magic"></i>
|
||||
</span>
|
||||
<a href="{{ site.url }}/documentation/components/media-object/">
|
||||
<a href="{{ site.url }}/documentation/layout/media-object/">
|
||||
Versatile <strong>media object</strong>
|
||||
</a>
|
||||
</h3>
|
||||
|
Loading…
Reference in New Issue
Block a user