[SOLVED] individual adjustment of the menu

slart

Joined: 2013-11-11
Posts: 112
Posted: Wed, 2014-06-25 12:38

Hello, I have a question for individual adjustment of the menu.
In the upper menu always the title of the main albums, sub-albums and the photo title will appear.

home >> summer >> august >> flowers in the sun

Where and how can I delete the photo titles (flowers in the sun) from this menu, only in this menu, not in the sidebar (or database)? And how can I change the font size of the other menu text? The aim is only the font size of the menu, regardless of the rest of the text in the Gallery, be changed. Is this, or to realize one of them? Maybe it would be enough for me if I knew where these parameters are available in the PHP files. I have search and not found it.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2014-06-25 15:29

That is the breadcrumb.
I think this has been asked before so a search of breadcrumb will yield better results.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
slart

Joined: 2013-11-11
Posts: 112
Posted: Wed, 2014-06-25 16:57

Hi Dave, thanks.
I have found breadcrumbs in
themes/clean_canvas/views/page.html.php

Quote:
<? if (!empty($breadcrumbs)): ?>
<ul class="g-breadcrumbs">
<? foreach ($breadcrumbs as $breadcrumb): ?>
<li class="<?= $breadcrumb->last ? "g-active" : "" ?>
<?= $breadcrumb->first ? "g-first" : "" ?>">
<? if (!$breadcrumb->last): ?> <a href="<?= $breadcrumb->url ?>"><? endif ?>
<?= html::purify(text::limit_chars($breadcrumb->title, module::get_var("gallery", "visible_title_length"))) ?>
<? if (!$breadcrumb->last): ?></a><? endif ?>
</li>
<? endforeach ?>
</ul>
<? endif ?>

and in
modules/gallery/libraries/Breadcrumb.php

Quote:
class Breadcrumb_Core {
public $title;
public $url;
public $first;
public $last;

static function instance($title, $url) {
return new Breadcrumb($title, $url);
}

public function __construct($title, $url) {
$this->title = $title;
$this->url = $url;
$this->first = false;
$this->last = false;
}

/**
* Return an array of Breadcrumb instances build from the parents of a given item.
* The first and last Breadcrumb instances will be marked first/last as appropriate.
* Each breadcrumb will have a ?show= query parameter that refers to the id of the next
* item in line.
*
* @return array Breadcrumb instances
*/
static function array_from_item_parents($item) {
if ($item->id == item::root()->id) {
return array();
}

$bc = array_merge($item->parents()->as_array(), array($item));
for ($i = 0; $i < count($bc) - 1; $i++) {
$bc[$i] = new Breadcrumb($bc[$i]->title, $bc[$i]->url("show={$bc[$i+1]->id}"));
}
$bc[$i] = new Breadcrumb($item->title, $item->url());

$bc[0]->set_first();
end($bc)->set_last();
return $bc;
}

public function set_first() {
$this->first = true;
return $this;
}

public function set_last() {
$this->last = true;
return $this;
}
}

and i have no idea for adjustment. Thats to much PHP for me.

It appears to be a loop, all outputs title and title parents at one time. It is well not to separate. Either all or none.
Is that correct, or is there still a possibility?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2014-06-26 00:45
Quote:
there still a possibility?

yes,
Not tested but try:

<? if (!empty($breadcrumbs)): ?>
<ul class="g-breadcrumbs">
<? foreach ($breadcrumbs as $breadcrumb): ?>
<li class="<?= $breadcrumb->last ? "g-active" : "" ?>
<?= $breadcrumb->first ? "g-first" : "" ?>">
<? if (!$breadcrumb->last): ?> <a href="<?= $breadcrumb->url ?>">
<?= html::purify(text::limit_chars($breadcrumb->title, module::get_var("gallery", "visible_title_length"))) ?>
</a><? endif ?>
</li>
<? endforeach ?>
</ul>
<? endif ?>

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
slart

Joined: 2013-11-11
Posts: 112
Posted: Thu, 2014-06-26 07:02

Thanks, that's a first approach. The last title is now gone. I had already tested, but had an error because I had not deleted the one endif.
Now the last >> has slipped slightly upwards. This should also be deleted.
Now I have found a solution:
themes/clean_canvas/css/clean/screen_colors.css
at:

Quote:
/* Breadcrumbs ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

insert:

Quote:
.g-breadcrumbs .g-active {
background: none;
}

OK as far. Now just find where the font size can be adjusted (autonomous for the breadcrumbs). I have not found it yet.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2014-06-26 13:55

You should be able to just add a font-size to the the .g-breadcrumbs in the css. like:

.g-breadcrumbs {
    clear: both;
    font-size: 20px;
    padding: 0 20px;
}

Adjust the 20 as required.
if you can't find the .g-breadcrumbs then just add it.
If that does not work then you will have to dig into the theme as I only have the default theme installed on my test site.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
slart

Joined: 2013-11-11
Posts: 112
Posted: Thu, 2014-06-26 13:59

edit: oh sorry dave, is see you post yet.

Ok, I have found a solution for the font-size. It's realy not the best.

insert in:
themes/clean_canvas/css/screen_fonts.css

Quote:
h2 {
font-size: 1.3em;
}

The Font is Bold for another css rule.

insert in:
themes/clean_canvas/views/page.html.php

Quote:
<h2>
<? if (!empty($breadcrumbs)): ?>
<ul class="g-breadcrumbs">
<? foreach ($breadcrumbs as $breadcrumb): ?>
<li class="<?= $breadcrumb->last ? "g-active" : "" ?>
<?= $breadcrumb->first ? "g-first" : "" ?>">
<? if (!$breadcrumb->last): ?> <a href="<?= $breadcrumb->url ?>">
<?= html::purify(text::limit_chars($breadcrumb->title, module::get_var("gallery", "visible_title_length"))) ?>
</a><? endif ?>
</li>
<? endforeach ?>
</ul>
<? endif ?>
</h2>

 
slart

Joined: 2013-11-11
Posts: 112
Posted: Thu, 2014-06-26 14:18

OK, dave, you solution don't work autonom only for breadcrumbs.

you can find the css rules here:
themes/clean_canvas/css/screen_fonts.css

Quote:
#g-sidebar,
.g-breadcrumbs {
font-size: 0.8em;
}

But, that is for all text in the Gallery.

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Thu, 2014-06-26 16:53

@slart:
(1) Best if you don't make changes directly in any css file except screen.css
(2) The css section you pulled out applies to the breadcrumb AND to the sidebar as a whole

Now, try adding this to the bottom of your screen.css file (assuming there is one in that theme; if there isn't try adding this to the bottom of the file you were already looking at):
.g-breadcrumbs { font-size: 20px }

If it doesn't work, provide a link to your site.

 
slart

Joined: 2013-11-11
Posts: 112
Posted: Thu, 2014-06-26 18:06

OK tempg, that's better, that's perfect. Something I've tried, just in the wrong place, as I realize now. I have the theme Clean canvas. It has no screen.css. I had to find the right css. The css rule must be in the:
themes/clean_canvas/css/screen_layout_fixed.css
(If "fixed with" is active in the theme.)

I have write on top of the css this:

Quote:
/** *******************************************************************
* 0) Font size, album menu at the top of the page (breadcrumbs)
**********************************************************************/

.g-breadcrumbs {
font-size: 1.1em;
font-weight: bold;
}

Thanks so much!