Skip to content

Commit

Permalink
Fixed #15525
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Aug 13, 2024
1 parent f496fff commit 8ff8465
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- Fixed a bug where the system name in the control panel’s global sidebar was getting hyperlinked even if the primary site didn’t have a URL. ([#15525](https://github.com/craftcms/cms/issues/15525))
- Fixed a right-to-left styling issue.

## 4.11.2 - 2024-08-12
Expand Down
10 changes: 8 additions & 2 deletions src/templates/_layouts/components/global-sidebar.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<header id="global-sidebar" class="sidebar">
<a id="system-info" href="{{ siteUrl }}" rel="noopener" target="_blank" title="{{ 'View site'|t('app') }}">
{% tag siteUrl ? 'a' : 'div' with {
id: 'system-info',
href: siteUrl ?? false,
rel: siteUrl ? 'noopener' : false,
target: siteUrl ? '_blank' : false,
title: siteUrl ? 'View site'|t('app') : false,
} %}
<div id="site-icon">
{% if hasSystemIcon %}
<img src="{{ craft.rebrand.icon.url }}" alt="">
Expand All @@ -12,7 +18,7 @@
<div id="system-name">
<span class="h2">{{ systemName }}</span>
</div>
</a>
{% endtag %}

<nav id="nav" aria-label="{{ 'Primary'|t('app') }}">
<ul>
Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/css/cp.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/css/cp.css.map

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions src/web/assets/cp/src/css/_cp.scss
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,12 @@ $sidebarLinkSecondaryColor: var(--gray-200);
@include light-focus-ring;
background-color: var(--gray-800);

#system-name,
a {
color: $sidebarLinkStaticColor;
}

a {
text-decoration: none;
}

Expand Down Expand Up @@ -161,7 +165,13 @@ $systemInfoHoverBgColor: darken($grey800, 10%);
&:after {
display: none;
}
}

div#system-info {
cursor: default;
}

a#system-info {
&:focus,
&:hover {
background-color: $systemInfoHoverBgColor !important;
Expand Down

0 comments on commit 8ff8465

Please sign in to comment.