{"id":462,"date":"2011-01-24T13:15:56","date_gmt":"2011-01-24T13:15:56","guid":{"rendered":"http:\/\/blogs.sussex.ac.uk\/elearningteam\/?p=462"},"modified":"2011-01-28T10:59:48","modified_gmt":"2011-01-28T10:59:48","slug":"things-we-love-about-moodle2-pt2-experimenting-with-themes","status":"publish","type":"post","link":"https:\/\/blogs.sussex.ac.uk\/elearningteam\/2011\/01\/24\/things-we-love-about-moodle2-pt2-experimenting-with-themes\/","title":{"rendered":"Things we love about moodle2 pt2 &#8211; experimenting with themes"},"content":{"rendered":"<p>One of the changes in moodle2 has been in the\u00a0implementation\u00a0of themes.<\/p>\n<p>We already talked in a <a href=\"http:\/\/blogs.sussex.ac.uk\/elearningteam\/2011\/01\/20\/things-we-love-about-moodle2-pt1-minify-gzip-excude\/\" target=\"_self\">previous blogpost <\/a>about the ability in moodle2 themes to include and exclude css &amp; javascript from a themes parent. We appreciate this\u00a0inheritance\u00a0model which makes it simpler to have a base css, and vastly change the\u00a0appearance\u00a0of your whole site with \u00a0relatively\u00a0few, clear lines of css.<\/p>\n<p>It took us about 5mins to\u00a0implement\u00a0a &#8216;nude&#8217; Sussex\u00a0style-sheet\u00a0in moodle2.<\/p>\n<h2>The process<\/h2>\n<p>Following the <a href=\"http:\/\/docs.moodle.org\/en\/Development:Themes_2.0\" target=\"_blank\">guidlines for moodle2 themes<\/a> we created a sussex theme folder, edited the config file, imported the layout files from base, and set our parent theme to base.<\/p>\n<p>Like many of the themes already created we included <a href=\"http:\/\/paulirish.com\/\" target=\"_blank\">Paul Irish<\/a>&#8216;s <a title=\"html5boilerplate\" href=\"http:\/\/html5boilerplate.com\/\" target=\"_blank\">html5boilerplate<\/a> css &#8211; which includes <a href=\"http:\/\/meyerweb.com\/\" target=\"_blank\">Eric Meyer<\/a>&#8216;s reset realoded and a gives us a nice basic usability baseline.<\/p>\n<p>In the sussex theme folder we created 2 stylesheets &#8211; layout and text.<\/p>\n<p><code><br \/>\n\/*LAYOUT CSS *\/<br \/>\nhtml,body {<br \/>\nbackground-color:#E1E8EB;<br \/>\n}<br \/>\n#page-wrapper {<br \/>\nwidth:990px;<br \/>\nbackground-color:white;<br \/>\n-moz-border-radius: 1em;<br \/>\nborder-radius: 1em;<br \/>\nmargin:1em auto;<br \/>\npadding:1em;<br \/>\n}<br \/>\n<\/code><\/p>\n<p><code><br \/>\n\/* TEXT CSS *\/<br \/>\nhtml, body, select, input, textarea {<br \/>\nfont-family: Geneva,Verdana,Tahoma,sans-serif;<br \/>\ncolor:#555555;<br \/>\n}<br \/>\nbody, div, span, blockquote, p, li, pre,<br \/>\nabbr, address, cite, code,<br \/>\nfieldset, form, label, legend,<br \/>\ntable, caption, tbody, tfoot, thead, tr, th, td,<br \/>\narticle, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary,time, mark, audio, video  {<br \/>\nfont-size:14px;<br \/>\nline-height:1.5em;<br \/>\n}<br \/>\nh1,h2,h3,h4,h5,h6 {<br \/>\nfont-family:Georgia,serif;<br \/>\nfont-weight:400;<br \/>\n}<br \/>\n\/*LINKS *\/<br \/>\na, a:link, a:visited {<br \/>\ncolor: #11718F;<br \/>\ntext-decoration: none;<br \/>\n}<br \/>\na:hover {<br \/>\ncolor:#224857;<br \/>\ntext-decoration:underline;<br \/>\n}<br \/>\n<\/code><\/p>\n<p>Here a screenshot of the results :<\/p>\n<p><a href=\"http:\/\/blogs.sussex.ac.uk\/elearningteam\/files\/2011\/01\/Picture-12.png\"><img loading=\"lazy\" class=\"size-large wp-image-464\" title=\"moodle2 sussex style 1\" src=\"http:\/\/blogs.sussex.ac.uk\/elearningteam\/files\/2011\/01\/Picture-12-600x309.png\" alt=\"\" width=\"600\" height=\"309\" srcset=\"https:\/\/blogs.sussex.ac.uk\/elearningteam\/files\/2011\/01\/Picture-12-600x309.png 600w, https:\/\/blogs.sussex.ac.uk\/elearningteam\/files\/2011\/01\/Picture-12-300x154.png 300w, https:\/\/blogs.sussex.ac.uk\/elearningteam\/files\/2011\/01\/Picture-12.png 1056w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>As you can see, it&#8217;s a ridiculously small amount of css to produce something remarkably similar to our current moodle style (which uses far more css).<\/p>\n<h2>Bonus fun<\/h2>\n<p>Again, limited CSS for a SWISS style ultra thin Helvetica theme, with bold underlines and lots of white space :<br \/>\n<a href=\"http:\/\/blogs.sussex.ac.uk\/elearningteam\/files\/2011\/01\/Picture-17.png\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-472\" title=\"swiss moodle\" src=\"http:\/\/blogs.sussex.ac.uk\/elearningteam\/files\/2011\/01\/Picture-17-600x336.png\" alt=\"\" width=\"600\" height=\"336\" srcset=\"https:\/\/blogs.sussex.ac.uk\/elearningteam\/files\/2011\/01\/Picture-17-600x336.png 600w, https:\/\/blogs.sussex.ac.uk\/elearningteam\/files\/2011\/01\/Picture-17-300x168.png 300w, https:\/\/blogs.sussex.ac.uk\/elearningteam\/files\/2011\/01\/Picture-17.png 1007w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>Using a almost the same CSS to try a quick <a href=\"http:\/\/en.wikipedia.org\/wiki\/Eric_Gill\" target=\"_blank\">Eric Gill<\/a> &#8216;nude&#8217; theme using Gill Sans and Perpetua :<\/p>\n<p><a href=\"http:\/\/blogs.sussex.ac.uk\/elearningteam\/files\/2011\/01\/Picture-18.png\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-475\" title=\"eric\" src=\"http:\/\/blogs.sussex.ac.uk\/elearningteam\/files\/2011\/01\/Picture-18-600x409.png\" alt=\"\" width=\"600\" height=\"409\" srcset=\"https:\/\/blogs.sussex.ac.uk\/elearningteam\/files\/2011\/01\/Picture-18-600x409.png 600w, https:\/\/blogs.sussex.ac.uk\/elearningteam\/files\/2011\/01\/Picture-18-300x204.png 300w, https:\/\/blogs.sussex.ac.uk\/elearningteam\/files\/2011\/01\/Picture-18.png 1018w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>Obviously, the sussex style sheet isn&#8217;t yet complete &#8211; but from an initial perspective moodle2&#8217;s new ways of creating themes seem a big win.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the changes in moodle2 has been in the\u00a0implementation\u00a0of themes. We already talked in a previous blogpost about the ability in moodle2 themes to include and exclude css &amp; javascript from a themes parent. We appreciate this\u00a0inheritance\u00a0model which makes it simpler to have a base css, and vastly change the\u00a0appearance\u00a0of your whole site with [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[72,67,73],"tags":[76,77],"_links":{"self":[{"href":"https:\/\/blogs.sussex.ac.uk\/elearningteam\/wp-json\/wp\/v2\/posts\/462"}],"collection":[{"href":"https:\/\/blogs.sussex.ac.uk\/elearningteam\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.sussex.ac.uk\/elearningteam\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.sussex.ac.uk\/elearningteam\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.sussex.ac.uk\/elearningteam\/wp-json\/wp\/v2\/comments?post=462"}],"version-history":[{"count":16,"href":"https:\/\/blogs.sussex.ac.uk\/elearningteam\/wp-json\/wp\/v2\/posts\/462\/revisions"}],"predecessor-version":[{"id":524,"href":"https:\/\/blogs.sussex.ac.uk\/elearningteam\/wp-json\/wp\/v2\/posts\/462\/revisions\/524"}],"wp:attachment":[{"href":"https:\/\/blogs.sussex.ac.uk\/elearningteam\/wp-json\/wp\/v2\/media?parent=462"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.sussex.ac.uk\/elearningteam\/wp-json\/wp\/v2\/categories?post=462"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.sussex.ac.uk\/elearningteam\/wp-json\/wp\/v2\/tags?post=462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}