Frontpage main block in the middle

Frontpage main block in the middle

av Gibson Wilson -
Antal svar: 14

hi

i would like to know how to add a block to the main centre area of the front page. this will display some images and text.

many thanks

gibby

Genomsnitt av betyg: -
Som svar till Gibson Wilson

Re: Frontpage main block in the middle

av A. T. Wyatt -
Greetings, Gibby!
If you log in as admin and look under "front page", "front page settings", you should find a small checkbox to include a topic section. That will give you the space that you describe.

atw
Som svar till A. T. Wyatt

Re: Frontpage main block in the middle

av Gibson Wilson -

Great I can now add topics I think as a forum posting..

I would like to know how to add a new "block" to the centre of the page that will display just some text and images...Like an introduction and a company logo..

Have I missed something simple before..

Many thanks in advance

Gibby

Som svar till Gibson Wilson

Re: Frontpage main block in the middle

av Gibson Wilson -

sorry i am not being too clear...

i mean like the moodle home page with the welcome to moodle block and moodle community block etc.....

these are what I want

many thank, gibby

Som svar till Gibson Wilson

Re: Frontpage main block in the middle

av A. T. Wyatt -
That is a topic section with some special styles applied!

Look for instructions here:
http://docs.moodle.org/en/Homepage_design

atw

Som svar till A. T. Wyatt

Re: Frontpage main block in the middle

av Gibson Wilson -

Hi atw (i guess you will answer as you have helped so much up to now leende )

I have read the link and I would have to agree it may seem simple but I just don't understand "where" to put that code...

Any simple instructions would be appreciated

All the best, Gibby

Som svar till Gibson Wilson

Re: Frontpage main block in the middle

av Mauno Korpelainen -

Hi Gib,

In editor press button <> and paste (upper) code there. Save.

Css tags (lower) go to some of your theme css files (for example styles_layout.css or fw_layout.css in your theme folder)

Som svar till Mauno Korpelainen

Re: Frontpage main block in the middle

av Gibson Wilson -

Hi thanks for jumping in and helping...maybe I should have said at the start that moving around files and cutting and pasting is no trouble but where do I do it..?

"In editor press button <> and paste (upper) code there. Save."

Where do I do this..which file and where..sorry to be a pain

Gibby - Thanks in advance

Som svar till Gibson Wilson

Re: Frontpage main block in the middle

av A. T. Wyatt -
Hmm, well I think I might add a little to the docs.

There are two steps to making this happen:
1) FIRST step is to add the styles to your site stylesheet. There is a file called styles_fonts.css in moodle/theme/standard. (I am assuming that you are using the standard themes; if not, you may need to experiment to find the file that is controlling the styles on your site.)

.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;
}


If you open that in an editor and paste in the rules, you can save the file and go to part 2.

2. SECOND step is to add the code to your front page. If you have enabled the topic section, you can add a label. When you add the label, look on the toolbar of the html editor. There is a tool close to the right end on the second row of tools that looks like this <>. This is the html editor, which lets you actually work with the code. That is where you should paste the following:

<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>
At that point, you should be able to click the code button again and return to the normal window to edit both the titles and the text to suit yourself.

Remember, it only works because the headings are designated "heading 1" and the <div> tags wrap each paragraph of the text. If you delete any of the tags that control the formatting, your page will not be rendered properly. Also realize that when you edit the text, it will just be plain text. You won't see the nice borders and such until you save the changes.

If this doesn't make any sense to you, you might need to talk to someone who has a bit more experience with css. It isn't that hard, unless you have never done it before! smile

atw
Som svar till A. T. Wyatt

Re: Frontpage main block in the middle

av Ben Christopher -

i'd like to second the fact that this is an excellent explanation. Thank you

one thing - which part of the css do i change in order to get the title "welcome to moodle" in the new label to match that of my other existing blocks. I am using formal_white

thank again

ben 

Bilaga Untitled-1.gif
Som svar till Ben Christopher

Re: Frontpage main block in the middle

av A. T. Wyatt -
I don't think there is an easy answer to that. Those block headings are controlled by the formal white theme, and they have an image as a background.

If you are using firefox, install the web developer plugin. You can have it show you the names of the styles attached to every element on the screen. It is most helpful when digging through the stylesheets to change various things.

You might post your question in the themes forum. There are some very knowledgeable folks over there.

atw
Som svar till A. T. Wyatt

Re: Frontpage main block in the middle

av oscar menjivar -
thanks for the explanation. I was able to set up the label in the center page. However i have noticed that some moodle sites have a second block in the middle of the front page. How can i add a second block or Title to the second page?

block2Doc?id=dn3ngjh_158fzcvr2d7
Bilaga block2.png
Som svar till Gibson Wilson

Re: Frontpage main block in the middle

av A. T. Wyatt -
Aha, you have an answer from the MASTER (Mauno!) smile

atw
Som svar till A. T. Wyatt

Re: Frontpage main block in the middle

av Gibson Wilson -

Great  atw

thanks thanks thanks

your instructions were simple and spot on.....

I am a very happy man...

Thanks again

Gibby