Skip to content

Commit df610a6

Browse files
committed
fix css projects
1 parent 7bcfcf5 commit df610a6

17 files changed

Lines changed: 374 additions & 14 deletions

File tree

css/github-markdown-local.css

Lines changed: 244 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,244 @@
1+
.markdown-body {
2+
color: #c9d1d9;
3+
background: #0d1117;
4+
font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
5+
font-size: 16px;
6+
line-height: 1.65;
7+
overflow-wrap: break-word;
8+
word-break: normal;
9+
}
10+
11+
.markdown-body > *:first-child {
12+
margin-top: 0 !important;
13+
}
14+
15+
.markdown-body > *:last-child {
16+
margin-bottom: 0 !important;
17+
}
18+
19+
.markdown-body h1,
20+
.markdown-body h2,
21+
.markdown-body h3,
22+
.markdown-body h4,
23+
.markdown-body h5,
24+
.markdown-body h6 {
25+
color: #f0f6fc;
26+
font-weight: 700;
27+
line-height: 1.25;
28+
margin: 1.4em 0 0.7em;
29+
}
30+
31+
.markdown-body h1 {
32+
font-size: 2rem;
33+
padding-bottom: 0.35em;
34+
border-bottom: 1px solid #30363d;
35+
}
36+
37+
.markdown-body h2 {
38+
font-size: 1.5rem;
39+
padding-bottom: 0.3em;
40+
border-bottom: 1px solid #21262d;
41+
}
42+
43+
.markdown-body h3 {
44+
font-size: 1.25rem;
45+
}
46+
47+
.markdown-body h4 {
48+
font-size: 1rem;
49+
}
50+
51+
.markdown-body h5 {
52+
font-size: 0.92rem;
53+
}
54+
55+
.markdown-body h6 {
56+
font-size: 0.85rem;
57+
color: #8b949e;
58+
}
59+
60+
.markdown-body p,
61+
.markdown-body ul,
62+
.markdown-body ol,
63+
.markdown-body dl,
64+
.markdown-body table,
65+
.markdown-body blockquote,
66+
.markdown-body pre,
67+
.markdown-body details {
68+
margin: 0 0 1rem;
69+
}
70+
71+
.markdown-body ul,
72+
.markdown-body ol {
73+
padding-left: 2em;
74+
}
75+
76+
.markdown-body ul ul,
77+
.markdown-body ul ol,
78+
.markdown-body ol ul,
79+
.markdown-body ol ol {
80+
margin-top: 0.5rem;
81+
margin-bottom: 0;
82+
}
83+
84+
.markdown-body li + li {
85+
margin-top: 0.25rem;
86+
}
87+
88+
.markdown-body li > p {
89+
margin-top: 0.75rem;
90+
}
91+
92+
.markdown-body li > ul,
93+
.markdown-body li > ol {
94+
margin-top: 0.5rem;
95+
}
96+
97+
.markdown-body a {
98+
color: #58a6ff;
99+
text-decoration: none;
100+
}
101+
102+
.markdown-body a:hover,
103+
.markdown-body a:focus-visible {
104+
color: #79c0ff;
105+
text-decoration: underline;
106+
}
107+
108+
.markdown-body strong {
109+
color: #f0f6fc;
110+
font-weight: 700;
111+
}
112+
113+
.markdown-body em {
114+
font-style: italic;
115+
}
116+
117+
.markdown-body hr {
118+
height: 1px;
119+
margin: 1.5rem 0;
120+
border: 0;
121+
background: #30363d;
122+
}
123+
124+
.markdown-body blockquote {
125+
padding: 0 1rem;
126+
color: #8b949e;
127+
border-left: 0.25rem solid #30363d;
128+
}
129+
130+
.markdown-body code,
131+
.markdown-body tt {
132+
padding: 0.15em 0.35em;
133+
border-radius: 6px;
134+
background: rgba(110, 118, 129, 0.22);
135+
color: #f0f6fc;
136+
font-family: "Cascadia Code", Consolas, "Liberation Mono", Menlo, monospace;
137+
font-size: 0.92em;
138+
}
139+
140+
.markdown-body pre {
141+
padding: 1rem;
142+
overflow: auto;
143+
border: 1px solid #30363d;
144+
border-radius: 8px;
145+
background: #161b22;
146+
-webkit-overflow-scrolling: touch;
147+
}
148+
149+
.markdown-body pre code {
150+
display: block;
151+
padding: 0;
152+
background: transparent;
153+
border-radius: 0;
154+
font-size: 0.92rem;
155+
white-space: pre;
156+
min-width: max-content;
157+
}
158+
159+
.markdown-body table {
160+
display: block;
161+
width: 100%;
162+
overflow: auto;
163+
border-collapse: collapse;
164+
border-spacing: 0;
165+
border-radius: 8px;
166+
}
167+
168+
.markdown-body table th,
169+
.markdown-body table td {
170+
padding: 0.75rem 0.9rem;
171+
border: 1px solid #30363d;
172+
vertical-align: top;
173+
}
174+
175+
.markdown-body table th {
176+
color: #f0f6fc;
177+
font-weight: 600;
178+
background: #161b22;
179+
}
180+
181+
.markdown-body table tr {
182+
background: #0d1117;
183+
}
184+
185+
.markdown-body table tr:nth-child(2n) {
186+
background: #161b22;
187+
}
188+
189+
.markdown-body img {
190+
max-width: 100%;
191+
height: auto;
192+
}
193+
194+
.markdown-body a img {
195+
display: inline-block;
196+
vertical-align: middle;
197+
margin: 0 0.4rem 0.4rem 0;
198+
}
199+
200+
.markdown-body p > a:last-child img,
201+
.markdown-body p > img:last-child {
202+
margin-right: 0;
203+
}
204+
205+
.markdown-body p > a > img[src*="badge"],
206+
.markdown-body p > a > img[src*="shields.io"],
207+
.markdown-body p > a > img[src*="badge.svg"],
208+
.markdown-body p > a > img[src*="codecov.io"],
209+
.markdown-body p > a > img[src*="github.com/"] {
210+
min-height: 20px;
211+
}
212+
213+
.markdown-body .anchor {
214+
float: left;
215+
margin-left: -20px;
216+
padding-right: 4px;
217+
}
218+
219+
.markdown-body .highlight {
220+
margin-bottom: 1rem;
221+
}
222+
223+
@media (max-width: 768px) {
224+
.markdown-body {
225+
font-size: 15px;
226+
}
227+
228+
.markdown-body h1 {
229+
font-size: 1.7rem;
230+
}
231+
232+
.markdown-body h2 {
233+
font-size: 1.35rem;
234+
}
235+
236+
.markdown-body pre {
237+
padding: 0.85rem;
238+
}
239+
240+
.markdown-body table th,
241+
.markdown-body table td {
242+
padding: 0.65rem 0.75rem;
243+
}
244+
}

