Note: You are currently viewing documentation for Moodle 2.3. Up-to-date documentation for the latest stable version is available here: Homepage design.

Homepage design: Difference between revisions

From MoodleDocs
m (Reverted edit of Krishnabhatt, changed back to last version by Tsala)
No edit summary
Line 3: Line 3:
The [http://moodle.org moodle.org] theme is not included in the standard Moodle download, however theme designers are welcome to take ideas from its homepage design.
The [http://moodle.org moodle.org] theme is not included in the standard Moodle download, however theme designers are welcome to take ideas from its homepage design.


The centre sections are created using fieldset and legend elements within a single html block.
The centre sections are created using H1 and P tags (defined in your css file). The code should be placed in the single html block that is formed when you switch the setting for "Include a topic section" to 'yes' in your Admin Site Setting (yourmoodle/admin/site.php)
 
<pre>
<pre>
<fieldset>
<div class="frontblock">
  <legend>Welcome to Moodle!</legend>
<h1 class="frontblock fronthead p1">Welcome to Moodle!</h1>
  <p>text ...</p>
<p class="fronttext p1">
</fieldset>
text...
<fieldset>
</p>
  <legend>Moodle Community</legend>
</div>
  <p>text ...</p>
 
</fieldset>
<div class="frontblock">
<fieldset>
<h1 class="frontblock fronthead p2">Moodle Community</h1>
  <legend>Moodle Development</legend>
<p class="fronttext p2">
  <p>text ...</p>
text...
</fieldset>
</p>
<fieldset>
</div>
  <legend>Moodle Downloads</legend>
 
  <p>text ...</p>
<div class="frontblock">
</fieldset>
<h1 class="frontblock fronthead p3"><span class="nolink">Moodle Development</span></h1>
<p class="fronttext p3">
text...
</p>
</div>
 
<div class="frontblock">
<h1 class="frontblock fronthead p4"><span class="nolink">Moodle Downloads</span></h1>
<p class="fronttext p4">
text...
</p>
</div>
</pre>
</pre>


The fieldset and legend elements are then styled to match the blocks.
The H1 and P tags are then styled to match the blocks.


<pre>
<pre>
fieldset {
.fronthead {
   margin-bottom: 20px;
  font-size:1.3em;
  letter-spacing:0.04em;
}
 
.fronttext {
  margin-top:5px;
  margin-left:20px;
  margin-right:10px;
   margin-bottom:20px;
}
 
div.frontblock {
  margin-top: 12px;
  margin-bottom: 25px;
   border: #DDD solid 1px;
   border: #DDD solid 1px;
   -moz-border-radius-bottomleft:20px;
   -moz-border-radius-bottomleft: 20px;
   -moz-border-radius-bottomright:20px;
   -moz-border-radius-bottomright: 20px;
   font-size: 0.95em;
   font-size: 0.95em;
}
}


legend {
h1.frontblock {
   border: #DDD solid 1px;
   border: #DDD solid 1px;
   background-image:url(gradient.jpg);   
   background-image: url(gradient.jpg);   
   background-position:top;   
   background-position: top;   
   background-repeat:repeat-x;   
   background-repeat: repeat-x;   
   padding: 1px 10px;
   padding: 1px 10px;
  display: inline;
  position: relative;
  top: -0.5em;
  left: 8px;
  font-weight: normal;
}
p.fronttext.p1 {
  min-height: 90px;
}
p.fronttext.p2 {
  min-height: 90px;
}
p.fronttext.p3 {
  min-height: 125px;
}
p.fronttext.p4 {
  min-height: 105px;
}
}</pre>
}</pre>



Revision as of 19:37, 10 August 2006

The moodle.org theme is not included in the standard Moodle download, however theme designers are welcome to take ideas from its homepage design.

The centre sections are created using H1 and P tags (defined in your css file). The code should be placed in the single html block that is formed when you switch the setting for "Include a topic section" to 'yes' in your Admin Site Setting (yourmoodle/admin/site.php)

<div class="frontblock">
<h1 class="frontblock fronthead p1">Welcome to Moodle!</h1>
<p class="fronttext p1">
text...
</p>
</div>

<div class="frontblock">
<h1 class="frontblock fronthead p2">Moodle Community</h1>
<p class="fronttext p2">
text...
</p>
</div>

<div class="frontblock">
<h1 class="frontblock fronthead p3"><span class="nolink">Moodle Development</span></h1>
<p class="fronttext p3">
text...
</p>
</div>

<div class="frontblock">
<h1 class="frontblock fronthead p4"><span class="nolink">Moodle Downloads</span></h1>
<p class="fronttext p4">
text...
</p>
</div>

The H1 and P tags are then styled to match the blocks.

.fronthead {
  font-size:1.3em;
  letter-spacing:0.04em;
}

.fronttext {
  margin-top:5px;
  margin-left:20px;
  margin-right:10px;
  margin-bottom:20px;
}

div.frontblock {
  margin-top: 12px;
  margin-bottom: 25px;
  border: #DDD solid 1px;
  -moz-border-radius-bottomleft: 20px;
  -moz-border-radius-bottomright: 20px;
  font-size: 0.95em;
}

h1.frontblock {
  border: #DDD solid 1px;
  background-image: url(gradient.jpg);  
  background-position: top;  
  background-repeat: repeat-x;  
  padding: 1px 10px;
  display: inline;
  position: relative;
  top: -0.5em;
  left: 8px;
  font-weight: normal;
}

p.fronttext.p1 {
  min-height: 90px;
}
p.fronttext.p2 {
  min-height: 90px;
}
p.fronttext.p3 {
  min-height: 125px;
}
p.fronttext.p4 {
  min-height: 105px;
}
}

External links