On two separate Moodle themes (VikingNet and Serenity), I’ve hacked the CSS of the login block so that it appears in the header instead of in a sideblock column, where it belongs. For some layouts (VikingNet is a good example), this really works. So, I thought it might be helpful to others if explain how I did it.
Disclaimer: This is a hack and you will be pulling the login block out of a table. For this reason, expect to do some troubleshooting in different browsers. Don’t say that you weren’t warned!
Oh, and I would backup just to be safe.
I basically just set the login block to an absolute position like this:
.block_login {
position: absolute; /* most important value */
top: XXpx;
right: XXpx;
width: XXXpx;
height: XXXpx;
}
Of course, the X values above can be set to anything you like. Now, once you have your block up there, what do you do with it? You have backgrounds, font-colors, etc. yet to deal with to deal with.
I would recommend hiding the collapse button:
.block_login img.hide-show-image {
display:none;
}
Then get rid of any background colors you may be using in your sideblocks:
.block_login .header,
.block_login .content {
background:none !important; /* if you want, you can set a color or image here */
font-size:0.9em; /* just because I liked it like that */
}
Assuming the “Login” title color needs to be changed:
.block_login .header h2 {
color: #yourhex;
}
If you would like your login menu to appear inline (as in Serenity), as opposed to the standard username above password layout:
.block_login .loginform .c1 {
text-align:left; /* Standard sheet has it set to center */
margin:0;
float: left; /* this is the important one */
padding:0 5px; /* this separates them; values arbitrary */
font-size: 0.8em; /* I would stick with same value used elsewhere */
color:#yourhex;
}
And, then of course there is the footer (lost password link, new account link) to take care of:
.block_login .footer div {
font-size:0.8em; /* again, your preference */
float: left; /* to get them right next to each other */
padding: XXpx /* can be set to any value to separate divs */
}
.block_login .footer a {
color: #yourhex;
}
And, that should take care of it. Manipulate a few variables here and there until you get the look you desire.
I’ve just completed the layout and three color schemes for what will become NewSchool Learning’s first Premium Theme. I’m calling this theme “Solstice” because the first color scheme I came up with reminded me of the change from spring to summer (clever, I know).
As of yet, Solstice is only an idea - the image in this post is a Fireworks PNG mockup. If Moodle gives me trouble beyond what I think its capable of, some of the round corners may have to go. But, if everything goes as planned, it should work!
For those interested, Solstice should be available in about one week (two weeks tops
). At that time, I will also be releasing my second free theme to the Moodle community - Serenity.
Oh, if you have any suggestions/requests for additional color schemes, let me know soon.
Here is a really good example of what can be done with an existing theme. For this client, I stripped down the colors and background gradients from the Autumn theme and replaced them with images matching their company website and logos. The result is a very clean, bright theme branded for their specific purpose.
Let’s take a minute to highlight a few of the changes that have occurred on NewSchool Learning over the past week:
- If you look to the top of this page, you’ll see that I’ve added a “Support” link to help with any problems you may encounter with any of my work (free or otherwise). This support is currently powered by a bare-bones bbPress installation. This may change in the relative future; it may not! We’ll see how this experiment goes.
- At the top of each post, you will see star ratings. Please help me out by rating my themes, etc. No login is required in order to rate posts, and a little feedback goes a long way!
- Please continue to provide feedback (good or bad) on my themes using each post’s comment area.
- If you are into the social bookmarking thing, I have added Alex King’s “Share This” link to the bottom of individual posts.
Please contact me if you have any questions.
Edit: Due to some 30 errors associated with the ratings plugin I was using, I have turned it off! Please continue providing feedback in the comments and forums.
I spent a couple hours this week updating my free Autumn theme for Moodle. Here is a list of changes:
Autumn CSS has been completely rewritten on top of the Standard theme. This means that your Moodle installation will load Autumn in addition to the Standard theme, rather than in place of it. This should ensure relative stability in spite of future Moodle upgrades. You can read about why this is a good idea here.
Gradients were reworked to look nicer.
- Additionally, a variety of small layout issues from my first release have been resolved.
To view a demo of this theme, visit http://newschoollearning.com/moodle.
It is recommended that anyone using the Autumn theme (regardless of which version of Moodle you are using) upgrade to Autumn 1.8. It should be backwards compatible with 1.7 (of course, always backup your theme directory before uploading).
This theme is free, and you can do with it what you like. However, be nice and continue to give credit where credit is due by keeping a link back to this site somewhere on your page.
Enjoy.
Downloads can be found here