css/projects.css

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,37 @@ body {
209209
color: #ffffff;
210210
}
211211

212+
.full-readme-section {
213+
content-visibility: auto;
214+
contain-intrinsic-size: 1200px 2200px;
215+
}
216+
217+
.full-readme-container .markdown-body a {
218+
text-decoration: underline !important;
219+
text-underline-offset: 0.18em;
220+
text-decoration-thickness: 0.08em;
221+
}
222+
223+
.full-readme-container .markdown-body a:hover,
224+
.full-readme-container .markdown-body a:focus-visible {
225+
text-decoration-thickness: 0.12em;
226+
}
227+
228+
.full-readme-container .markdown-body img {
229+
max-width: 100%;
230+
height: auto;
231+
}
232+
233+
.full-readme-container .markdown-body img[src*="img.shields.io"] {
234+
display: inline-block;
235+
vertical-align: middle;
236+
min-height: 20px;
237+
}
238+
239+
.full-readme-container .markdown-body img[alt="GitHub Sponsors"] {
240+
min-height: 28px;
241+
}
242+
212243

213244

214245

js/index.js

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
if (typeof window.gsap === 'undefined') {
2+
window.gsap = {
3+
to: function(target, duration, props) {
4+
var settings = props || {};
5+
var elements = [];
6+
7+
if (typeof target === 'string') {
8+
elements = Array.prototype.slice.call(document.querySelectorAll(target));
9+
} else if (target && target.nodeType === 1) {
10+
elements = [target];
11+
} else if (target && typeof target.length === 'number') {
12+
elements = Array.prototype.slice.call(target);
13+
}
14+
15+
elements.forEach(function(element) {
16+
if (Object.prototype.hasOwnProperty.call(settings, 'display')) {
17+
element.style.display = settings.display;
18+
}
19+
20+
if (Object.prototype.hasOwnProperty.call(settings, 'y')) {
21+
element.style.transform = settings.y === 0 ? 'translateY(0)' : 'translateY(' + settings.y + ')';
22+
}
23+
});
24+
25+
if (typeof settings.onComplete === 'function') {
26+
settings.onComplete();
27+
}
28+
}
29+
};
30+
}
31+
132
function isTouchOrMobile() {
233
return (
334
'ontouchstart' in window ||
@@ -160,6 +191,33 @@ function applyParticlesFallback() {
160191
}, 2000);
161192
}
162193

