|
43 | 43 | <article class="web-article contents"> |
44 | 44 | <header class="web-article-header flex items-start justify-between"> |
45 | 45 | <div class="web-article-header-start web-u-cross-start flex flex-col"> |
46 | | - {#if back} |
47 | | - <a |
48 | | - href={back} |
49 | | - class="web-icon-button web-is-only-mobile" |
50 | | - aria-label="previous page" |
51 | | - > |
52 | | - <span class="icon-cheveron-left" aria-hidden="true"></span> |
53 | | - </a> |
54 | | - {/if} |
| 46 | + <div class="mobile-header-row mb-2 flex w-full items-center lg:hidden"> |
| 47 | + {#if back} |
| 48 | + <a href={back} class="web-icon-button" aria-label="previous page"> |
| 49 | + <span class="web-icon-chevron-left" aria-hidden="true"></span> |
| 50 | + </a> |
| 51 | + {/if} |
| 52 | + <div class="copy-button-wrapper-mobile ml-auto"> |
| 53 | + <CopyAsMarkdown class="ml-0" /> |
| 54 | + </div> |
| 55 | + </div> |
55 | 56 | <ul class="web-metadata text-caption"> |
56 | 57 | <slot name="metadata" /> |
57 | 58 | </ul> |
|
74 | 75 | <h1 class="text-title font-aeonik-pro text-primary">{title}</h1> |
75 | 76 | </div> |
76 | 77 | </div> |
77 | | - <div class="web-article-header-end self-start md:self-auto"> |
| 78 | + <div class="web-article-header-end copy-button-wrapper hidden lg:block"> |
78 | 79 | <CopyAsMarkdown class="ml-0" /> |
79 | 80 | </div> |
80 | 81 | </header> |
|
100 | 101 | max-inline-size: 40.5rem; |
101 | 102 | } |
102 | 103 | } |
| 104 | +
|
| 105 | + /* Mobile header row with back button and copy button */ |
| 106 | + @media (max-width: 1023.9px) { |
| 107 | + .mobile-header-row { |
| 108 | + align-items: center; |
| 109 | + width: 100vw; |
| 110 | + position: relative; |
| 111 | + margin-left: calc(-1 * var(--p-grid-huge-navs-padding-inline, 1.25rem)); |
| 112 | + margin-right: calc(-1 * var(--p-grid-huge-navs-padding-inline, 1.25rem)); |
| 113 | + padding-left: var(--p-grid-huge-navs-padding-inline, 1.25rem); |
| 114 | + padding-right: var(--p-grid-huge-navs-padding-inline, 1.25rem); |
| 115 | + } |
| 116 | +
|
| 117 | + .copy-button-wrapper-mobile { |
| 118 | + display: flex; |
| 119 | + align-items: center; |
| 120 | + margin-left: auto; |
| 121 | + margin-right: 0; |
| 122 | + } |
| 123 | + } |
| 124 | +
|
| 125 | + /* Desktop copy button wrapper */ |
| 126 | + @media (min-width: 1024px) { |
| 127 | + .copy-button-wrapper { |
| 128 | + align-self: center; |
| 129 | + width: auto; |
| 130 | + } |
| 131 | + } |
103 | 132 | </style> |
0 commit comments