Need to access my front page through html

Need to access my front page through html

by Dave Johnson -
Number of replies: 6

Is it possible to access the html source for the main page? I would like to change the font style and color in some of the sub headings. I have tried to make these changes by accessing through the "theme CSS" option. Also, I have made changes through accessing "Language" option. None of these seem to affect the sub headings on the main page. Again, is it possible to access directly to the html on the front page? Thanks.

Average of ratings: -
In reply to Dave Johnson

Re: Need to access my front page through html

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

When you say "sub headings on the main page" which do you exactly mean? Are you able to post a screenshot of what you want to change?

In reply to Mary Cooch

Re: Need to access my front page through html

by Dave Johnson -

Hi Mary,

You will notice that the text in the blocks are black. I wish to change them to dark blue. Can I access html directly so that I may insert code? I do not have access to cPanel or another hosting platform. Thanks.

Attachment Assess MyClass (1).png
In reply to Dave Johnson

Re: Need to access my front page through html

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hi there.  I don't think you can do this without changing the files on the server - I know there is a place in the Themes folder where you can add custom CSS but I don't know if that will work for you (I am not a coder)so I am going to move your question to the Themes forum to see if they can offer any more productive help.

In reply to Mary Cooch

Re: Need to access my front page through html

by Dave Johnson -

Mary,

Thanks; I did try via the custom CSS and this transformed the color of the font for everything except the block text?!? I appreciate your assistance in sending my question on to themes...

In reply to Dave Johnson

Re: Need to access my front page through html

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Dave,

You will be able to do this through customcss - its just a matter of using the correct css selector and in this case it would appear that your theme (you don't say which one) has set a font colour for the blocks which overrides the main body/html font colour.

In this case firebug (or Chrome developer tools) is your friend to identify the correct css to change, but its likely to be (change the red for whatever colour you need)

.block .content {color: red;}

Richard

In reply to Richard Oelmann

Re: Need to access my front page through html

by Christian Herman -

To address your original question, Dave, no you can't access the HTML directly; it doesn't exist until the page is generated by the PHP script.

Looks like you may be using Formal White (or Bootstrap Clean...they look similar to me).  You'll probably need several rules to change all the colors.  For example, to change all the links (and subheadings...which are links) in the Navigation block (in Formal White, at least), I need this rule:

.block_navigation .block_tree .tree_item a:link,
.block_navigation .block_tree .tree_item a:visited,
.block_navigation .block_tree .tree_item a:active {
color: red;
}

As Richard suggested, you'll just need to examine the output HTML & styles for the right classes.  To get here I used IE's developer panel to locate the active rule with color styles and used the same classes for my own CSS rule, and triplicated it to cover all 3 link types.