How to make your LUSU society page the envy of your friends

  • This piece was written over a year ago. It may no longer accurately reflect my views now, or may be factually outdated.

So, the new LUSU website. No doubt you want to know how to make it look infinitely more appealing in order to sell your society to the masses. This is a guide to tell you how to do exactly that. I’m helpful like that. Keep checking back, I’ll be updating this guide as I discover more ways to break the website into being pretty.

On the society admin dashboard, one is graciously allowed to edit the ‘Description’ box for their society. The editor accepts WYSIWYG entry, or HTML. HTML like <style> tags. If you want to include these in your own society page, just switch to Source mode:

Click this
Click this

Then add some <style> and </style> tags and copy-paste away!

stuffhere

Note that you’ll want to put your intro line above the <style> tags, or your society listing will show up like this:

listing

Anyway, here was the old page for LUECS:

luecs1

As you can see, it looks like pure, unmitigated bum. Here it is after a little bit of tinkering (and liberal use of !important CSS rules):

Much better, although there is still plenty to do. If you just want to copy what I’ve done and tinker with it, you can view the whole thing at the bottom by clicking here. In the article between here and there, I’ll go through each change step-by-step.

The world’s most 90s button

First and foremost, this rascal needed to go:

joingroup7At first I just stuck on a filter: hue-rotate(225deg); to shift the inexplicable orange around the colour wheel to the closest I could get to purple, but it looked too bright and still left me with the rest of the button. No, it all had to go:

joinbuttonThis was achieved with the following CSS rules (NB: it should go without saying that all of this CSS is bashed out through trial-and-error and thus a horrible mess that is about as CRAPL‘d as it can be):

