Skip to content

Commit 7b3e412

Browse files
committed
set border style for buttons
1 parent fad3204 commit 7b3e412

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

website_and_docs/layouts/shortcodes/gh-codeblock.html

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,16 @@
5353

5454
{{ if $hasFragment }}
5555
{{ $uniqueId := md5 $path }}
56-
<div class="mt-2">
57-
<button class="btn btn-outline-secondary" onclick="showCodeModal('{{ $uniqueId }}')">
58-
Show full example
59-
</button>
56+
<div class="mt-4 pb-2">
57+
<div style="border: 1px solid #dee2e6; border-radius: 6px; overflow: hidden; display: flex;">
58+
<a onclick="showCodeModal('{{ $uniqueId }}')" style="flex: 1; display: flex; align-items: center; justify-content: center; padding: 8px 12px; text-decoration: none; color: #007bff; background: #f8f9fa; font-weight: 500; transition: background-color 0.2s; cursor: pointer; border-right: 1px solid #dee2e6;" onmouseover="this.style.backgroundColor='#e9ecef'" onmouseout="this.style.backgroundColor='#f8f9fa'">
59+
View Complete Code
60+
</a>
61+
<a href="{{- $webUrl -}}" target="_blank" style="flex: 1; display: flex; align-items: center; justify-content: center; padding: 8px 12px; text-decoration: none; color: #007bff; background: #f8f9fa; font-weight: 500; transition: background-color 0.2s;" onmouseover="this.style.backgroundColor='#e9ecef'" onmouseout="this.style.backgroundColor='#f8f9fa'">
62+
<i class="fas fa-external-link-alt" style="margin-right: 8px;"></i>
63+
View on GitHub
64+
</a>
65+
</div>
6066
</div>
6167

6268
<div id="codeModal_{{ $uniqueId }}" style="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1050;">
@@ -146,14 +152,14 @@ <h5 style="margin: 0;">{{ $path }}</h5>
146152
}
147153
});
148154
</script>
149-
{{ end }}
150-
155+
{{ else }}
151156
<div class="text-end pb-2">
152157
<a href="{{- $webUrl -}}" target="_blank">
153158
<i class="fas fa-external-link-alt pl-2"></i>
154-
<strong>View full example on GitHub</strong>
159+
<strong>View on GitHub</strong>
155160
</a>
156161
</div>
162+
{{ end }}
157163

158164
{{ else }}
159165
{{ partial "github-content.html" }}

0 commit comments

Comments
 (0)