194+
function stabilizeMarkdownBadges() {
195+
var badgeImages = document.querySelectorAll('.markdown-body img');
196+
197+
badgeImages.forEach(function(image) {
198+
image.decoding = 'async';
199+
200+
if (image.src.indexOf('img.shields.io') !== -1) {
201+
image.loading = 'lazy';
202+
image.setAttribute('fetchpriority', 'low');
203+
}
204+
205+
function syncIntrinsicSize() {
206+
if (image.naturalWidth > 0 && image.naturalHeight > 0) {
207+
image.width = image.naturalWidth;
208+
image.height = image.naturalHeight;
209+
}
210+
}
211+
212+
if (image.complete) {
213+
syncIntrinsicSize();
214+
return;
215+
}
216+
217+
image.addEventListener('load', syncIntrinsicSize, { once: true });
218+
});
219+
}
220+
163221
$(window).on('load', function() {
164222
document.body.classList.add('ready');
165223
if ($('#all').length) {
@@ -175,6 +233,7 @@ $(window).on('load', function() {
175233

176234
initParticles();
177235
applyParticlesFallback();
236+
stabilizeMarkdownBadges();
178237

179238
window.addEventListener('resize', function() {
180239
if (window.pJSDom && window.pJSDom.length > 0) {

projects/aegis-sentinel/index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@
166166
.project-context-section p, .project-context-section li, .related-projects-section p, .related-projects-section li { color: #d0d0d0; line-height: 1.7; }
167167
.project-context-section a, .related-projects-section a { color: #64c8ff; }
168168
.related-projects-section { padding: 32px 20px; background: rgba(255, 255, 255, 0.03); } </style>
169-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css@5.8.1/github-markdown-dark.min.css">
169+
<link rel="preload" as="style" href="../../css/github-markdown-local.css">
170+
<link rel="stylesheet" href="../../css/github-markdown-local.css" media="print" onload="this.media='all'">
171+
<noscript><link rel="stylesheet" href="../../css/github-markdown-local.css"></noscript>
170172
</head>
171173
<body>
172174
<div id="breaker"></div>

projects/cipher-gate-proxy/index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@
166166
.project-context-section p, .project-context-section li, .related-projects-section p, .related-projects-section li { color: #d0d0d0; line-height: 1.7; }
167167
.project-context-section a, .related-projects-section a { color: #64c8ff; }
168168
.related-projects-section { padding: 32px 20px; background: rgba(255, 255, 255, 0.03); } </style>
169-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css@5.8.1/github-markdown-dark.min.css">
169+
<link rel="preload" as="style" href="../../css/github-markdown-local.css">
170+
<link rel="stylesheet" href="../../css/github-markdown-local.css" media="print" onload="this.media='all'">
171+
<noscript><link rel="stylesheet" href="../../css/github-markdown-local.css"></noscript>
170172
</head>
171173
<body>
172174
<div id="breaker"></div>

projects/cloud-deployment-showcase/index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@
166166
.project-context-section p, .project-context-section li, .related-projects-section p, .related-projects-section li { color: #d0d0d0; line-height: 1.7; }
167167
.project-context-section a, .related-projects-section a { color: #64c8ff; }
168168
.related-projects-section { padding: 32px 20px; background: rgba(255, 255, 255, 0.03); } </style>
169-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css@5.8.1/github-markdown-dark.min.css">
169+
<link rel="preload" as="style" href="../../css/github-markdown-local.css">
170+
<link rel="stylesheet" href="../../css/github-markdown-local.css" media="print" onload="this.media='all'">
171+
<noscript><link rel="stylesheet" href="../../css/github-markdown-local.css"></noscript>
170172
</head>
171173
<body>
172174
<div id="breaker"></div>

0 commit comments

Comments
 (0)