Basic Build
PTabs make clickable sections inside a post. The whole tab set begins with
<PTabbedContent>. Each individual tab begins with
<PTab=Tab Name>.
<PTabbedContent=Example Tabs>
<PTab=Overview>
Overview text goes here.
</PTab>
<PTab=History>
History text goes here.
</PTab>
<PTab=Notes>
Notes go here.
</PTab>
</PTabbedContent>
SCREENSHOT NEEDED
A basic three-tab PTabs result on SoS. Show Overview, History, and Notes, with one tab clearly active and its content visible.
PTABS STAY INLINE
PTabs should be pasted directly into the normal post editor rather than split into a saved Posting Template. Each tab has its own writing area, so keeping the whole block inline lets the member reach and edit every section.
Style the Tabs
The closing tag for each PTab can style two different things: the content panel and that tab's button.
Normal settings style the content panel. Settings that begin with
tab- style the button.
</PTab={background:#181818;color:#eeeeee;padding:20px;tab-background:#242424;tab-color:#dddddd;tab-hover-background:#333333;tab-hover-color:#ffffff;tab-selected-background:#6b4a31;tab-selected-color:#fff1d6;}>
tab-background and tab-color style the normal button.
tab-hover-... changes it while the mouse is over it or it is focused.
tab-selected-... changes the currently open tab.
Because every PTab has its own closing style block, different tabs can have different colors or other styling.
Layout Options
The closing
</PTabbedContent> tag controls the whole tab set.
</PTabbedContent={tabs:top;tab-alignment:center;tabgap:8;animation:fade;}>
tabs can be
top or
side.
tab-alignment controls top tabs:
left,
center, or
right.
tabvalign controls side tabs:
top,
middle, or
bottom.
tabgap controls the space between the buttons and content.
tabwidth controls the width of the side-tab column.
animation can be
fade or
slide.
</PTabbedContent={tabs:side;tabvalign:top;tabwidth:150;tabgap:10;animation:slide;}>
SCREENSHOT NEEDED
A side-by-side comparison: LEFT should show wrapped top tabs; RIGHT should show side tabs. Use the same simple content in both so only the layout changes.
More Behavior
PTabs can be put inside another PTabbedContent block. That is called nesting: one tab set lives inside another.
Use nesting when a large subject really has smaller sections. Do not add nested tabs only for decoration, because too many navigation layers become harder to follow.
The whole row of tab buttons can also be styled with
tabbar- settings on the closing PTabbedContent tag.
</PTabbedContent={tabbar-position:sticky;tabbar-top:0;tabbar-z-index:10;}>
In that example, the entire tab-button row stays in place while its surrounding scroll area moves.
TRANSPARENT STICKY TABS
If a sticky tab bar is transparent, scrolling text can still be visible behind it. For a clean transparent look, it is often better to keep the tab row outside the scrolling box and let only the content panel scroll.
SCREENSHOT NEEDED
PTabs code beside its rendered result. Draw a simple visual line from each <PTab=...> block in the code to the matching visible tab button.
Carousels
Carousels make a click-through slideshow inside a post. The whole carousel goes between the carousel tags, and each individual page goes between its own slide tags.
<carousel>
<slide>First slide content.</slide>
<slide>Second slide content.</slide>
<slide>Third slide content.</slide>
</carousel>
A slide can contain normal text, an image, or a whole coded layout. For an image-only slideshow, put one image inside each slide.
<carousel>
<slide><img src="IMAGE URL"></slide>
<slide><img src="IMAGE URL"></slide>
</carousel>
Optional settings go on the opening carousel tag:
<carousel loop="yes" counter="yes" animation="slide">
loop can be
yes or
no. When it is on, moving past the last slide returns to the first.
counter can be
yes or
no. It controls the visible slide counter.
animation can be
slide or
fade.
NO JAVASCRIPT NEEDED
The carousel behavior is already built into SoS. Members only need the carousel and slide tags.