diff --git a/static/src/scss/_blocks.scss b/static/src/scss/_blocks.scss index aa57236..24b6327 100644 --- a/static/src/scss/_blocks.scss +++ b/static/src/scss/_blocks.scss @@ -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, diff --git a/static/src/scss/_bulma_overrides.scss b/static/src/scss/_bulma_overrides.scss index d2cc2c1..009530c 100644 --- a/static/src/scss/_bulma_overrides.scss +++ b/static/src/scss/_bulma_overrides.scss @@ -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; diff --git a/website/contrib/code_block/templates/contrib/blocks/code.html b/website/contrib/code_block/templates/contrib/blocks/code.html index ddb1a9c..bace403 100644 --- a/website/contrib/code_block/templates/contrib/blocks/code.html +++ b/website/contrib/code_block/templates/contrib/blocks/code.html @@ -1,5 +1,9 @@ - - {{ value.language }} - - +