We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 285b947 commit dc0c32aCopy full SHA for dc0c32a
2 files changed
src/backend/views/pages/blocks/header.twig
@@ -1,4 +1,11 @@
1
<h{{ level }} id="{{ text | urlify }}" class="block-header block-header--{{ level }}">
2
+ {%
3
+ include 'components/copy-button.twig' with {
4
+ ariaLabel: 'Copy Link to the ' ~ text,
5
+ class: 'block-header__copy-button',
6
+ textToCopy: '#' ~ text | urlify,
7
+ }
8
+ %}
9
<a href="#{{ text | urlify }}">
10
{{ text }}
11
</a>
src/frontend/styles/components/page.pcss
@@ -125,6 +125,20 @@
125
pointer-events: none;
126
}
127
128
+ &__copy-button {
129
+ margin-right: 8px;
130
+ color: var(--color-text-second);
131
+ opacity: 0;
132
133
+
134
+ @media (--can-hover) {
135
+ &:hover {
136
+ .block-header__copy-button {
137
+ opacity: 1;
138
139
140
141
142
.inline-code {
143
line-height: inherit;
144
0 commit comments