Elephant provides a DefaultElement with edition capabilities. The editor uses its own wiki syntax, EWiki syntax
for web pages with heavy formatting, and Wiki syntax
for e-mails or slightly formatted pages.
This graphic shows the elements that provide content for a web page or an email. By changing the templates root, the marker will generate different layouts. The wiki syntax ensures that the content fits into these templates.
When writing content for emails, complex macros and some multimedia won't render correctly in email clients.
This table shows the content that could be sent as an email:
| Location | Description |
|---|---|
| Publications' summary | Publications have two content parts, the summary and the body. If the publication is intended to be sent by email, use email restrictions in the summary. The body can be reached from the email from the Read more... button. |
| Noticeboard / Marketplace | Use email restrictions in the content. |
| Convocations | Use email restrictions in the content. Notice that the content will be attached to the calendar, in a more restricted environment.
Publication support For convocations referring to events, the best approach is to use a publication as the announcement, with a link to the convocation. If the user is not registered, the convocation will show the option to register.
|
// Wiki
---++Let's start writing
**Wiki** and **EWiki** make easy writing HTML pages. Both are similar, both part of the **Elephant** libraries, being the main difference where this HTML will be used for. **Wiki** will generate e-mail compatible HTML/CSS, while **EWiki** helps to create rich compositions.
// Wiki @w{stripe(color=secondary)} Using stripes, you can easily draw the attention to separated content. @w{/stripe}
// Wiki @w{message(icon=info,class=info,header=Messages)} Or use messages to inform. @w{/message}
// Wiki @w{note(class=info,header=Notes)} Or notes. @w{/note}
// Wiki
Or use icons %icon-home% and emojis %emoji-smiley%
Or use icons and emojis
// Wiki @w{segment(class=big)} And make both big %icon-home% %emoji-smiley% @w{/segment} @w{segment(class=huge)} Or huge %icon-home% %emoji-smiley% @w{/segment} @w{segment(class=massive)} Or massive %icon-home% %emoji-smiley% @w{/segment}
// Wiki Or use lists * Item 1 * Item 2 * Item 2.1 * Item 3
Or use lists
// Wiki Maybe numbered lists 1 Item 1 1 Item 2 1 Item 3
Maybe numbered lists
// Wiki
Write text with different typefaces, like **bold**, ==monospaced==, __italic__, it's also easy.
Write text with different typefaces, like bold, monospaced, italic, it's also easy.
// Wiki
---+Headers can also help
---++With different sizes
---+++And automatic margins
Navigate next sections to know more...
Landing pages can exist in any context/branch, including the initial web page. There is more to a context, but we'll be focusing on the specifics for a landing.
By default, the template used in most websites would be Layout=default-web. Setting this property for the ROOT context, will propagate for all pages.
Any context can override this by setting Local layout=default-landing, for example. Local layout will be used in that context, and will not propagate in its own branch. Let's see a common configuration for the ROOT context:
// All pages will use the default web layout Layout = default-web // This page, instead, will use the default landing layout Local layout = default-landing
For this current context we used:
// Only here we will use the default landing layout, will not propagate
Local layout = default-landing
Notice that the stripe color covers the whole space, from left to right.
The text stripe adds more left and right margins, and increases a bit the font size. In general, when writing text in left to right containers, it's better to use text stripes. Exceptions would be when using columns.
In this text stripe we use a transparent background image, one of the stock images. You can also use your own images for backgrounds, and add content on top. By default, stripes create a color background, and a font color with enough contrast. You can change font color by using innerColor property.
// ${parser.imgtbg('/glow-1.png')} stands for a stock image. You can use your own images URL. @w{textstripe(class=very padded,color=Deep-SeaBlue,image=${parser.imgtbg('/glow-1.png')})} @w{header(class=inverted big,icon=huge yellow loading cog)} This content is within a padded text stripe, to provide space @w{subheader} The header adds an icon, changing the color and adding some animation. @w{/subheader} @w{/header} ---+++The components The text stripe adds more left and right margins, and increases... @w{/textstripe}
@w{stripe(class=very padded,image=repository(/bg-example.png))}
@w{header(class=big)}
Use your own image as a background
@w{subheader}
And create complicated layouts
@w{/subheader}
@w{/header}
@w{grid(class=three column padded stackable)}
@w{column}
%icon-huge cubes%
Describing your product/service features, how to buy and next actions.
@w{button(class=primary,icon=right caret,link=#,text=Some action)}
@w{/column}
@w{column(class=center aligned)}
%icon-huge university%
Who you are, how to contact, why everyone should trust your company.
@w{button(class=primary,link=#,text=Contact)}
@w{/column}
@w{column(class=right aligned)}
%icon-huge orange comments%
Community, projects, forums. The activity you're generating in every day tasks.
@w{button(class=basic secondary,icon=right caret,link=#,text=Community)}
@w{/column}
@w{/grid}
@w{/stripe}
widestripe instead of stripe. This container adds no margins, which requires padding or padded content.
@w{widestripe(class=very padded,image=repository(/bg-example.png))}
@w{header(class=big center aligned)}
Breaking conventional margins
@w{subheader}
Reaching the entire screen width. Notice that the layout still adapts to small devices' screen.
@w{/subheader}
@w{/header}
@w{grid(class=three column padded stackable)}
@w{column}
%icon-huge cubes%
Describing your product/service features, how to buy and next actions.
@w{button(class=primary,icon=right caret,link=#,text=Some action)}
@w{/column}
@w{column(class=center aligned)}
%icon-huge university%
Who you are, how to contact, why everyone should trust your company.
@w{button(class=primary,link=#,text=Contact)}
@w{/column}
@w{column(class=right aligned)}
%icon-huge orange comments%
Community, projects, forums. The activity you're generating in every day tasks.
@w{button(class=basic secondary,icon=right caret,link=#,text=Community)}
@w{/column}
@w{/grid}
@w{/widestripe}
@w{stripe(color=c2)}
Stripes allow creating content within a container that can change...
@w{/stripe}
@w{textstripe(color=primary)}
Text stripes enhance the text reading, by giving more padding and...
@w{/textstripe}
// class=very padded, adds extra padding to the external container. Can also be padded, removing very. // innerClass=massive, gives extra size to the inner container. Can also be tiny, small, medium, big, huge. // innerColor=brown, forces the inner container font color. @w{stripe(class=very padded,innerClass=massive,innerColor=brown,image=repository(/bg-example.png))} Stripes can have background images, change their size and add padding. @w{/stripe}
Elephant's wiki accepts different notations to create headers. The easy one, perfect for text based pages, uses ---+, and the header level is controlled by the number of plus signs. For example:
---++Header level 2
Lorem ipsum dolor sit amet, consectetur adipiscing elit...
Margins are automatically set, and ensure a consistent flow of text.
Wmacros allow headers in complicated scenarios, like extensive use of size, icons, images, sub headers, and other variations. Margins work the same way as in easy headers, you can use them indistinctively.
@w{header(class=large)}Large header@w{/header}
@w{header(class=large,icon=cog)}Icon header@w{/header}
@w{header(class=huge,icon=cog)}Huge icon header@w{/header}
@w{header(class=large)}
Header and sub header
@w{subheader}This is a sub header@w{/subheader}
@w{/header}
@w{header(class=red center aligned large)}
%icon-orange huge cog%
Centered header
@w{subheader}with a centered sub header@w{/subheader}
@w{/header}
In the examples, we made use of sizes and colors. Tutorials include a description and examples of both.
Elephant Wiki and EWiki offer different ways of creating tables. While Wiki is addressed for more simple content, or e-mails, the EWiki syntax is largely recommended.
The Table Wmacros accept a variety of structures, going from auto-creating columns to full column detail, for table headers, value rows, and footers.
| Col 1 | Col 2 | Col 3 |
|---|---|---|
| Value 1 | Value 2 | Value 3 |
| Total 1 | Total 2 | Total 3 |
@w{table}
@w{theader(values="Col 1|Col 2|Col 3")}
@w{trow(values="Value 1|Value 2|Value 3")}
@w{tfooter(values="Total 1|Total 2|Total 3")}
@w{/table}
This example shows how to auto-create columns. Cell values are separated by the | character.
By default a table will use the full width of the container. You can change this by declaring a collapsing table.
| Col 1 | Col 2 | Col 3 |
|---|---|---|
| Value 1 | Value 2 | Value 3 |
| Value 1 | Value 2 | Value 3 |
@w{table(class=collapsing)}
@w{theader(values="Col 1|Col 2|Col 3")}
@w{trow(values="Value 1|Value 2|Value 3")}
@w{trow(values="Value 1|Value 2|Value 3")}
@w{/table}
You can also create definition tables.
| Table | Description | Included |
|---|---|---|
| Concept 1 | Describing concept 1 | |
| Concept 2 | Describing concept 2 |
@w{table(class=definition)}
@w{theader(values="Table|Description|Included")}
@w{trow(values="Concept 1|Describing concept 1|%icon-green checkmark%")}
@w{trow(values="Concept 2|Describing concept 2|%icon-red times%")}
@w{/table}
Long tables can be striped.
| Col 1 | Col 2 | Col 3 |
|---|---|---|
| Value 1 | Value 2 | Value 3 |
| Value 1 | Value 2 | Value 3 |
| Value 1 | Value 2 | Value 3 |
@w{table(class=striped)}
@w{theader(values="Col 1|Col 2|Col 3")}
@w{trow(values="Value 1|Value 2|Value 3")}
@w{trow(values="Value 1|Value 2|Value 3")}
@w{trow(values="Value 1|Value 2|Value 3")}
@w{/table}
For highly formatted tables, cells can be detailed using columns.
| Name | Status | Notes |
|---|---|---|
| John |
|
Visit |
| Donald | Doesn't seem to understand | Not interesting |
@w{table(class=celled)}
@w{theader(values="Name|Status|Notes")}
@w{trow}
@w{tcol(value=John)}
@w{tcol(class=positive)}
* Great feedback
* Found the new features
@w{/tcol}
@w{tcol(value=Visit)}
@w{/trow}
@w{trow}
@w{tcol(value=Donald)}
@w{tcol(class=negative,value="Doesn't seem to understand")}
@w{tcol(class=warning,value=Not interesting)}
@w{/trow}
@w{/table}
Notice that trow without the values parameter requires specifying tcol separately, and have a closing trow. Same case for tcol without the value parameter. Whenever a column has any kind of formatted content, including an inner table, you'll use the open/closing tcol Wmacro.
First thing you need to know, the image file must exist in a public location, within your website or in a public URL. Elephant provides public repositories for each context and entity. When using the Wiki editor, the easiest way to access the image repository is to click on the image icon in the toolbar.
Elephant Wiki and EWiki offer different ways of inserting images. The standard way uses the img tag:
[img URL]
@w{centeredImage}
[img URL]
Description of the image.
@w{/centeredImage}
mini, tiny, small, medium, large, big, huge, massive). For images taking full width, see below.
@w{image(class=tiny,src="repository(/Elephant-Logo.png)")}
@w{image(class=small,src="repository(/Elephant-Logo.png)")}
@w{image(class=small circular,src="repository(/Elephant-Logo.png)")}
@w{image(class=small circular centered,src="repository(/Elephant-Logo.png)")}
top, middle, bottom).
@w{image(class=small middle aligned,src="repository(/Elephant-Logo.png)")} With this text.
With this text.
The Elephant library @w{image(class=mini spaced,src="repository(/Elephant-Logo.png)")} rocks!
The Elephant library
rocks!
avatar.
@w{image(class=avatar,src="repository(/Elephant-Logo.png)")}
fluid image, takes up the width of its container.
@w{image(class=fluid,src="repository(/Elephant-Logo.png)")}
Previous tutorials have shown stripes, which you might say, are containers. This tutorial aims to show other containers, who's main use is to provide margins, paddings along with stripe-like colors and framework colors. Following tutorials explain in more detail how colors work.
Segments and solids are containers with its own margins. They provide an easy way to add content and show it is related. We have used segments when providing examples, and we'll continue to do so.
@w{segment}
This text is enclosed in a segment.
@w{/segment}
@w{segment(class=basic)}
Segments can be **basic**, respecting the same margins, but without border.
@w{/segment}
@w{segment(class=blue)}
Segments can have framework colors...
@w{/segment}
@w{segment(class=inverted blue)}
...and use them as background.
@w{/segment}
Solids are basically segments tuned to allow systems colors.
@w{solid(color=c2)}
This text is enclosed in a solid.
@w{/solid}
Solids use a different way to decide the font color, but the result is similar.
@w{solid(color=primary)}
This text is enclosed in a solid.
@w{/solid}
@w{solid(image=repository(/bg-example.png))}
Solids can also use background images.
@w{/solid}
By default, segments and solids have a background. transparent is an easy way to use segments that use their container background.
@w{transparent}
This text is enclosed in a segment.
@w{/transparent}
We used grids when talking about landing pages. Grids are a powerful tool when dealing with content columns. Yes, there is a similarity between tables and grids, but let's think of grids as a composition tool, whilst tables are showing data tools.
4 + 12 = 16. We added stackable to make the grid responsive, that is, on small screen devices, the columns will stack, taking each full width.
@w{grid(class=stackable)}
@w{column(class=four wide)}
%icon-purple massive users%
@w{/column}
@w{column(class=twelve wide middle aligned)}
@w{header}
Community
@w{subheader}
Join our community and subscribe to the mail lists, announcements and access our projects.
@w{/subheader}
@w{/header}
@w{button(class=primary,link=#,text=Join)}
@w{/column}
@w{/grid}
height column grid.
@w{grid(class=height column center aligned)}
@w{column}1@w{/column}
@w{column}2@w{/column}
@w{column}3@w{/column}
@w{column}4@w{/column}
@w{column}5@w{/column}
@w{column}6@w{/column}
@w{column}7@w{/column}
@w{column}8@w{/column}
@w{column}9@w{/column}
@w{column}10@w{/column}
@w{column}11@w{/column}
@w{column}12@w{/column}
@w{column}13@w{/column}
@w{column}14@w{/column}
@w{column}15@w{/column}
@w{column}16@w{/column}
@w{/grid}
centered grid. In the example, we create a grid with 3 columns. But we'll not use them, instead, we'll force new rows.
@w{grid(class=three column centered)}
@w{row}
@w{column}%icon-blue massive users%@w{/column}
@w{/row}
@w{row}
@w{column}%icon-blue massive users%@w{/column}
@w{column}%icon-blue massive users%@w{/column}
@w{/row}
@w{/grid}
left/center/right aligned) and vertically (top/middle/bottom aligned). Notice that grids can also be celled, showing its borders.
@w{grid(class=three column celled)}
@w{column(class=left aligned)}
Aligned to the left.
@w{/column}
@w{column(class=center aligned)}
Center aligned.
@w{/column}
@w{column(class=right aligned)}
Aligned to the right.
@w{/column}
@w{/grid}
@w{grid(class=three column center aligned)}
@w{column(class=yellow)}Yellow@w{/column}
@w{column(class=olive)}Olive@w{/column}
@w{column(class=black)}Black@w{/column}
@w{/grid}
class |
Description | Scope |
|---|---|---|
| centered | Centers horizontally the column itself | table |
| left/center/right aligned | Horizontally aligns the column content | table for all columns, trow for columns in a row, tcol for a specific column |
| top/middle/bottom aligned | Vertically aligns the column content | table for all columns, trow for columns in a row, tcol for a specific column |
Notes are specialized segment to emphasize some content.
@w{note}
Standard note.
@w{/note}
@w{note(header=With a header)}
Headers are slightly bigger and bold.
@w{/note}
@w{note(class=info,header=Information)}
Notes can be informative.
@w{/note}
@w{note(class=warning,header=Warning)}
Warn about something.
@w{/note}
@w{note(class=error,header=Error)}
Inform about an error.
@w{/note}
@w{note(class=positive,header=Positive)}
Positive messages.
@w{/note}
@w{note(class=negative,header=Negative)}
Negative messages.
@w{/note}
@w{note(class=idea,header=Idea)}
Ideas.
@w{/note}
@w{note(class=tech,header=Technical)}
Technical messages.
@w{/note}
@w{note(class=view,header=View)}
View information.
@w{/note}
@w{note(class=like,header=Like)}
Likes.
@w{/note}
@w{note(class=info,header=Colored backgrounds)}
When using colored containers, notes will create a slightly darker background.
@w{/note}
@w{note(class=info,header=Image backgrounds)}
When using image backgrounds, notes will create a slightly darker part of the image.
@w{/note}
@w{note(class=inverted info,header=Dark backgrounds)}
When the container's background is dark, you can specify **inverted** in **class**, and turn colors to white.
@w{/note}
Accordions are usually seen in FAQs (Frequently Asked Questions), where the goal is to find the question, and then unfold the answer.
free.
styled to add borders and make the title bold. If you want to enhance only the title, then use basic styled. You may also want to add the class fluid, so the accordion takes the whole width available.
bigger to the title.
asection, including heavy formating. In case you wanted to have full control over title and content, you could use atitle and acontent Wmacros.
@w{asection(title="Title")}
Content
@w{/asection}
Is equivalent to:
@w{atitle}
Title
@w{/atitle}
@w{acontent}
Content
@w{/acontent}
And both atitle and acontent accept class and style.
@w{accordion(class=basic styled fluid)}
@w{asection(title="How to keep only one answer open?")}
This is the default behaviour for accordions. If you want to keep the content open, use the **class** ==free==.
@w{/asection}
@w{asection(title="Can accordions be styled?")}
Yes, add the **class** ==styled== to add borders and make the title bold. If you want to enhance only the title, then use ==basic styled==. You may also want to add the **class** ==fluid==, so the accordion takes the whole width available.
@w{/asection}
@w{asection(title="How to make the title font bigger?")}
Add the **class** ==bigger== to the title.
@w{/asection}
@w{asection(title="How to add more format to content?")}
You're free to create any content inside an ==asection==, including heavy formating. In case you wanted to have full control over title and content, you can use ==atitle== and ==acontent== **Wmacros**.
@w{/asection}
@w{/accordion}
Some examples about using the classes above mentioned.
@w{accordion}
@w{asection(title="Content's title")}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@w{/asection}
@w{asection(title="More content's title")}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@w{/asection}
@w{asection(title="Even more content's title")}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@w{/asection}
@w{/accordion}
free
@w{accordion(class=free)}
@w{asection(title="Content's title")}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@w{/asection}
@w{asection(title="More content's title")}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@w{/asection}
@w{asection(title="Even more content's title")}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@w{/asection}
@w{/accordion}
styled and fluid
@w{accordion(class=styled fluid)}
@w{asection(title="Content's title")}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@w{/asection}
@w{asection(title="More content's title")}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@w{/asection}
@w{asection(title="Even more content's title")}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@w{/asection}
@w{/accordion}
bigger, to enhance the title.
@w{accordion}
@w{asection(class=bigger,title="Content's title")}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@w{/asection}
@w{asection(class=bigger,title="More content's title")}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@w{/asection}
@w{asection(class=bigger,title="Even more content's title")}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@w{/asection}
@w{/accordion}
Statistics is an easy way of presenting sets of value / attribute.
fluid tells the container to use full width, and center the content.
@w{statistic(class=fluid,label="Registered users",value="1.9K %icon-users%")}
@w{segment(class=basic)}
@w{statistics(class=three stackable)}
@w{statistic(label="Teams",value="22")}
@w{statistic(label="Registered users",value="1.9K %icon-users%")}
@w{statistic(label="Projects",value="180")}
@w{/statistics}
@w{/segment}
@w{segment(class=basic)}
@w{statistics(class=three blue small stackable)}
@w{statistic(label="Teams",value="22")}
@w{statistic(label="Registered users",value="1.9K %icon-users%")}
@w{statistic(label="Projects",value="180")}
@w{/statistics}
@w{/segment}
@w{segment(class=basic)}
@w{statistics(class=tiny horizontal)}
@w{statistic(label="Teams",value="22")}
@w{statistic(label="Registered users",value="1.9K %icon-users%")}
@w{statistic(label="Projects",value="180")}
@w{/statistics}
@w{/segment}
You may have noticed the use of colors across these tutorials. Some times named colors, like primary, c2, LightBlue, but also HTML/CSS color notation, like #C4AEAD. We'll look into both types, and what they mean.
There are two types of names colors, website colors and standard colors.
| Named colors | Names | Description |
|---|---|---|
| Website colors | primary, secondary, c1, c2, c3, body | These colors are configured website-wide using HTML/CSS color notation. Superusers can give these names the values that will easily accesible when creating stripes. |
| Standard colors | CrimsonRed, TigerOrange, LightBlue, and many others | These colors are listed in Colors , including an example of the color, the name and the HTML/CSS notation. |
Usually you will configure the website colors, to make sure they can be used without remembering their name or notation. But Elephant allows the whole list of standard colors, so you can use an extended palette when needed.
If you checked the color list, in Colors , you may have noticed that each color has a different font color, to ensure the font is readable. This mechanism is embedded into the Elephant libraries, and it works for any color you specified.
Stripes allow using a different font color by using innerColor property. You may find an example in Using stripes .
When using framework components, like labels and buttons, you'll be using primary, secondary and a list of fixed colors, shown using labels:
You can differentiate framework colors as they are intended for class properties, for example:
@w{label(class=orange,text=orange)}
orange
..., like in %icon-orange home%
By default, sizes shouldn't be a concern since most elements already manage the font size to the website rules. This applies to the different levels of headers, messages, buttons and others.
Sizes are specified in the class attribute. May have one of these values: tiny, small, medium, large, big, huge, massive.
Words can have different sizes, like @w{inline(class=brown tiny,text=tiny)}, @w{inline(class=brown small,text=small)}, @w{inline(class=brown medium,text=medium)}, @w{inline(class=brown large,text=large)}, @w{inline(class=brown big,text=big)}, @w{inline(class=brown huge,text=huge)} or @w{inline(class=brown massive,text=massive)}.
When a container specifies a size, the content will adapt.
@w{segment(class=basic big)}
No borders big segment.
@w{/segment}
Stripes are a composition of two containers. The outer container takes care of the inner container margins, the latter owns the content. If you want to set the size for the inner container, use innerClass instead of class.
@w{stripe(color=LightBlue,innerClass=big)}
Big font size stripe
@w{/stripe}
We have made extensive use of macro parameters throughout the tutorials. In most cases, like when specifying the class value, we don't have to worry about problematic characters. That's not the case for value or text parameters.
Single quotes ', column separation | and other characters can disrupt the Wmacro syntax. The best practice when dealing with text messages is to double quote " the value.
@w{label(class=teal,text="Any text or character")}
The text property is double-quoted, despite the fact that has no problematic characters. This is a good practice, because you don't need to worry when modifying the value.
When the value includes double quotes, use the HTML entity "
@w{label(class=teal,text="Double quotes " in value")}
Elephant provides a set of utility classes. Most of them can be applied to any element, Wmacros and Wiki tags.
@w{grid(class=two column center aligned)}
@w{column(class=textShadow)}
%icon-teal user huge%
textShadow
@w{/column}
@w{column(class=darkShadow)}
%icon-teal user huge%
darkShadow
@w{/column}
@w{/grid}
@w{grid(class=padded four column center aligned)}
@w{column(class=boxShadow)}boxShadow@w{/column}
@w{column(class=darkBoxShadow)}darkBoxShadow@w{/column}
@w{column(class=bottomShadow)}bottomShadow@w{/column}
@w{column(class=topShadow)}topShadow@w{/column}
@w{column(class=leftShadow)}leftShadow@w{/column}
@w{column(class=rightShadow)}rightShadow@w{/column}
@w{column(class=topInnerShadow)}topInnerShadow@w{/column}
@w{column(class=bottomInnerShadow)}bottomInnerShadow@w{/column}
@w{/grid}
softBackground and darkerBackground look the same with white background. The difference is that darkerBackground will create a darker version of current background, even if it is an image.
@w{grid(class=padded four column center aligned)}
@w{column(class=softBackground)}softBackground@w{/column}
@w{column(class=darkerBackground)}darkerBackground@w{/column}
@w{column(class=blue linearHighlight)}linearHighlight@w{/column}
@w{column(class=green radialHighlight)}radialHighlight@w{/column}
@w{/grid}
@w{grid(class=padded two column center aligned)}
@w{column(class=orange shine-gradient)}shine-gradient@w{/column}
@w{column(class=scaleHover)}scaleHover@w{/column}
@w{/grid}
div container inside the columns, to prevent the color colliding with column background color. Usually you will prefer using the inline Wmacro, the example is provided for rare cases where the color can't be forced.
@w{grid(class=padded four column center aligned)}
@w{column}[div(class:el-text red)]el-text red[/div]@w{/column}
@w{column}[div(class:el-text orange)]el-text orange[/div]@w{/column}
@w{column}[div(class:el-text yellow)]el-text yellow[/div]@w{/column}
@w{column}[div(class:el-text olive)]el-text olive[/div]@w{/column}
@w{column}[div(class:el-text green)]el-text green[/div]@w{/column}
@w{column}[div(class:el-text teal)]el-text teal[/div]@w{/column}
@w{column}[div(class:el-text blue)]el-text blue[/div]@w{/column}
@w{column}[div(class:el-text violet)]el-text violet[/div]@w{/column}
@w{column}[div(class:el-text purple)]el-text purple[/div]@w{/column}
@w{column}[div(class:el-text pink)]el-text pink[/div]@w{/column}
@w{column}[div(class:el-text brown)]el-text brown[/div]@w{/column}
@w{column}[div(class:el-text grey)]el-text grey[/div]@w{/column}
@w{/grid}
bigger is relative to the container, rbigger is based on page's font size.
@w{grid(class=padded two column center aligned)}
@w{column(class=bigger)}bigger@w{/column}
@w{column(class=rbigger)}rbigger@w{/column}
@w{/grid}
@w{segment(class=two-columns)}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@w{/segment}
@w{segment(class=three-columns)}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@w{/segment}
noWrap prevents white spaces from breaking into new lines. This class is useful if a table column's width is being taken by the others in the same row. By using noWrap you ensure that the white spaces won't break into a new line.
Elephant allows passing CSS attributes to Wiki tags and Wmacros. The way this is done differs.
CSS is an extensive specification. You may like to see CSS at W3C. Starters might prefer LEARN & USE.
Most Wmacros accept the parameter style with standard CCS as value.
segment is no longer governed by container positioning and can overlap other content.
@w{segment(style="width:150px;position:absolute;top:1px;right:1px")}
Top/right
@w{/segment}
Wiki tags have their own CSS way of writing attributes. Main differences are:
style, attributes treated as CSS.class, href and others, are treated as HTML attributes.[div(width:150px,position:absolute,top:1px,right:1px,border:1px solid silver,padding:0.5em,class:rounded)] Top/right [/div]
div positioning and segment. The reason is, segment uses framework margins and paddings, while div is a raw container. div also needed a border, otherwise would have been invisible.
Elephant uses by default Fomantic UI as the web framework. It's intended for visual layouts and responsiveness. What it means is, the user browser will carry the work of laying out components, through CSS/JavaScript.
CSS and JavaScript to accomplish the same results would mean a lot of markup and code. In that sense, the framework does the job, while Wiki and Wmacros take out the HTML boilerplate.
The examples we'll see may help to create complex layouts, by showing/hiding/changing elements depending on the device or screen size. It's important not to abuse these classes, since the final HTML will include all the variations, letting the user's browser decide what to show.
| class | Description |
|---|---|
| widescreen | Intended for widescreens. |
| large screen | Intended for large screens, smaller or equal to widescreens. |
| computer | Inteded for computers, smaller or equal to large screens. |
| tablet | Intended for tables, smaller or equal to computer. |
| mobile | Intended for smartphones, smaller or equal to table. |
These classes can be added to the Wmacros' class, and don't need a page reload to work. That means, they will be sensible to browser size changes, and show or hide accordingly.
| class | Container | Description |
|---|---|---|
| doubling | grid | Doubles column widths for each device jump. Final reducing size step is much as in stackable. |
| stackable | table and grid | On mobile, the columns will stack, taking full width. |
| container | grid | Makes a grid self-contained, adding responsive margins. |
| only | any | Added to widescreen, large screen, computer, tablet, mobile, from previous table, will make the content visible only when the device is met. |
| reversed | grid | Added to widescreen, large screen, computer, tablet, mobile, from previous table, will reserve columns order. |
| vertically reversed | grid | Added to widescreen, large screen, computer, tablet, mobile, from previous table, will reserve rows order. |
These classes take into account elements' display mode. Use only if you feel comfortable with this attribute.
| class | Description |
|---|---|
| blockcomputer | Block display when computer. Otherwise, none. |
| inlinecomputer | Inline display when computer. Otherwise, none. |
| flexcomputer | Flex display when computer. Otherwise, none. |
| tablecellcomputer | Table-cell display when computer. Otherwise, none. |
| blockdevice | Block display when device. Otherwise, none. |
| inlinedevice | Inline display when device. Otherwise, none. |
| flexdevice | Flex display when device. Otherwise, none. |
| tablecelldevice | Table-cell display when device. Otherwise, none. |
Elephant's Wmacros provide an easy way to add simple effects to containers and elements. By default, effects trigger on page loaded. Visibility options will be added in the future, as of now, add it manually, or wait for us to develop furthermore
These effects affect the content within the effect macro. Could be one or more containers and rich content.
@w{appear(class=slide left)}
@w{stripe(color=c2)}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@w{/stripe}
@w{/appear}
In the example, the whole stripe appears, but we could also make appear the text inside, or only part of the text.
You can use appear or disappear, with these transition effects: scale, zoom, fade (up|dowm|left|right), (horizontal|vertical) flip, drop, fly (up|dowm|left|right), swing (up|dowm|left|right), browse (up|dowm|left|right), slide (up|dowm|left|right).
@w{reveal(class=move)}
@w{rvisible}
@w{segment}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@w{/segment}
@w{/rvisible}
@w{rhidden}
@w{segment(class=inverted blue)}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@w{/segment}
@w{/rhidden}
@w{/reveal}
You can use reveal with these transition effects: fade, move, rotate, left|right|up|down, circular, small|medium|big|huge|massive.
Elephant's Wmacros detect when effects are used in class, and generate the appropriate script to activate it. This simplifies the adding of effects to normal elements.
This table show the effects that can be added to the class attribute of any Wmacro:
| Effect | Description | Modifier |
|---|---|---|
| pulsating, jiggle, flash, shake, pulse, tada, bounce, glow | Adds the effect to the element | |
| looping | Creates a loop |
@w{button(class=purple looping pulsating,icon=right chevron,link=#,text=Some action)}
@w{text}
@w{rotated}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@w{/rotated}
@w{/text}
@w{textstripe(image=/_internal/system/stock//topcard.jpg)}
@w{striped(color=Oil)}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@w{/striped}
@w{/textstripe}
The Wiki/EWiki editor has a Wmacros help, including parameters and examples you can copy & paste.
The editor has a large collection of categorized Wmacros. Select the category, the specific macro, and the example you want to see.
In the example panel, you'll see the wiki code, followed by the HTML/CSS/JavaScript output. Examples are not very populated, to ensure you can relate the code with the correspondent output.
Effect macros may require to refresh/execute command, mainly on effects involving appear/disappear transitions.
This is a list of commonly used content templates. Does not reflect the actual number of templates available for layouts, entities and email senders.
The banner templates use a JSON source as banner data. Its form is:
The most common way to use it would be the marker-jason macro , where {tmpl-root is files, template can be bannerImage or bannerCard, and repository-file would be the location of the JSON file.
In the example will be using the banners.json file, located at this context's repository.
{@ marker-json:files:bannerImage:*/banners.json} you get:
{@ marker-json:files:bannerCard:*/banners.json} you get:
{
"name" : "slider",
"minHeight" : "400px",
"banners" : [
{
"imageLink" : "banners/_internal/repository/elementals.jpg",
"background" : "#00000066",
"color" : "#fff",
"header" : "Some header",
"meta" : "Sub header",
"description" : "Lorem Ipsum is simply dummy text of the printing and typesetting industry...",
"action" : "Visit...",
"link" : "#",
"subaction" : "Or visit...",
"sublink" : "#"
},
{
"imageLink" : "banners/_internal/repository/emotion-ocean.jpg",
"background" : "#ffffff66",
"color" : "#000",
"header" : "Some other header",
"meta" : "Some header support",
"description" : "Lorem Ipsum is simply dummy text of the printing and typesetting industry...",
"action" : "Visit...",
"link" : "#"
}
]
}
The testimonial templates use a JSON source as banner data. Its form is:
The most common way to use it would be the marker-jason macro , where {tmpl-root is files, template testimonial, and repository-file would be the location of the JSON file.
In the example will be using the testimonials.json file, located at this context's repository.
{@ marker-json:files:testimonial:*/testimonials.json} you get:
{@ marker-json:files:vtestimonial:*/testimonials.json} you get:
{
"name" : "slider",
"minHeight" : "150px",
"testimonials" : [
{
"imageLink" : "testimonials/_internal/repository/face1.png",
"imageClass" : "small circular",
"text" : "Some testimonial",
"textClass" : "grey medium",
"name" : "John Doe",
"line1" : "Any text",
"line2" : "Any text",
"line3" : "Any text"
},
{
"imageLink" : "testimonials/_internal/repository/face2.png",
"imageClass" : "small circular",
"text" : "Some other testimonial",
"textClass" : "grey medium",
"name" : "Jane Smith",
"line1" : "Any text",
"line2" : "Any text",
"line3" : "Any text"
}
]
}