A small snippet of code which totally transforms the aesthetics of the EU cookies notification bar. Relocating the notification to the bottom of the screen and co-ordinating the colours with those of your blog's pallet gives it more of a professional feel!
That afternoon I sat reading the advice alongside the associated links and, to be honest, I hadn't a clue how to go about implementing one on my home page. I had already included such information in my disclaimer page, but that, according to the memo wasn't prominent enough. As Only Crumbs Remain was still very much a fledgling being only a couple of months old, I actually briefly flirted with the idea of closing down my site! Yes, I know! I bet I wasn't the only person either to be daunted by this piece of officialdom! I didn't want to be breaking any of the laws which the clever people in the EU had made! The following morning after receiving that memo, I was immensely relieved and pleased to see that Google had kindly placed their own EU notification banner onto my BlogSpot site! Phew! But....
....the notification banner was chunky, ugly and hid a large portion of my own site's banner. Yes, OK, I wasn't sure how to go about placing one on my site myself, and I was grateful that Google had done the technical work for me, but I didn't want it to detract from the look and feel of my site.
|Image courtesy of Pixabay|
I'm certainly not a tech-head and wouldn't have a clue how to go about writing code, but although I clearly wanted to comply with the ruling I also wanted to make the notification more aesthetically pleasing. After a little searching on the net I came across My Blogger Tricks which provided a great easy to follow tutorial for customising the banner. I'm not going to recreate it here, because it's not my code, so just follow the link above for the details. Basically, this is a one piece snippet of code which is pasted just below the tag ]]></b:skin> in your template and allows you to:
- change the actual wording of the notification;
- change the names of the buttons;
- change the colour of the background, buttons, and font;
- allows you to choose where to direct the reader should they click on the 'learn more' button (ie to Google's own cookies notification or to your blog's own policy);
- relocate the notification to the bottom of the screen making the banner less intrusive (this code amendment can be found in comment number 11 as a response from the author to a query).
I'm sure you'll agree that, after comparing the before and after screen-shots of Only Crumbs Remain's homepage, the required notification banner is far more aesthetically pleasing having been relocated and modified from the bulky, dull, intrusive feel of the default notice.
So, go on, personalise that bland EU cookies notification banner which Google provided, it's so easy and only takes a few minutes!