Make code header a solid bar instead
This is much easier to layout, and has the benefit of being able to fit more in. The transform was still leaving space allocated, which looked odd
This commit is contained in:
parent
768223ba67
commit
ce3690384e
3 changed files with 15 additions and 13 deletions
|
@ -58,21 +58,20 @@ div.block-code {
|
|||
.filename {
|
||||
font-family: $family-code;
|
||||
background-color: $grey-lighter;
|
||||
font-size: 1rem;
|
||||
position: relative;
|
||||
text-align: right;
|
||||
transform: translateY(100%) translateX(-100%);
|
||||
display: inline-block;
|
||||
left: 100%;
|
||||
font-size: 80%;
|
||||
padding: 0.25rem 1rem;
|
||||
border-radius: 0 0 0 $radius-large;
|
||||
box-shadow: $shadow;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
@include dark-mode {
|
||||
background-color: $grey-darker;
|
||||
}
|
||||
}
|
||||
|
||||
&:not(:hover) .filename {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
pre,
|
||||
span,
|
||||
|
|
|
@ -20,4 +20,3 @@ $code-background: none;
|
|||
$pre-background: none;
|
||||
$code-padding: 0;
|
||||
$code: inherit;
|
||||
$content-pre-padding: 2.75rem 1.25rem 1.25rem 1.25rem;
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<span class="filename">
|
||||
<div class="filename">
|
||||
<span>
|
||||
{{ value.language }}
|
||||
</span>
|
||||
<span>
|
||||
<i class="fa-regular fa-clipboard is-clickable code-copy" title="Copy to clipboard"></i>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
{{ value.code }}
|
||||
|
|
Loading…
Reference in a new issue