[code language=”css”]
.join-this-group.button-bottom {
width: 100% !important;
}
.join-this-group.button-bottom a {
margin: auto !important;
background: none !important;
text-indent: 0px !important;
border-radius: 15px;
padding: 8px 20px 8px 20px;
text-align: center;
color: #551F75;
border: 2px solid #551F75;
line-height: 40px;
text-decoration: none;
background-size: 100% 200% !important;
background-image: linear-gradient(to bottom, transparent 50%, #551F75 50%) !important;
transition: background .5s ease-in-out;
}
.join-this-group.button-bottom a:hover {
background-position: 0 -100% !important;
color: #fff;
}
[/code]

First, we make .join-this-group.button-bottom fullwidth so that we can position .join-this-group.button-bottom a in the centre of it with margin: auto !important;. We then purge just about every hint of the original button with the background: none !important; and bring the original button text back into view with text-indent: 0px !important;. Lines 8-17 create a far nicer CSS button around the <a> element, with 15-17 and 20 creating a nice hover-over slide transition. Notably, the button now transitions between LUSU purple (#551f75) and white – there is no blasted turquoise.

Fixing the width

We’re living in a glorious new responsive design future, where people might be viewing a website on a desktop, a phone, a tablet, a phablet, a phesktop, a toaster, a tablone, etc. Central column designs are a holdover from the newspaper days and should be done away with as soon as possible. To do so, add these rules:

[code language=”CSS”]
.content, .header {
width: 90%;
}
.bottom-union, .top-union, .uc-poweredby-nusdigital-logo {
width: 100%;
}
.uc-poweredby-nusdigital-logo-wrapper {
width: 100%;
}
.union-footer {
margin: 0;
}
[/code]

This stretches everything out to fill all of that lovely horizontal screen real estate that’s been ignored.

Hide your shame

This one is more personal preference, but adding a quick

[code language=”CSS”]
.uc-poweredby-nusdigital-logo {
display: none;
}
[/code]

to your rules will hide that ugly NUS logo along the very bottom of the page, because why would you want to tout your affiliation to the world?

Yeah ’cause grey is the most exciting colour right?

infobox1That info box on the right bumming you out with it’s grey-on-grey colour scheme? Try this CSS on for size:

[code language=”CSS”]
.title h1 {
background-color: #551F75 !important;
}

.thumbnail,
.group-category,
.group_left_panel_menu,
.typeCategory {
background-color: #EAE5F2 !important;
}

.tree-navigation li,
.tree-navigation li a,
.tree-navigation h4 {
color: #551F75 !important;
}

.group-category {
padding-bottom: 6px;
}

.galleryIcon img {
border: 2px solid #551F75;
}
[/code]

To start with, we change the colours. I went for LUSU purple for the title bar along the top, and then got the whitened purple from the ‘Your Officers’ bar background (see blow) #EAE5F2 for the rest of the box (and, of course, making the text over it LUSU purple rather than white). Then I stuck a little padding on the bottom, because things were looking a bit too snug there for my liking. Finally, the white of the society logo suddenly giving way to the faded purple of the box looked bad, so I stuck a 2px LUSU purple border around the <img> tag.

Headings

I liked the look of all the headings being coloured in LUSU purple, rather than black. Simple:

[code language=”CSS”]
.content-wrap h1,
.content-wrap h2,
.content-wrap h3,
.content-wrap h4,
.content-wrap h5,
.content-wrap h6 {
color: #551F75 !important;
}
[/code]

I then also took the rules from .contentBoxes h2 and applied them to <h2>s in general so that all your <h2> headings will look like the default ‘Description’ one at the top of the box:

[code language=”CSS”]
h2 {
background: none;
border-bottom: 1px solid #e6e6e6;
margin: 1.75% 0% 0%;
}
[/code]

Want to actually show your exec. somewhere?

Okay, this one took some time but it was worth it. Step one was to get the HTML from the ‘Your Officers’ block on the homepage. All 257 lines of it. Luckily for you, I’ve already trimmed them to the lines you need. Here’s the HTML you’ll want to add to your page:

[code language=”HTML”]
<h2>The Exec.</h2>

<div class="section stripe officersdesk" id="officers">
<div class="stripe-wrap" id="officers-wrap">
<div class="stripe-carousel officersdesk" id="officers">
<ul class="jcarousel-skin-tango edit-mode-stripe">
<!– repeat block for each exec. member –>
<a href="#">
<li>
<span class="thumbnail-image"><img alt="POSITION HERE" src="IMG URL HERE" /></span>
<span class="page-details"><span class="page-title">NAME HERE</span><span class="page-summary">POSITION HERE</span></span>
</li>
</a>
<!– end repeat –>
</ul>
</div>
</div>
</div>
[/code]

Then add the following CSS, amending the width value for #officers a with the result of \left\lfloor\frac{1}{A} \times 100\right\rfloor, where A is the number of exec. members you have:

[code language=”CSS”]
.thumbnail-image img {
height: 160px;
width: 160px;
object-fit: cover;
object-position: 0 50%;
}

#officers a {
width: WIDTH HERE% !important;
float: left;
}

#officers li {
width: 100% !important;
}

#officers {
overflow: hidden !important;
margin-top: 10px;
}
[/code]

Now for the excruciating part: uploading the images. On the website backend, click the ‘Add Image’ button and then the ‘Upload’ tab:

This one
This one

Upload your photo and wait five years or so for it to finish. Then, click the ‘Image Info’ tab, followed by the ‘Browse Server’ button. Click the image you just uploaded, and then ‘OK’. In the ‘URL’ box will be the URL for your photo – copy it and paste it into your HTML where it says Image URL here:

Copy this
Copy this

Repeat this process, add names and job titles and Bob’s your uncle.

And your social media?

You’d be forgiven for thinking that adding social media links on the backend would cause them to appear on the frontend. Nope, it’s another DIY job. First, the HTML:

[code language=”HTML”]
<h2>Social Media</h2>

<ul class="social-media">
<!– repeat block for each social media account –>
<a href="URL HERE">
<li>
<div class="icon" style="background-image: url(‘IMG URL HERE’);"></div>
</li>
</a>
<!– end repeat –>
</ul>
[/code]

To style it, we set up the ul to remove the bullet points, remove its left-margin so it sits flush with the rest of the page and add an :after rule that clears the float rule that we bring in for all its child list elements to make them align horizontally:

[code language=”CSS”]
.social-media {
list-style: none;
margin: 10px 0 10px 0 !important;
}

.social-media:after {
content: ”;
display: block;
clear: both;
}

.social-media li {
float: left;
}
[/code]

Then we just add some styling to the icons themselves, and a nice bevel :hover effect:

