The No2NuclearPower website was last revamped by us over 6 years ago and the grungy styling was looking dated.
The aim of this revamp was to give the site a cleaner, fresher look.
Using our LGD Callanish base theme as a starting point, we developed a customised theme.
Heading
Many of the images used for headings in the previous design were not available at sufficient resolution to use in a full width header, so we sourced additional photos.
The heading image is selected randomly with each new page load, selected from 6 images. The images were prepared at 3 widths to avoid loading unnecessarily large images on mobile devices.
The height of the heading images is specified as a percentage of the viewport (screen) height, which means that the visible image will be cropped vertically or horizontally as required to fit.
In addition, a clipping path has been applied to the heading area to give a sloping bottom edge for the heading images. Clip-path is not yet fully supported in some browsers (eg, the Edge browser) and while there are alternatives and workarounds, as clip-path over 90% browser support it was considered suitable in this project for use as a stylistic add-on, as opposed to a key feature.
The slope to the heading image, together with the content area sitting on top of the lower part of the heading image provides visual interest.
Sidebars
The site makes extensive use of sidebars, with a default sidebar and 8 contextual sidebars, plus the option for per page sidebar content.
To give the sidebars some visual interest and carry through the sloped styling of the header and footer area, we decided to apply a skew to the sidebar widget areas.
See the technical note below for details about the clip applied to the heading and the sidebar skew.
Fonts
The body text is the theme’s default, Lato. For the headlines we selected Oswald, its bold narrow style provides a strong visual element while preventing longer headlines taking up too much space. As a counterpoint to the Oswald headlines, we selected Roboto Mono as the font for smaller headlines (h4-) and, with a background colour, for sectional labelling.
Technical Note
Clip and Skew
A clip of 15% was applied to the bottom right of the heading box to created a slope to the bottom edge. The code used is:
.site-header {
margin-top: 34px;
-webkit-clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}
The sidebar effect was achieved by applying a Y skew to each widget area, then the reverse skew to the widget content.
For the top widget area in each sidebar, the top skew looked odd, and a square top looks better.
Applying a skew to the widget area itself would not achieve this, so for the top widget area the background was set to transparent and a skewed background colour applied using the ::after pseudo element. By setting the transform origin to top right, the background gets cropped by the top of the widget area, creating the required flat-topped trapezoid shape.
.sidebar .widget {
background: #fff;
padding-top: 30px;
-ms-transform: skewY(3deg);
-webkit-transform: skewY(3deg);
transform: skewY(3deg);
}
.sidebar .widget .widget-wrap {
-ms-transform: skewY(-3deg);
-webkit-transform: skewY(-3deg);
transform: skewY(-3deg);
}
.sidebar .widget:first-of-type {
position: relative;
background-color: transparent;
padding-top: 30px;
padding-bottom: 40px;
margin-bottom: 20px;
-ms-transform: skewY(0);
-webkit-transform: skewY(0);
transform: skewY(0);
}
.sidebar .widget:first-of-type:after {
content: " ";
position: absolute;
display: block;
background: #fff;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: -1;
-ms-transform-origin: top right;
-webkit-transform-origin: top right;
transform-origin: top right;
-ms-transform: skewY(3deg);
-webkit-transform: skewY(3deg);
transform: skewY(3deg);
}
.sidebar .widget:first-of-type .widget-wrap {
-ms-transform: skewY(0);
-webkit-transform: skewY(0);
transform: skewY(0);
}
Skew and Clip effects can look very similar at specific values and widths, but for responsive design, where widths are not fixed, the two effects can diverge significantly.
If you are using a browser that supports re-sizing (most browsers except Internet Explorer and iOS Safari) you can change the width of the box below to see the divergence.
Choosing between skew and clip will depend on the effect you are trying to achieve.