Skip to content

Commit

Permalink
fix: google search console issue with breadcrumb list
Browse files Browse the repository at this point in the history
  • Loading branch information
tbreuss committed Jul 30, 2023
1 parent a04338b commit a4eddf7
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 37 deletions.
48 changes: 48 additions & 0 deletions assets/app/dist/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -5165,6 +5165,54 @@ h3 a:hover {
text-decoration: none;
}

up-modal .breadcumbList {
display: none;
}

.breadcumbList {
margin-top: 1rem;
font-size: 0.9rem;
}

.breadcumbList__home {
color: #c2c2c2;
}

.breadcumbList__home:hover {
color: #7f7f7f;
}

.breadcumbList__home::after {
content: " › ";
}

ol[typeof=BreadcrumbList] {
display: inline;
list-style-type: none;
padding: 0;
color: #c2c2c2;
}

li[typeof=ListItem] {
display: inline;
}

li[typeof=ListItem]::after {
content: " › ";
}

li:last-child[typeof=ListItem]::after {
content: "";
}

li[typeof=ListItem] a {
color: #c2c2c2;
}

li[typeof=ListItem] a:hover {
color: #7f7f7f;
}

.button {
display: inline-block;
font-weight: 400;
Expand Down
2 changes: 1 addition & 1 deletion assets/app/dist/main.min.css

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions assets/app/scss/_breadcrumbs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,51 @@
}

}

up-modal .breadcumbList {
display: none;
}

.breadcumbList {
margin-top:1rem;
font-size: 0.9rem;
}

.breadcumbList__home {
color: #c2c2c2;
}

.breadcumbList__home:hover {
color: #7f7f7f;
}

.breadcumbList__home::after {
content: "";
}

ol[typeof=BreadcrumbList] {
display: inline;
list-style-type: none;
padding:0;
color: #c2c2c2;
}

li[typeof=ListItem] {
display: inline;
}

li[typeof=ListItem]::after {
content: "";
}

li:last-child[typeof=ListItem]::after {
content: "";
}

li[typeof=ListItem] a {
color: #c2c2c2;
}

li[typeof=ListItem] a:hover {
color: #7f7f7f;
}
41 changes: 5 additions & 36 deletions views/layouts/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,56 +124,25 @@ function gtag(){dataLayer.push(arguments);}
<div class="container navbar-border-bottom"><div class="border"></div></div>

<?php if (!empty($this->params['breadcrumbs'])): ?>
<div class="container container--breadcumbList">
<ol vocab="https://schema.org/" typeof="BreadcrumbList">
<li property="itemListElement" typeof="ListItem">
<a property="item" typeof="WebPage" href="<?= Url::home() ?>">
<span property="name">Startseite</span></a>
<meta property="position" content="1">
</li>
<div class="container breadcumbList">
<a class="breadcumbList__home" href="javascript:window.location.href='<?= Url::home() ?>'">Start</a>
<ol vocab="https://schema.org/" typeof="BreadcrumbList">
<?php foreach ($this->params['breadcrumbs'] as $itemCount => $item): ?>
<?php if (is_array($item)): ?>
<li property="itemListElement" typeof="ListItem">
<a property="item" typeof="WebPage" href="<?= Url::to($item['url']) ?>">
<span property="name"><?= $item['label'] ?></span></a>
<meta property="position" content="<?= $itemCount + 2 ?>">
<meta property="position" content="<?= $itemCount + 1 ?>">
</li>
<?php endif; ?>
<?php if (is_string($item)): ?>
<li property="itemListElement" typeof="ListItem">
<span property="name"><?= $item ?></span>
<meta property="position" content="<?= $itemCount + 2 ?>">
<meta property="position" content="<?= $itemCount + 1 ?>">
</li>
<?php endif; ?>
<?php endforeach; ?>
</ol>
<style>
up-modal .container--breadcumbList {
display: none;
}
ol[typeof=BreadcrumbList] {
list-style-type: none;
margin:1rem 0 0 0;
padding:0;
font-size: 0.9rem;
color: #c2c2c2;
}
li[typeof=ListItem] {
display: inline;
}
li[typeof=ListItem]::after {
content: " › ";
}
li:last-child[typeof=ListItem]::after {
content: "";
}
li[typeof=ListItem] a {
color: #c2c2c2;
}
li[typeof=ListItem] a:hover {
color: #7f7f7f;
}
</style>
</div>
<?php endif; ?>

Expand Down

0 comments on commit a4eddf7

Please sign in to comment.