Diferencia entre revisiones de «Logotipo de la cabecera»

De MoodleDocs
Sin resumen de edición
 
(Copiado de Docs en)
Línea 1: Línea 1:
{{FAQ de temas}}
{{FAQ de temas}}
{{Pendiente de traducir}}
{{Pendiente de traducir}}
To show your '''logo in the page header''', the file ''header.html'' in your theme folder requires editing.
In the file ''header.html'' you see the following lines (or similar):
<pre>
01: <?php if ($home) { 
02: // This is what gets printed on the home page only 
03: ?>
04:  <div id="header-home">
05:    <div class="headermain"><?php echo $heading ?></div>
06:    <div class="headermenu"><?php echo $menu ?></div>
07:  </div>
08: <?php } else if ($heading) { 
09: // This is what gets printed on any other page with a heading
10: ?>
11:  <div id="header">
12:    <div class="headermain"><?php echo $heading ?></div>
13:    <div class="headermenu"><?php echo $menu ?></div>
14:  </div>
15: <?php } ?>
</pre>
The following code example shows a part from a header file with a logo. Please replace lines 5 and 12 above with lines 5 and 12 from the code example below.
<pre>
01: <?php if ($home) { 
02: // This is what gets printed on the home page only 
03: ?>
04:  <div id="header-home">
05:    <div class="headermain"><img src="<?php echo
        $CFG->wwwroot.'/theme/'.current_theme() ?>/pix/big_logo.gif" width="300"
        height="100" alt="mycompany" title="mycompany" id="logo" /></div>
06:    <div class="headermenu"><?php echo $menu ?></div>
07:  </div>
08: <?php } else if ($heading) { 
09: // This is what gets printed on any other page with a heading
10: ?>
11:  <div id="header">
12:    <div class="headermain"><img src="<?php echo
        $CFG->wwwroot.'/theme/'.current_theme() ?>/pix/small_logo.gif" width="210"
        height="70" alt="mycompany" title="mycompany" id="logo" /></div>
13:    <div class="headermenu"><?php echo $menu ?></div>
14:  </div>
15: <?php } ?>
</pre>
Moodle offers one header for all pages and a different header for the front/home page. You may, for example, make the header for your front page higher and place a bigger logo on it.
The logo position in the page header is defined in the CSS file ''styles_layout.css''. Please change the values for the CLASS <code>.headermain</code> and eventually for the IDs <code>#header</code> and <code>#header-home</code> if needed. You can find the definitions in the section header of the CSS file.
'''A tip for a fast jump to the header section of the CSS file:''' Select and copy the word "header" in the section list at the beginning of the file. Then call find in your program and paste "header" into the search dialogue. After you click "find" in your dialogue your program will find the start of the header section.





Revisión del 06:12 10 abr 2006

Nota: Pendiente de Traducir. ¡Anímese a traducir esta página!.     ( y otras páginas pendientes)


To show your logo in the page header, the file header.html in your theme folder requires editing.

In the file header.html you see the following lines (or similar):

01: <?php if ($home) {  
02: // This is what gets printed on the home page only  
03: ?>
04:   <div id="header-home">
05:     <div class="headermain"><?php echo $heading ?></div>
06:     <div class="headermenu"><?php echo $menu ?></div>
07:   </div>
08: <?php } else if ($heading) {  
09: // This is what gets printed on any other page with a heading 
10: ?>
11:   <div id="header">
12:     <div class="headermain"><?php echo $heading ?></div>
13:     <div class="headermenu"><?php echo $menu ?></div>
14:   </div>
15: <?php } ?>

The following code example shows a part from a header file with a logo. Please replace lines 5 and 12 above with lines 5 and 12 from the code example below.

01: <?php if ($home) {  
02: // This is what gets printed on the home page only  
03: ?>
04:   <div id="header-home">
05:     <div class="headermain"><img src="<?php echo 
        $CFG->wwwroot.'/theme/'.current_theme() ?>/pix/big_logo.gif" width="300" 
        height="100" alt="mycompany" title="mycompany" id="logo" /></div>
06:     <div class="headermenu"><?php echo $menu ?></div>
07:   </div>
08: <?php } else if ($heading) {  
09: // This is what gets printed on any other page with a heading 
10: ?>
11:   <div id="header">
12:     <div class="headermain"><img src="<?php echo
        $CFG->wwwroot.'/theme/'.current_theme() ?>/pix/small_logo.gif" width="210" 
        height="70" alt="mycompany" title="mycompany" id="logo" /></div>
13:     <div class="headermenu"><?php echo $menu ?></div>
14:   </div>
15: <?php } ?>

Moodle offers one header for all pages and a different header for the front/home page. You may, for example, make the header for your front page higher and place a bigger logo on it.

The logo position in the page header is defined in the CSS file styles_layout.css. Please change the values for the CLASS .headermain and eventually for the IDs #header and #header-home if needed. You can find the definitions in the section header of the CSS file.

A tip for a fast jump to the header section of the CSS file: Select and copy the word "header" in the section list at the beginning of the file. Then call find in your program and paste "header" into the search dialogue. After you click "find" in your dialogue your program will find the start of the header section.