<nav class="nav">
<div class="nav__wrapper">
<div class="nav__brand"><a href="#">Luna Framework</a></div>
<div class="nav__navicon"></div>
<div class="nav__links__wrapper nav__links--left">
<ul class="nav__links">
<li class="nav__links__item"><a href="#">...</a></li>
<li class="nav__links__item"><a href="#">...</a></li>
</ul>
</div>
</div>
</nav>
To create a dropdown menu within the navigation you simply need to add .nav__links__item--dropdown
to the .nav__links__item
item.
<li class="nav__links__item nav__links__item--dropdown">
<a href="#">...</a>
<ul class="nav__links">
<li class="nav__links__item">
<a href="#">...</a>
</li>
<li class="nav__links__item">
<a href="#">...</a>
</li>
<li class="nav__links__item">
<a href="#">...</a>
</li>
</ul>
</li>
The dropdown button can be used as a normal link or as a part of the default .btn
classes.
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloremque enim iusto, ullam nesciunt distinctio facilis nisi saepe sunt unde laboriosam tempore quam, quas vitae, sed doloribus et, quisquam nobis sint.
Block Button<div class="dropdown">
<a href="#" class="dropdown__link">Dropdown Link <i class="lunacon lunacon-chevron-down"></i></a>
<div class="dropdown__container">
<ul>
<li> <a href="#">Link Item 1</a></li>
<li> <a href="#">Link Item 2</a></li>
<li> <a href="#">Link Item 3</a></li>
<li> <a href="#">Link Item 4</a></li>
</ul>
</div>
</div>
Optionally to make buttonTo make the.dropdown__link
a button, you simply chain on the.btn
classes to modify as needed.
A very simple element for placing links inline.
<ul class="links__inline">
<li class="links__inline__item"><a class="btn btn--primary">Inline Button </a></li>
<li class="links__inline__item"><a class="btn btn--primary">Inline Button </a></li>
<li class="links__inline__item"><a class="btn btn--primary">Inline Button </a></li>
</ul>
A simple blockquote element
Blockquote HeaderBlockquote Body
Blockquote HeaderBlockquote Body
Blockquote HeaderBlockquote Body
Blockquote HeaderBlockquote Body
<blockquote class="blockquote blockquote--info">
<div class="blockquote__header">Blockquote Header</div>
<div class="blockquote__body">Blockquote Body</div>
<div class="blockquote__footer background--info-light">Blockquote Footer </div>
</blockquote>
There are 2 variations of the notify elements. A default set and a light set. Simply append -light
to the end of any notify elements.
Make element dismissable.Add the class.notify__dismissable
to the main element. Also make sure to initialize the javasript function.
<div class="notify notify__dismissable">Info Notify</div>
<div class="notify notify__dismissable notify--default">Info Notify</div>
<div class="notify notify__dismissable notify--info">Info Notify</div>
<div class="notify notify__dismissable notify--warning">Warning Notify</div>
<div class="notify notify__dismissable notify--success">Success Notify</div>
<div class="notify notify__dismissable notify--danger">Danger Notify</div>
<!-- for light version just add -light at the back -->
<div class="notify notify--info-light">Info Notify</div>
Luna has a variety of layout to accommodate your needs. There are the standard layout, inline layout and horizontal layout.
Form validation is an important part of web development. This section will show you how to make this easy to change form input fields, label colors and adding some validation messages to the .form__group
The form .has__{identifier}
automatically changes colors of the child elements in the .form__group
block element.
Simply add info
, warning
, success
or danger
as the {identifier} to change the input and label colors.
<div class="form__group has__info">
<label class="form__label">Info Input</label>
<input type="text" class="form__item">
</div>
<div class="form__group has__warning">
<label class="form__label">Warning Input</label>
<input type="text" class="form__item">
</div>
<div class="form__group has__success">
<label class="form__label">Success Input</label>
<input type="text" class="form__item">
</div>
<div class="form__group has__danger">
<label class="form__label">Danger Input</label>
<input type="text" class="form__item">
</div>
The validation message will inherit the color of the validation colors class above. Just add a span
element with a class of .form__helper
after the input field with in the .form__group
block ether using php or JavaScript.
<div class="form__group has__info">
<input type="text" class="form__item">
<span class="form__helper">Info Message</span>
</div>
<div class="form__group has__warning">
<input type="text" class="form__item">
<span class="form__helper">Warning Message</span>
</div>
<div class="form__group has__success">
<input type="text" class="form__item">
<span class="form__helper">Success Message</span>
</div>
<div class="form__group has__danger">
<input type="text" class="form__item">
<span class="form__helper">Error Message</span>
</div>
The inputs can also be styled using the Css HelpersBy adding some html tags you can change the input fields.
Just like the .btn
element the form input field can be resized by using style modifyers like .form__item--xs
.form__item--sm
.form__item--md
.form__item--lg
.form__item--xl
.
<div class="form__group">
<input type="text" placeholder="" class="form__item form__item--xs">
</div>
<div class="form__group">
<input type="text" placeholder="" class="form__item form__item--sm">
</div>
<div class="form__group">
<input type="text" placeholder="" class="form__item form__item--md">
</div>
<div class="form__group">
<input type="text" placeholder="" class="form__item form__item--lg">
</div>
<div class="form__group">
<input type="text" placeholder="" class="form__item form__item--xl">
</div>
The horizontal style form can be created by using the grid classes and adding .form__horizontal
to the parent container.
<form action="" method="post" class="form__horizontal">
<div class="form__group">
<label for="name" class="md-col-3 md-text-align-right form__label">Name</label>
<div class="md-col-9">
<input type="text" id="name" class="form__item">
</div>
</div>
<div class="form__group">
<label for="email" class="md-col-3 md-text-align-right form__label">Email</label>
<div class="md-col-9">
<input type="email" id="email" class="form__item">
</div>
</div>
<div class="form__group">
<label for="content" class="md-col-3 md-text-align-right form__label">Content</label>
<div class="md-col-9">
<textarea id="content" class="form__item"></textarea>
</div>
</div>
<div class="form__group">
<div class="md-col-9 md-offset-3">
<button class="btn btn--primary">Submit</button>
<button class="btn">Learn more</button>
</div>
</div>
</form>
A simple checkbox element with animation and yes it is also customizable in the _setting.sass
<div class="form__group__checkbox">
<input type="checkbox" name="" id="check-3" class="form__checkbox"/>
<label for="check-3" class="from__label__checkbox">Checkbox</label>
</div>
<div class="form__group__checkbox">
<input type="checkbox" disabled="disabled" name="" id="check-2" class="form__checkbox"/>
<label for="check-2" class="from__label__checkbox">Checkbox Disabled</label>
</div>
A switch element with animation and custom label for on and off text. Also customizable in the _setting.sass
Note that the default color is theprimary-color
and dont need a modifier.
<div class="switch">
<input type="checkbox" id="id-name" name="set-name" class="switch__input">
<label for="id-name" class="switch__label">Primary Color <span class="toggle--on">On</span><span class="toggle--off">Off</span></label>
</div>
<div class="switch switch--secondary">
<input type="checkbox" id="id-name2" name="set-name" class="switch__input">
<label for="id-name2" class="switch__label">Secondary color <span class="toggle--on">On</span><span class="toggle--off">Off</span></label>
</div>
A simple pagination wrapper.
<ul class="pagination">
<li class="disable"><span>«</span></li>
<li class="active"><span>1</span></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
<li><a href="#">6</a></li>
<li><a href="#">»</a></li>
</ul>
The media object is ideal for comment, listing product or categories.
This element works great for comments and listings.
<div class="media">
<div class="media__body">
<div class="media__heading"> .....</div>
<div>.....</div>
</div>
<div class="media__right media--top">
<div class="media__image"></div><img src="" alt="" width="80px" height="80px" class="media__thumbnail">
</div>
</div>
Just add a little styling to the element.Just add.media--default
to the main media element
<div class="media media--default">
<div class="media__body">
<div class="media__left media--top">
<div class="media__image"><img src="" alt="" width="80px" height="80px" class="media__thumbnail">
</div>
</div>
<div class="media__heading"> .....</div>
<div>.....</div>
</div>
</div>
Id | Name | Email Address | Mission | Services |
---|---|---|---|---|
1 | Neil Armstrong | nielarmstrong@luna.co.za | Apollo 11 | NASA |
2 | Buzz Aldrin | buzzaldrin@luna.co.za | Apollo 11 | Air Force |
3 | Pete Conrad | pete-conrad@luna.co.za | Apollo 12 | Navy |
4 | Alan Bean | alan-bean@luna.co.za | Apollo 12 | Navy |
5 | Alan Shepard | alanshepard@luna.co.za | Apollo 14 | Navy |
6 | Edgar Mitchell | edgar-mitchell@luna.co.za | Apollo 14 | Navy |
7 | David Scott | davidscott@luna.co.za | Apollo 15 | Air Force |
8 | James Irwin | james-irwin@luna.co.za | Apollo 15 | Air Force |
9 | John Young | johnyoung@luna.co.za | Apollo 16 | Navy |
10 | Charles Duke | charles-duke@luna.co.za | Apollo 16 | Air Force |
11 | Eugene Cernan | eugenecernan@luna.co.za | Apollo 17 | Navy |
12 | Harrison Schmitt | harrison-schmitt@luna.co.za | Apollo 17 | NASA |
<div class="table__responsive table--border">
<table class="table table--striped table--bordered">
<thead class="table__head">
<tr>
<th>...</th>
<th>...</th>
<th>...</th>
<th>...</th>
</tr>
</thead>
<tbody class="table__body">
<tr>
<td data-title="...">...</td>
<td data-title="...">...</td>
<td data-title="..."><a href="" target="_blank">...</a></td>
<td data-title="...">...</td>
</tr>
<tr>
<td data-title="...">...</td>
<td data-title="...">...</td>
<td data-title="..."> <a href="" target="_blank">...</a></td>
<td data-title="...">...</td>
</tr>
<tr>
<td data-title="...">...</td>
<td data-title="...">...</td>
<td data-title="..."> <a href="" target="_blank">...</a></td>
<td data-title="...">...</td>
</tr>
</tbody>
</table>
</div>
The card component is an alternative for the panel element and work great with image headers and headline text and a small excerpt section.
<article class="card"> <header class="card__thumb"> <a href="#"><img src="[...]" alt=""></a></header>
<div class="card__body">
<div class="card__body__label">[...]</div>
<div class="card__body__title">[...]</div>
<div class="card__body__subtitle">[...]</div>
<div class="card__body__description">[...]</div>
</div>
<footer class="card__footer">
<span><i class="lunacon lunacon-users-solid"><span>[...]</span></i></span>
<span><i class="lunacon lunacon-users-solid"><span>[...]</span></i></span>
</footer>
</article>
The timeline component is perfect for showing time based data or a creative way to display headline for a blog site.
Yuri Alexeyevich Gagarin, Russian cosmonaut, experienced the weightlessness of space for 108 minutes. He orbited the Earth once before making a safe landing. The Russians rocketed Yuri Gagarin, the first man into space. His ship, Vostok I, was guided entirely from the ground.
Mercury-Atlas rocket lifted off with an electronic mannequin. An unmanned Mercury test exploded on launch pad.
Astronaut Alan Bartlett Shepard Jr. (d.1998 at 74), a Navy commander, became the first American in space as he made a 15-minute suborbital flight in the Freedom 7 Project Mercury capsule launched from Cape Canaveral, Fla. The spacecraft reached a maximum altitude of 116.5 miles.
Capt. Virgil "Gus" Grissom became the second American to rocket into a suborbital pattern around the Earth, flying on the Mercury 4 Liberty Bell 7. The Mercury capsule sank in the Atlantic, 302 miles from Cape Canaveral and Grissom was rescued by helicopter. The space capsule was recovered in 1999
<ul class="timeline">
<li class="timeline__item">
<div class="flag flag--left"> <small class="flag__date">[datetime]</small>
<h2>...</h2>
<p>...</p>
</div>
</li>
<li class="timeline__item">
<div class="flag flag--right"> <small class="flag__date">[datetime]</small>
<h2>...</h2>
<p> ...</p>
</div>
</li>
<li class="timeline__item">
<div class="flag flag--left"> <small class="flag__date">[datetime]</small>
<h2>...</h2>
<p>...</p>
</div>
</li>
<li class="timeline__item">
<div class="flag flag--right"> <small class="flag__date">[datetime]</small>
<h2>...</h2>
<p> ...</p>
</div>
</li>
</ul>
A corner element that is absolute positioned with 2 different styles normal and gradient background. Change color by using .ribbon--{$value}
and .ribbon--{$value}-gradient
Color Set$value
reference all colors in$_color_set
in_settings.sass
file.
<div class="ribbon__wrapper">
<div class="ribbon ribbon--info ribbon--top-left">
<div class="ribbon__label">...</div>
</div>
<div class="ribbon ribbon--warning ribbon--top-right">
<div class="ribbon__label">...</div>
</div>
<div class="ribbon ribbon--success ribbon--bottom-left">
<div class="ribbon__label">...</div>
</div>
<div class="ribbon ribbon--danger ribbon--bottom-right">
<div class="ribbon__label">...</div>
</div>
Each accordion element performs as an individual component with its own active state and easy to customize in the _settings.sass
file.
<ul class="accordian">
<li class="accordian__element">
<header class="accordian__header accordian__header--active">[..]</header>
<section class="accordian__body accordian__body--active">[..] </section>
</li>
<li class="accordian__element">
<header class="accordian__header">[..]</header>
<section class="accordian__body">[..] </section>
</li>
</ul>
Set a active class to component.To create an open tab simply follow the code example above. The.accordian__{elem}--active
will start with open tab.
To add some spacing between elements just add .accordian--spaced
to the .accordian
element.
Apollo 11's mission was to land two men on the moon. They also had to come back to Earth safely. Apollo 11 blasted off on July 16, 1969. Neil Armstrong, Edwin "Buzz" Aldrin and Michael Collins were the astronauts on Apollo
It was the Cold War. NASA wouldn't accept women applicants to the astronaut corps until 1978. The first American woman to fly into space aboard the space shuttle was Sally Ride in 1983, and the glass stratosphere was finally shattered
The Mercury Project suffered some early setbacks, however, and on April 12, 1961, Soviet cosmonaut Yuri Gagarin orbited Earth in the world's first manned space flight. Less than one month later, on May 5, astronaut Alan Shepard was successfully launched into space on a suborbital fligh
A rhesus monkey called Albert 1 became the first monkey launched into space on June 11, 1948; also on board a US-launched V2 rocket. These were just suborbital flights, though. The first animal to actually go into orbit was the dog Laika, launched on board the Soviet Sputnik 2 spacecraft on November 3, 1957
<ul class="accordian accordian--spaced">
<li class="accordian__element">
<header class="accordian__header">[..]</header>
<section class="accordian__body">[..] </section>
</li>
</ul>
A simply way to style list items.
<ul class="list">
<li class="list__item"></li>
<li class="list__item"></li>
<li class="list__item"></li>
<li class="list__item"></li>
</ul>
Add a simple skew scroll effect to page elements to add a little life to your page. just add .skew-scroll
class to an element container. Setting can be set in javascipt for scroll force and max allowed skew degrees.
$(document).Luna({
skewScroll: {
force: 0.3,
maxSkew: 5
}
});