Skip to content

Commit

Permalink
Fix the issue Links are not crawlable #541
Browse files Browse the repository at this point in the history
  • Loading branch information
sonvnn committed Jan 22, 2024
1 parent 7ea16d4 commit 2fbaaae
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions assets/vendor/astroid/scss/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@

.form-group {
margin-bottom: 1rem;
}

.cursor-pointer {
cursor: pointer;
}
12 changes: 8 additions & 4 deletions framework/frontend/header/menu/link.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
$slidemenu = @$slidemenu;
$slidemenu = ($slidemenu == 1 ? true : false);

if ($item->type == "heading" || $item->type == 'separator') {
$item->flink = 'javascript:void(0);';
}
//if ($item->type == "heading" || $item->type == 'separator') {
// $item->flink = 'javascript:void(0);';
//}

$attributes = [];
if (isset($props)) {
Expand Down Expand Up @@ -88,6 +88,10 @@
$attributes['class'] .= " item-link-" . $item->type;
$attributes['class'] .= " item-level-" . $item->level;

if (empty($item->flink)) {
$attributes['class'] .= ' cursor-pointer';
}

$attr = [];
foreach ($attributes as $key => $attribute) {
$attr[] = $key . '="' . $attribute . '"';
Expand All @@ -109,7 +113,7 @@
}
}
?>
<a href="<?php echo $item->flink; ?>" <?php echo implode(' ', $attr); ?>>
<a <?php echo !empty($item->flink) ? 'href="'.$item->flink.'"' : ''; ?> <?php echo implode(' ', $attr); ?>>
<span class="nav-title">
<?php if (!empty($options->icon)) { ?>
<i class="<?php echo $options->icon; ?>"></i>
Expand Down

0 comments on commit 2fbaaae

Please sign in to comment.