Skip to content

Commit 9dd80eb

Browse files
committed
Add For me on GitHub ribbon - initial
1 parent b3cd7b8 commit 9dd80eb

2 files changed

Lines changed: 70 additions & 1 deletion

File tree

_includes/head-custom.html

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,3 +175,70 @@
175175
pageHeader.appendChild(zipButton);
176176
});
177177
</script>
178+
179+
<!-- Fork ribbon styles + injector -->
180+
<style>
181+
/* Ribbon container positioned near top-left to avoid colliding with the site menu */
182+
.fork-ribbon {
183+
position: fixed;
184+
top: 12px;
185+
left: -52px;
186+
z-index: 10000;
187+
pointer-events: none; /* let underlying controls receive clicks except the link */
188+
}
189+
190+
.fork-ribbon a {
191+
pointer-events: auto;
192+
display: block;
193+
width: 220px;
194+
background: #151513; /* GitHub-like dark ribbon */
195+
color: #fff;
196+
text-decoration: none;
197+
font-weight: 700;
198+
font-size: 13px;
199+
line-height: 1.4;
200+
padding: 6px 0;
201+
text-align: center;
202+
transform: rotate(-45deg);
203+
box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
204+
border-radius: 2px;
205+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
206+
}
207+
208+
.fork-ribbon a:hover,
209+
.fork-ribbon a:focus {
210+
background: #0b0b0b;
211+
}
212+
213+
/* Hide ribbon on small screens where it can obstruct content */
214+
@media (max-width: 640px) {
215+
.fork-ribbon { display: none; }
216+
}
217+
</style>
218+
219+
<script>
220+
document.addEventListener('DOMContentLoaded', function () {
221+
// Avoid inserting multiple times
222+
if (document.querySelector('.fork-ribbon')) return;
223+
224+
// Prefer site.social.github (format: owner/repo), fall back to site.github if present
225+
var repo = "{{ site.social.github | default: site.github | escape }}";
226+
if (!repo) return;
227+
228+
var url = 'https://github.com/' + repo;
229+
230+
var container = document.createElement('div');
231+
container.className = 'fork-ribbon';
232+
233+
var anchor = document.createElement('a');
234+
anchor.href = url;
235+
anchor.target = '_blank';
236+
anchor.rel = 'noopener noreferrer';
237+
anchor.setAttribute('aria-label', 'Fork me on GitHub');
238+
anchor.textContent = 'Fork me on GitHub';
239+
240+
container.appendChild(anchor);
241+
document.body.appendChild(container);
242+
});
243+
</script>
244+

docs/vscode-info.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
---
2-
title: VS Code Extension Catalog
2+
title: VS Code Setup
33
permalink: /docs/vscode-info/
44
---
55

6+
## Extension Catalog
7+
68
The following extensions are installed by `scripts/macos/vscode_setup.sh` and `scripts/windows/run_vscode_setup.ps1` scripts.
79

810
| Name | Description |

0 commit comments

Comments
 (0)