[code language=”CSS”]
.icon {
height: 50px;
width: 50px;
border-radius: 10px;
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
cursor: pointer;
margin: 5px 10px 5px 0x;
}

.icon:hover {
-moz-box-shadow: inset 0 0 10px #000000;
-webkit-box-shadow: inset 0 0 10px #000000;
box-shadow: inset 0 0 10px #000000;
}
[/code]

Standards-compliant session details

If your society meets up regularly, such as for weekly training sessions, you can ensure you get featured on Anson Cheong’s neat LUSocieties app by ensuring you write your session dates in the following format: dddd, HH:MM-HH:MM, location. For example, Monday, 22:00-23:00, George Fox Foyer.


Full Code

[code language=”CSS” htmlscript=”true”]
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>

<style type="text/css">
.content,
.header {
width: 90%;
}
.bottom-union,
.top-union,
.uc-poweredby-nusdigital-logo {
width: 100%;
}
.uc-poweredby-nusdigital-logo-wrapper {
width: 100%;
}

.union-footer {
margin: 0;
}

.join-this-group.button-bottom {
width: 100% !important;
}
.join-this-group.button-bottom a {
margin: auto !important;
background: none !important;
border-radius: 15px;
text-indent: 0px !important;
padding: 8px 20px 8px 20px;
text-align: center;
color: #551F75;
border: 2px solid #551F75;
line-height: 40px;
text-decoration: none;
background-size: 100% 200% !important;
background-image: linear-gradient(to bottom, transparent 50%, #551F75 50%) !important;
transition: background .5s ease-in-out;
}
.join-this-group.button-bottom a:hover {
background-position: 0 -100% !important;
color: #fff;
}

.uc-poweredby-nusdigital-logo {
display: none;
}

.title h1 {
background-color: #551F75 !important;
}

.thumbnail,
.group-category,
.group_left_panel_menu,
.typeCategory {
background-color: #EAE5F2 !important;
}
.tree-navigation li,
.tree-navigation li a,
.tree-navigation h4 {
color: #551F75 !important;
}
.group-category {
padding-bottom: 6px;
}
.galleryIcon img {
border: 2px solid #551F75;
}

.content-wrap h1,
.content-wrap h2,
.content-wrap h3,
.content-wrap h4,
.content-wrap h5,
.content-wrap h6 {
color: #551F75 !important;
}
h2 {
background: none;
border-bottom: 1px solid #e6e6e6;
margin: 1.75% 0% 0%;
}

.thumbnail-image img {
height: 160px;
width: 160px;
object-fit: cover;
object-position: 0 0;
}
#officers a {
width: 100% !important;
float: left;
}
#officers li {
width: 11% !important;
}
#officers {
overflow: hidden !important;
margin-top: 10px;
}

.social-media {
list-style: none;
margin: 10px 0 10px 0 !important;
}
.social-media:after {
content: ”;
display: block;
clear: both;
}
.social-media li {
float: left;
}
.icon {
height: 50px;
width: 50px;
border-radius: 10px;
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
cursor: pointer;
margin: 5px 10px 5px 0x;
}
.icon:hover {
-moz-box-shadow: inset 0 0 10px #000000;
-webkit-box-shadow: inset 0 0 10px #000000;
box-shadow: inset 0 0 10px #000000;
}
</style>

<p>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.</p>

<h2>The Exec.</h2>

<div class="section stripe officersdesk" id="officers">
<div class="stripe-wrap" id="officers-wrap">
<div class="stripe-carousel officersdesk" id="officers">
<ul class="jcarousel-skin-tango edit-mode-stripe">
<!– repeat block for each exec. member –>
<a href="#">
<li>
<span class="thumbnail-image"><img alt="POSITION HERE" src="IMG URL HERE" /></span>
<span class="page-details"><span class="page-title">NAME HERE</span><span class="page-summary">POSITION HERE</span></span>
</li>
</a>
<!– end repeat –>
</ul>
</div>
</div>
</div>

<h2>Social Media</h2>

<ul class="social-media">
<!– repeat block for each social media account –>
<a href="URL HERE">
<li>
<div class="icon" style="background-image: url(‘IMG URL HERE’);"></div>
</li>
</a>
<!– end repeat –>
</ul>
[/code]