Features within the network lie exclusively within the body area of the network, and are linked from the main network navigation area. Features can also have corresponding modules on the main page and member profile pages.
Pages in a social network are based on a strict four-column grid. To ensure pages follow this layout, social network pages are laid out using defined column grouping (.xg_colgroup
) and column (.xg_#col
) element classes. These divide up the page, into which modules (.xg_module
) or other content can be placed.
Example page layout and classes used.
If you were to construct the layout depicted above, the following HTML structure would be used:
<div class="xg_colgroup"> <div class="xg_3col first-child"> <div class="xg_colgroup"> <div class="xg_1col first-child"> <div class="xg_module">…</div> </div><!--/.xg_col--> <div class="xg_2col last-child"> <div class="xg_module">…</div> <div class="xg_module">…</div> </div><!--/.xg_col--> </div><!--/.xg_colgroup--> <div class="xg_colgroup"> <div class="xg_2col first-child"> <div class="xg_module">…</div> </div><!--/.xg_col--> <div class="xg_1col last-child"> <div class="xg_module">…</div> <div class="xg_module">…</div> </div><!--/.xg_col--> </div><!--/.xg_colgroup--> </div><!--/.xg_col--> <div class="xg_1col last-child"> <div class="xg_module">…</div> </div><!--/.xg_col--> </div><!--/.xg_colgroup-->
.xg_colgroup
.xg_#col
) to allow more complex page layouts..xg_1col
, .xg_2col
, .xg_3col
.xg_1col
, or one .xg_2col
and one .xg_1col
. The first xg_#col
in each .xg_colgroup
should be given first-child
class, the last last-child
.Once we have defined the page layout using columns, we can use modules within these to contain page content. The containing module element (.xg_module
) is typically divided into four distinct parts, although only .xg_module_body
is required.
Module structure and corresponding visual appearance.
The main components of .xg_module
are structured and ordered as follows:
<div class="xg_module"> <div class="xg_module_head"> <h2>Module Title</h2> <p class="edit"> <a class="button" href="#">Edit</a> </p> </div><!--/.xn_module_head--> <form class="xg_module_options"> <fieldset> <dl class="label-right"> <dt>…</dt> <dd>…</dd> … </dl> <p class="buttongroup"> <input class="button submit" value="Save"/> <input class="button" value="Cancel"/> </p> </fieldset> </form><!--/.xn_module_options--> <div class="xg_module_body"> <h3>Heading</h3> <h4>Sub-Heading</h4> … </div><!--/.xn_module_body--> <div class="xg_module_foot"> … </div><!--/.xn_module_foot--> </div><!--/.xn_module-->
.xg_module
.xg_module_head
(Optional)form.xg_module_options
(Optional).xg_module_body
pad
class to this element will give the module more padding - useful for when a module takes up a whole page or is quite large..xg_module_foot
(Optional)Throughout a social network, a number of icons are used to highlight specific links or features.
Icons can be styled in two ways. The .desc
class applies an icon to a link (<a>
) or text selection (<span>
), whilst the .icon
class applies an icon and hides the display of the associated text.
A second class (listed in the tables below), defines which icon is shown.
<!-- Text with friends icon --><span class="desc friends">Friends</span> <!-- Text with friends icon applied (description hidden) --> <span class="icon friends">Friends</span> <!-- Link with share icon --> <a href="#" class="desc share">Share</a> <!-- Link with share icon applied (description hidden) --> <a href="#" class="icon share">Share</a>
Class | class="desc [Class]" |
class="icon [Class]" |
---|---|---|
.add |
Add | Add |
.edit |
Edit | Edit |
.delete |
Delete | Delete |
.approve |
Approve | Approve |
.download |
Download | Download |
.rotate |
Rotate | Rotate |
.play |
View as Slideshow | View as Slideshow |
.copy |
Copy | Copy |
.save |
Save | Save |
.view |
View | View |
.leave |
Leave | Leave |
.comment |
Comment | Comment |
.reply |
Reply | Reply |
Class | class="desc [Class]" |
class="icon [Class]" |
---|---|---|
.addfriend |
Add Friend | Add Friend |
.friend-pending |
Pending Friend | Pendind Friend |
.blocked |
Blocked | Blocked |
.friends / share |
Friends / Share | Friends |
.sendmessage |
Send Message | Send Message |
.invitefriend |
Invite Friends | Invite Friends |
Class | class="desc [Class]" |
class="icon [Class]" |
---|---|---|
.feature-add |
Feature on Main | Feature on Main |
.feature-remove |
Remove from Main | Remove from Main |
.favorite-add |
Add to Favorites | Add to Favorites |
.favorite-remove |
Remove from Favorites | Remove from Favorites |
.follow-add |
Follow | Follow |
.follow-remove |
Stop Following | Stop Following |
Class | class="desc [Class]" |
class="icon [Class]" |
---|---|---|
.page |
Page | Page |
.table |
Table | Table |
.clock |
Date | Date |
.settings |
Settings | Settings |
.rss |
RSS Feed | RSS Feed |
When validating forms, we provide the user with feedback as to where errors have occured by highlighting both the offending fields (adding .error
classes to the offending <dl/>
elements), and providing a message that descripes the problem in more detail (using the .errordesc
class).
The .errordesc
element must appear directly before the set of fields that have errors.
Example of a form requiring validation.
<fieldset class="nolegend"> <div class="errordesc"> <h4>There are problems with your profile</h4> <ul class="last-child"> <li>Please provide your First Name</li> <li>Please provide your Country</li> <li>You must accept the User Agreement to continue</li> </ul> </div> <dl class="label-right error"> <dt><label for="first-name">First Name</label></dt> <dd><input id="first-name" type="text" class="textfield" size="30" style="width:420px" /></dd> </dl> <dl class="label-right"> <dt><label for="last-name">Last Name</label></dt> <dd><input id="last-name" type="text" class="textfield" size="30" style="width:420px" /></dd> </dl> <dl class="label-right"> <dt><label for="about">About You</label></dt> <dd><textarea id="about" rows="3" cols="30" style="width:420px"></textarea></dd> </dl> <dl class="label-right error"> <dt><label for="country">Country</label></dt> <dd> <select id="country" style="width:420px"> <option selected="selected">United States of America</option> <option>Canada</option> <option>United Kingdom</option> </select> </dd> </dl> <dl class="label-right error"> <dd><label><input type="checkbox" class="checkbox"/>I have read and accept theUser Agreement</label></dd> </dl> <p class="buttongroup"> <strong class="left"><a href="#">Cancel</a></strong> <input type="submit" class="button" value="Submit"> </p> </fieldset>
Last updated by Ning Developer Admin Jul 6, 2009.
© 2024 Created by Ning Developer Admin. Powered by