Skip to content

Commit

Permalink
fix: Fix truncation on public shares
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <chrng8@gmail.com>
  • Loading branch information
Pytal committed Apr 23, 2024
1 parent 9476b0d commit abd6620
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 10 deletions.
17 changes: 17 additions & 0 deletions core/css/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,17 @@
flex: 1 1 100%;
}

.header-info {
display: flex;
flex-direction: column;
overflow: hidden;
}

.header-title {
overflow: hidden;
text-overflow: ellipsis;
}

.header-shared-by {
color: var(--color-primary-element-text);
position: relative;
Expand All @@ -238,6 +249,12 @@
line-height: 11px;
overflow: hidden;
text-overflow: ellipsis;
text-align: end;
flex: 1 1 100%;

@media only screen and (min-width: variables.$breakpoint-mobile) {
margin-right: 20px;
}
}

/* Skip navigation links – show only on keyboard focus */
Expand Down
24 changes: 14 additions & 10 deletions core/templates/layout.public.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,21 @@
<div class="logo logo-icon"></div>
<?php endif; ?>

<?php if (isset($template) && $template->getHeaderTitle() !== '') { ?>
<?php p($template->getHeaderTitle()); ?>
<?php } else { ?>
<?php p($theme->getName()); ?>
<?php } ?>
</div>
<?php if (isset($template) && $template->getHeaderDetails() !== '') { ?>
<div class="header-shared-by">
<?php p($template->getHeaderDetails()); ?>
<div class="header-info">
<span class="header-title">
<?php if (isset($template) && $template->getHeaderTitle() !== '') { ?>
<?php p($template->getHeaderTitle()); ?>
<?php } else { ?>
<?php p($theme->getName()); ?>
<?php } ?>
</span>
<?php if (isset($template) && $template->getHeaderDetails() !== '') { ?>
<span class="header-shared-by">
<?php p($template->getHeaderDetails()); ?>
</span>
<?php } ?>
</div>
<?php } ?>
</div>
</div>

<div class="header-right">
Expand Down

0 comments on commit abd6620

Please sign in to comment.