Skip to content

Commit 4838d87

Browse files
committed
Add floating GitHub badge to site
Introduce a persistent GitHub badge with SVG icon and styles. - Adds github-badge.css - Injects the badge (linking to the repository) into HTML pages - The badge is fixed bottom-right, expands on hover, and includes responsive adjustments for mobile devices - Also includes a binary update to RR Circuits API.bsdesign.
1 parent 9a7bd68 commit 4838d87

5 files changed

Lines changed: 62 additions & 3 deletions

File tree

RR Circuits API.bsdesign

549 Bytes
Binary file not shown.

Source/api/examples/loadExternal.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,15 @@
2424
<link rel="manifest" href="../../manifest.json" crossorigin="use-credentials">
2525
<link rel="stylesheet" href="../../assets/css/Roboto.css">
2626
<link rel="stylesheet" href="../../assets/css/bss-overrides.css">
27+
<link rel="stylesheet" href="../../assets/css/github-badge.css">
2728
<link rel="stylesheet" href="../../assets/css/other.css">
2829
</head>
2930

30-
<body style="display: flex;justify-content: center;align-items: center;min-height: 100vh;">
31+
<body style="display: flex;justify-content: center;align-items: center;min-height: 100vh;"><a class="github-badge" href="https://github.com/PckyDev/Rec-Room-Circuits-API" target="_blank">
32+
<p>Open on GitHub</p><svg xmlns="http://www.w3.org/2000/svg" viewBox="-8 0 512 512" width="1em" height="1em" fill="currentColor"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc. -->
33+
<path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path>
34+
</svg>
35+
</a>
3136
<script src="../../assets/js/jquery.min.js"></script>
3237
<script src="../../assets/bootstrap/js/bootstrap.min.js"></script>
3338
<script src="../../assets/js/bs-init.js"></script>

Source/assets/css/github-badge.css

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
.github-badge {
2+
position: fixed;
3+
right: 1rem;
4+
bottom: 1rem;
5+
background-color: var(--rr-color-bg-primary);
6+
box-shadow: 0 0 1rem 0 rgba(0,0,0,0.125);
7+
display: flex;
8+
justify-content: end;
9+
align-items: center;
10+
padding: .5rem;
11+
text-decoration: navy;
12+
color: var(--rr-color-text-primary);
13+
border-radius: 5rem;
14+
font-size: 1.5rem;
15+
gap: .5rem;
16+
line-height: 1.5rem;
17+
z-index: 99999999;
18+
transition: .2s;
19+
width: 2.5rem;
20+
overflow: hidden;
21+
white-space: nowrap;
22+
}
23+
24+
.github-badge:hover {
25+
width: 10.25rem !important;
26+
}
27+
28+
.github-badge > p {
29+
margin: 0;
30+
font-size: 1rem;
31+
font-family: 'Roboto';
32+
font-weight: 500;
33+
}
34+
35+
.github-badge > svg {
36+
min-width: 1.5rem;
37+
}
38+
39+
@media (max-width: 576px) {
40+
.github-badge {
41+
bottom: 5rem;
42+
}
43+
}
44+

Source/editor.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<link rel="manifest" href="manifest.json" crossorigin="use-credentials">
2525
<link rel="stylesheet" href="assets/css/Roboto.css">
2626
<link rel="stylesheet" href="assets/css/bss-overrides.css">
27+
<link rel="stylesheet" href="assets/css/github-badge.css">
2728
<link rel="stylesheet" href="assets/css/other.css">
2829
<link rel="stylesheet" href="assets/css/Pages/Editor/editor.css">
2930
<link rel="stylesheet" href="assets/css/Pages/Editor/graph.css">
@@ -130,7 +131,11 @@
130131
</div>
131132
</div>
132133
</div>
133-
</div>
134+
</div><a class="github-badge" href="https://github.com/PckyDev/Rec-Room-Circuits-API" target="_blank">
135+
<p>Open on GitHub</p><svg xmlns="http://www.w3.org/2000/svg" viewBox="-8 0 512 512" width="1em" height="1em" fill="currentColor"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc. -->
136+
<path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path>
137+
</svg>
138+
</a>
134139
<script src="assets/js/jquery.min.js"></script>
135140
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
136141
<script src="assets/js/bs-init.js"></script>

Source/index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
<link rel="stylesheet" href="assets/css/Chip/port-hover.css">
4040
<link rel="stylesheet" href="assets/css/Chip/port-sizes.css">
4141
<link rel="stylesheet" href="assets/css/Chip/port-versions.css">
42+
<link rel="stylesheet" href="assets/css/github-badge.css">
4243
<link rel="stylesheet" href="assets/css/other.css">
4344
</head>
4445

@@ -1797,7 +1798,11 @@
17971798
</div>
17981799
</div>
17991800
</div>
1800-
</section>
1801+
</section><a class="github-badge" href="https://github.com/PckyDev/Rec-Room-Circuits-API" target="_blank">
1802+
<p>Open on GitHub</p><svg xmlns="http://www.w3.org/2000/svg" viewBox="-8 0 512 512" width="1em" height="1em" fill="currentColor"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc. -->
1803+
<path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path>
1804+
</svg>
1805+
</a>
18011806
<script src="assets/js/jquery.min.js"></script>
18021807
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
18031808
<script src="assets/js/swiper.min.js"></script>

0 commit comments

Comments
 (0)