Beruflich Dokumente
Kultur Dokumente
Contents
Contacts! 2
The CWD! 2
Help!! 2
CWD in 5 Minutes! 5
The Banner! 7
Site Navigation! 9
More Customisation! 9
Writing Style ! 11
Semantics 101! 11
Designing Pages! 17
Columns & Layout: The Grid! 17
Floating Content! 17
Icons! 18
Frameworks! 21
Web Standards! 22
1
The Common Web Design Documentation
Contacts
The CWD
The Common Web Design is developed by the Online Services Team, and is
managed by Alex Bilbie and Nick Jackson. You should direct any questions,
problems or change requests to either of these people.
Alex Bilbie
abilbie@lincoln.ac.uk
01522 886570
Nick Jackson
nijackson@lincoln.ac.uk
01522 886570
Help!
If you have issues with or need help using an online service you should contact the
IT Support Desk who will be able to help you solve your problems. Note that the
helpdesk cannot provide support for CWD implementations.
IT Support Desk
helpdesk@lincoln.ac.uk
01522 886500
2
v2.3 Dallas Dhu
1 http://www.blueprintcss.org/
2 http://jquery.com/
3 http://jqueryui.com/
4 http://www.modernizr.com/
3
v2.3 Dallas Dhu
CWD in 5 Minutes
This is a very quick guide to getting started with the CWD. Just follow the steps.
5
The Common Web Design Documentation
then you should check the Customising the Header Navigation documentation for the
rules regarding this area.
If you need it you can also edit the Sub Navigation Block. This is useful for
splitting your site into logical sections, as the sub navigation can change on a page-
by-page basis. If you donʼt need it you can delete the block.
6
v2.3 Dallas Dhu
Header Navigation
The header navigation represents key, universal functionality which sites share such
as:
The Banner
The site banner is the strongest element of branding available to your site within the
CWD. It should reflect your siteʼs focus, and be distinct enough that your site can
easily be identified using the banner. In most cases this is done by specifying a
banner background image which relates to the siteʼs content or existing branding.
7
The Common Web Design Documentation
These options are added to the cwd.php CSS file as a standard HTTP query string,
for example cwd.php?b_hue=red&b_textbg=0.5. You can use multiple options
at once, and do not need to specify every option (just the ones you change from the
default).
Banner Background
Default None
Specify the urlencoded location of the background image for the page banner. This
must be no smaller than 950px wide by 150px high.
If no image is specified, the banner background will be a gradient in line with your
b_hue setting. It is strongly recommended that you specify a banner background.
The banner background must be the same for all pages on a site, except for where
the header image is dynamically generated of as part of an image rotation. In these
cases, the images must clearly follow the same style.
Default on
Set whether the banner text and text background should be visible or not. For most
sites this will be left on – it should only be turned off if the banner image already
includes the siteʼs title (for example making use of a logo or specific branding style).
In these cases you should ensure the siteʼs title is towards the right hand side of the
banner to avoid the Universityʼs logo.
Values off, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9
Default 0.2
The opacity of the text background shading, where off is completely transparent and
0.9 is 90% opaque.
8
v2.3 Dallas Dhu
Default white
Change the colour of the text in the banner to either black or white. In most cases
this wonʼt need to be changed as the text background will help make the default
white text visible, however you may choose to use a light background image with no
text background in which case switching the text to black is important for visibility.
Banner Hue
Default blue
Set the hue of the banner background. Where you are not specifying a b_bg image
this can be used to add a more unique appearance to your site.
Site Navigation
A more detailed overview of this navigation is coming soon.
More Customisation
A common question is “can I change the colour/size/shape/position/font of the
header/footer/logo/text/banner/links/menu?”. The answer in these cases is almost
certainly “no”, as it would defeat the purpose of a common design. Customisation of
the page appearance should be limited to the banner using the above options and
positioning of elements within the main body.
In addition to this, you must not use your own CSS or inline styling to do anything
other than style elements you have added yourself. We make frequent, small
changes to elements in the CWD to improve accessibility and readability and often
these changes will clash with those you have made. In particular you must not
change any of the font sizes, padding, line-height, weight or other styles in standard
elements such as <p> or <h3>.
9
The Common Web Design Documentation
Generally speaking if we are alerted to a problem with your site we will contact you to
discuss exactly what is wrong, and how to resolve it. Weʼre friendly people and weʼd
rather help make sure that youʼre using the CWD properly than tell you off for using it
wrongly.
However, should you continue to ignore the guidelines and rules regarding the CWD
after us getting in touch, or if weʼre unable to contact you, we do have the right to
disable the styles and frameworks for your site. This will always be a last resort, but
misuse of the CWD will only weaken its position as a standardised, reliable and
universal approach to web design throughout the University.
10
v2.3 Dallas Dhu
Writing Style
An important part of designing for the web is making the style of your writing
consistent and easily understood. This helps both people and computers to make
sense of the page, helps make searching more efficient and is generally held as
good practice.
Semantics 101
Web browsers cannot understand web pages as humans read them – they cannot
interpret information such as the visual layout of a page, colours or bold text.
Whereas to a full-sighted human the meaning might be clear it might not be to a web
browser or when listened to through a screen reader. For this reason you need to be
aware of semantics and the correct way of providing semantic information when
creating web pages.
Using well-formed semantics is an easy way to make your page more
understandable to web browsers (including screen readers and other accessibility
tools), easier for you to manage because of cleaner code, and better formatted using
the CWD.
Structure Is Everything
Your web page should be completely understandable if all formatting, layout and
JavaScript is removed. A lot of web browsers offer options or toolkits which let you
disable specific features of web pages to see how they look.
As a basic rule, you should never rely on size, boldness, italics, colour or position
alone to add meaning to something. Instead you should always use semantic tags
(weʼve given a basic overview of some common ones below) to add meaning to your
page. Using a semantic tag will often add its own formatting to the text so that it can
easily be understood by people reading the page (for example by making headings
bigger), but it also adds a second layer of meaning to the page which helps
computers make more sense of it, helping things such as screen readers add
emphasis in the right place or search engines to pick out relevant content.
11
The Common Web Design Documentation
Page Headings
Page headings in HTML are made using the elements <h1> through <h6>, with
<h1> being the biggest and most important.
Heading elements are used to break the page up into logical sections, which must
(according to the HTML specification) be arranged hierarchically. For instance, you
cannot put a <h5> element underneath a <h3> element since this makes no logical
sense. An example of how to use headings is as follows
<h1>Page Title</h1>
<p>This is an introduction to the page.</p>
<h2>Heading 2</h2>
<p>This is some text under the heading.</p>
<h3>Heading 3</h3>
<p>You can nest headings underneath each other.</p>
<h2>Heading 2 (Again)</h2>
<p>You can also put as many of h2 and below as you want.</p>
As mentioned in the example, you can use as many of <h2> and below as you want
but there can only ever be one <h1> on a page, and it is usually reserved for the site
title. The CWD uses the <h1> tag for the text in the banner, so you should never be
adding a <h1> element to your page.
Bold
When making bold text you need to decide if the boldness is purely presentational
(for example in the name of an article) or if it puts a particular emphasis on the word
(such as giving a firm instruction). If the boldness is presentational you should use
<b> as the tag, which will make the text appear in bold but nothing else. If you are
placing emphasis on the word you should use the <strong> tag, which will make
the text appear in bold and also tell software such as screen readers that it needs to
be emphasised in speech.
Italic
When making italicised text you need to decide if the italics are purely presentational
(for example in the name of a book) or if it puts a particular emphasis on the word
(such as giving a firm instruction). If the italics are presentational you should use <i>
as the tag, which will make the text appear in italics but nothing else. If you are
placing emphasis on the word you should use the <em> tag, which will make the text
12
v2.3 Dallas Dhu
appear in italics and also tell software such as screen readers that it needs to be
emphasised in speech.
Images
Images on the web are a fact of life for most people, but you must consider how the
web page will appear to those who cannot see the images and must have them
described to them. The <img> tag provides two attributes you can set to help in this,
alt and title.
The alt attribute in general terms should always be set for an image unless it exists
purely for the design of the page. For example, in the CWD template we do not set
the alt attribute for any of our images since they do not form part of the content of
the page and are irrelevant to anybody reading that content. By contrast any images
we put in the content of a page always have the alt attribute set. Alt should
contain a description of the image which makes sense if the image is removed. Some
times this is a simple matter of describing the contents of the images, but other times
you must describe what information the image is actually showing.
Title, on the other hand, should be treated much as a caption. In all standard
compliant web browsers the title attribute will be shown as a floating tooltip when
you hover your mouse over an image.
13
The Common Web Design Documentation
Clarify acronyms.
It is very easy – especially when writing from within somewhere like a university – to
use specialist acronyms which people may not understand. As with jargon, explain
uncommon abbreviations and acronyms.
Be concise.
If you can say something in fewer words do so. People browsing the web have less
patience than people reading a printed page.
14
v2.3 Dallas Dhu
5 http://styleguide.yahoo.com/
15
v2.3 Dallas Dhu
Designing Pages
Columns & Layout: The Grid
Help on how to use the grid content is coming soon.
The Sidebar
Details of the sidebar and how to use it are coming soon.
Floating Content
Help on how to float content is coming soon.
Text Input
Adding the appropriate styling to text inputs is very simple, all you need to do is add
the text class to the element. This styling is also valid for other text-based inputs
such as password.
When creating text inputs you should also consider the use of HTML5 input types
such as email and url. These can be used by the browser to improve the
behaviour of your web page, for example by adding more appropriate input methods,
clearer prompting or in-browser validation.
Buttons
There are two ways of adding buttons to your web page, and which method is most
appropriate will change depending on what you are trying to achieve.
The first is to add the class button to the element you want to appear like a button.
Generally speaking this is limited to <button> and <a> elements, for example:
<button class=”button”>
<a href=”#” class=”button”>
17
The Common Web Design Documentation
The second, more complex method is to use the jQuery UI .button() function. This
allows for more complicated functionality such as adding icons to buttons (see the
section on icons) and control of states such as enabled and disabled. For more
information on this, please check the jQuery UI documentation.
Icons
The jQuery UI library which the CWD uses provides a large range of icons which can
be used to help prompt users. These icons can be used on their own or – more likely
– as part of buttons alongside helper text.
You should always use a provided icon (if one exists which meets your needs)
instead of creating your own, as these are sent to users in a very optimised way and
match the existing appearance and colour scheme of the CWD.
For more information on using icons please see the jQuery UI documentation.
18
v2.3 Dallas Dhu
19
v2.3 Dallas Dhu
CWD Assets
All of the CWDʼs assets – including images, scripts and CSS files – are stored in a
centrally managed location. This is designed to provide a robust and reliable
distribution of the files which make up the CWD, as well as allow the CWD to be
changed once to update all sites using it.
You should not, under any circumstances, make local copies of CWD assets for your
own site without first checking with the Online Services Team.
Frameworks
We have made four frameworks available to you, to make development faster and
easier. These frameworks abstract out a lot of the idiosyncrasies of individual web
browsers, provide a uniform and easily understood way of building web applications,
enforce uniformity and speed up the performance of sites. Wherever possible you
should use these frameworks instead of building your own alternative.
The CWD maintains these frameworks at the latest version as part of its centrally
managed assets; you do not need to worry about upgrading them as this will happen
automatically.
Blueprint: CSS
Blueprint is a CSS framework which ensures consistency across multiple browsers.
The only part of Blueprint which you really need to worry about is the grid, which is
explained in more detail in the Designing Pages section.
jQuery: JavaScript
JavaScript is an integral part of web applications, which is why we have included the
popular jQuery library in the CWD. The full scope of jQuery is beyond this
documentation to explain, but it includes optimised and browser-independent
methods for achieving complex behaviours, including the use of AJAX.
You should use jQuery functions wherever possible to help you develop web
applications, since they are regularly updated to include new optimisations, bug fixes
and browser compatibility fixes which are then automatically included in your
application.
21
The Common Web Design Documentation
For more information on the available functions, including examples and tutorials,
please check the jQuery documentation6 .
Nucleus
Nucleus is a JavaScript library which provides a limited range of information about
the current userʼs role within the University, derived from the Nucleus APIs.
At the moment this library is under development and is not available for public use,
but will include functions to find information such as a userʼs physical location on
campus, their faculty or department, presence information and so-on using browser-
based methods better suited to web application development.
Web Standards
The Common Web Design is built around the latest web standards, and is carefully
designed to degrade gracefully on older browsers and Internet Explorer. These
standards make sure that web pages render consistently across different browsers
and operating systems (including mobile devices), and also that where a particular
feature is unsupported it is done so elegantly by maintaining the page readability.
When youʼre writing your own site using the CWD you should always follow the latest
relevant standards.
HTML5
HTML5 represents the next generation of the language which makes up web pages.
It allows for much easier development of web-based applications and replaces many
proprietary extensions such as Google Gears and Adobe Flash. Since HTML5 is built
on top of HTML 4.01 older browsers will simply ignore the new markup which they
donʼt understand, and will behave using the older standards. New browsers,
however, benefit from an improved user experience and optimised application
behaviour.
A good way to explore the possibilities of HTML5 is to look at Dive Into HTML5 8,
which explains many of the basic enhancements such as improvements to forms as
well as more advanced features such as geolocation, video and local storage.
6 http://docs.jquery.com/
7 http://jqueryui.com/demos/
8 http://diveintohtml5.org/
22
v2.3 Dallas Dhu
It is important to note that you should not use XHTML elements in your pages as this
can make a page appear as invalid HTML5. Whilst this will not affect the pageʼs
rendering in most browsers it is considered bad practice.
The W3C standards body provides a free validator at http://validator.w3.org/ which
you can use to ensure your markup meets the HTML5 standard.
CSS3
Cascading Style Sheets are the industry standard for controlling the appearance of
content on the web, replacing older techniques such as tables, padding images and
inline <font> styling. CSS3 is the latest version of those standards, and is widely
supported by new browsers.
The CWD provides several custom styles for elements which help to make them
appear consistently. Whilst you should feel free to add styles for your own custom
elements, you should avoid extending or overwriting the CWD styles as these may
change in the future.
You must not use tables for any layout purposes, as this will break the page layout
when printed or viewed on mobile or small screen devices. You must not use the
<font> tag for text formatting.
23