[THEME]log

Post Reply
sylvian
Ssr. Bludit
Posts: 22
Joined: Tue Mar 14, 2017 7:27 pm

Hi

In the theme log, I tried for a moment inserting a background picture in the header right part as mentioned under (only in the user mode).


Image
I think there's something to find thanks to this code in the php file but i don't know css quite well for the moment.
<header id="header">

</nav>
<nav class="main">
<ul>
<li class="menu"><a class="fa-bars" href="#menu">Menu</a></li>
</ul>
</nav>
</header>

Thanks for help!
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Yo can modify the template file index.php to something like this (line 57):

Code: Select all

<!-- Main -->

    <div id="main">

        <div class="header-image">
            <img src="http://mydomain.com/bl-content/uploads/myimage.jpeg">
        </div>

        <?php
            if( ($Url->whereAmI()=='home') || ($Url->whereAmI()=='tag') || ($Url->whereAmI()=='blog') ) {
                include(THEME_DIR_PHP.'home.php');
            }

            ...
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
sylvian
Ssr. Bludit
Posts: 22
Joined: Tue Mar 14, 2017 7:27 pm

Thanks for the answer. :D

I've done it but not in the main section this way

Code: Select all

<header id="header">
			<h1><a href="<?php echo $Site->url() ?>"><?php echo $Site->title() ?></a></h1>
			<nav class="links">
				<ul>
				<?php
					foreach($parents as $page) {
						echo '<li><a href="'.$page->permalink().'">'.$page->title().'</a></li>';
					}
				?>
				</ul>
			</nav>
			<!--INSERTION D UN BANDEAU ->
			<div class="header-image">
				<img src="http://wholeworldbet.com/bl-content/uploads/HEADER.png" height="54" width="980">
			</div>
			<!--#FIN INSERTION D UN BANDEAU-->
			<nav class="main">
				<ul>
					<li class="menu"><a class="fa-bars" href="#menu">Menu</a></li>
				</ul>
			</nav>
		</header>
Last edited by sylvian on Wed Mar 22, 2017 7:43 am, edited 1 time in total.
sylvian
Ssr. Bludit
Posts: 22
Joined: Tue Mar 14, 2017 7:27 pm

Now I want to add an image behind the left header. I tried the div instructions above but the image is placed before the title...

Any idea? Or in other terms, is it possible to superpose an image with an echo in php...

Image
sylvian
Ssr. Bludit
Posts: 22
Joined: Tue Mar 14, 2017 7:27 pm

I am successful. :D
In theme log file bludit, i've put

Code: Select all

#header h1 {
    background-image : url(../../img/groslogo.png);
    background-repeat: no-repeat;
    background-position: 80px 2px;
	font-size: 1.4em;
	font-weight: lighter;
}
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Nice, now I understand what you want to do. :D
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
Post Reply