Skip to content

Commit 66fdcb0

Browse files
committed
fix table html
1 parent d62d178 commit 66fdcb0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1032
-1
lines changed

_layouts/cheatsheet.html

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
layout: default
3+
---
4+
5+
<div class="cheatsheet-page">
6+
<header class="cheatsheet-header">
7+
<nav class="breadcrumb">
8+
<a href="{{ site.url }}{{ site.baseurl }}/" class="breadcrumb-link">Home</a>
9+
<span class="breadcrumb-separator"></span>
10+
<a href="{{ site.url }}{{ site.baseurl }}/cheatsheets/" class="breadcrumb-link">Cheatsheets</a>
11+
<span class="breadcrumb-separator"></span>
12+
<span class="breadcrumb-current">{{ page.title }}</span>
13+
</nav>
14+
15+
<div class="cheatsheet-title-section">
16+
<h1 class="cheatsheet-title">{{ page.title }}</h1>
17+
{% if page.description %}
18+
<p class="cheatsheet-description">{{ page.description }}</p>
19+
{% endif %}
20+
21+
<div class="cheatsheet-meta">
22+
{% if page.difficulty %}
23+
<span class="meta-badge difficulty-{{ page.difficulty | downcase }}">{{ page.difficulty }}</span>
24+
{% endif %}
25+
{% if page.category %}
26+
<span class="meta-badge category">{{ page.category }}</span>
27+
{% endif %}
28+
{% if page.patterns %}
29+
{% for pattern in page.patterns %}
30+
<span class="meta-badge pattern">{{ pattern }}</span>
31+
{% endfor %}
32+
{% endif %}
33+
</div>
34+
</div>
35+
</header>
36+
37+
<div class="cheatsheet-content">
38+
{{ content }}
39+
</div>
40+
41+
<footer class="cheatsheet-footer">
42+
<div class="footer-nav">
43+
<a href="{{ site.url }}{{ site.baseurl }}/cheatsheets/" class="footer-nav-link">
44+
← Back to Cheatsheets
45+
</a>
46+
<a href="{{ site.repository_url }}/blob/master/doc/cheatsheet/{{ page.filename }}"
47+
class="footer-nav-link" target="_blank">
48+
Edit on GitHub →
49+
</a>
50+
</div>
51+
</footer>
52+
</div>

assets/css/style.scss

Lines changed: 257 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,263 @@ blockquote {
313313
text-decoration: underline;
314314
}
315315

316+
/* Cheatsheet Specific Styles */
317+
.cheatsheet-page {
318+
max-width: 900px;
319+
margin: 0 auto;
320+
padding: 0 24px;
321+
}
322+
323+
.cheatsheet-header {
324+
margin-bottom: 40px;
325+
padding-bottom: 24px;
326+
border-bottom: 2px solid var(--border-light);
327+
}
328+
329+
.breadcrumb {
330+
display: flex;
331+
align-items: center;
332+
gap: 8px;
333+
margin-bottom: 24px;
334+
font-size: 14px;
335+
}
336+
337+
.breadcrumb-link {
338+
color: var(--primary-blue);
339+
text-decoration: none;
340+
font-weight: 400;
341+
}
342+
343+
.breadcrumb-link:hover {
344+
text-decoration: underline;
345+
}
346+
347+
.breadcrumb-separator {
348+
color: var(--text-tertiary);
349+
font-weight: 300;
350+
}
351+
352+
.breadcrumb-current {
353+
color: var(--text-secondary);
354+
font-weight: 500;
355+
}
356+
357+
.cheatsheet-title-section {
358+
text-align: left;
359+
}
360+
361+
.cheatsheet-title {
362+
font-size: 42px;
363+
font-weight: 400;
364+
color: var(--text-primary);
365+
margin: 0 0 16px 0;
366+
letter-spacing: -0.5px;
367+
line-height: 1.2;
368+
}
369+
370+
.cheatsheet-description {
371+
font-size: 18px;
372+
color: var(--text-secondary);
373+
margin: 0 0 24px 0;
374+
line-height: 1.6;
375+
font-weight: 300;
376+
}
377+
378+
.cheatsheet-meta {
379+
display: flex;
380+
flex-wrap: wrap;
381+
gap: 8px;
382+
margin-bottom: 24px;
383+
}
384+
385+
.meta-badge {
386+
display: inline-block;
387+
padding: 6px 12px;
388+
border-radius: 16px;
389+
font-size: 12px;
390+
font-weight: 500;
391+
text-transform: uppercase;
392+
letter-spacing: 0.5px;
393+
}
394+
395+
.meta-badge.difficulty-easy {
396+
background: #e8f5e8;
397+
color: #2e7d32;
398+
border: 1px solid #c8e6c9;
399+
}
400+
401+
.meta-badge.difficulty-medium {
402+
background: #fff3e0;
403+
color: #f57c00;
404+
border: 1px solid #ffcc02;
405+
}
406+
407+
.meta-badge.difficulty-hard {
408+
background: #ffebee;
409+
color: #d32f2f;
410+
border: 1px solid #ffcdd2;
411+
}
412+
413+
.meta-badge.category {
414+
background: var(--secondary-blue);
415+
color: var(--primary-blue);
416+
border: 1px solid var(--primary-blue);
417+
}
418+
419+
.meta-badge.pattern {
420+
background: var(--background-secondary);
421+
color: var(--text-secondary);
422+
border: 1px solid var(--border-medium);
423+
}
424+
425+
.cheatsheet-content {
426+
line-height: 1.7;
427+
}
428+
429+
.cheatsheet-content h1 {
430+
font-size: 32px;
431+
margin: 48px 0 24px 0;
432+
color: var(--text-primary);
433+
font-weight: 400;
434+
}
435+
436+
.cheatsheet-content h2 {
437+
font-size: 26px;
438+
margin: 36px 0 18px 0;
439+
color: var(--text-primary);
440+
font-weight: 400;
441+
padding-bottom: 8px;
442+
border-bottom: 1px solid var(--border-light);
443+
}
444+
445+
.cheatsheet-content h3 {
446+
font-size: 20px;
447+
margin: 28px 0 14px 0;
448+
color: var(--text-primary);
449+
font-weight: 500;
450+
}
451+
452+
.cheatsheet-content h4 {
453+
font-size: 18px;
454+
margin: 24px 0 12px 0;
455+
color: var(--text-primary);
456+
font-weight: 500;
457+
}
458+
459+
.cheatsheet-content p {
460+
margin: 16px 0;
461+
color: var(--text-secondary);
462+
}
463+
464+
.cheatsheet-content ul,
465+
.cheatsheet-content ol {
466+
margin: 16px 0;
467+
padding-left: 28px;
468+
}
469+
470+
.cheatsheet-content li {
471+
margin: 8px 0;
472+
color: var(--text-secondary);
473+
}
474+
475+
.cheatsheet-content strong {
476+
color: var(--text-primary);
477+
font-weight: 600;
478+
}
479+
480+
.cheatsheet-content code {
481+
background: var(--background-secondary);
482+
color: var(--text-primary);
483+
padding: 3px 6px;
484+
border-radius: 4px;
485+
font-size: 0.9em;
486+
font-family: var(--font-google-mono);
487+
}
488+
489+
.cheatsheet-content pre {
490+
background: var(--background-secondary);
491+
border: 1px solid var(--border-light);
492+
border-radius: 8px;
493+
padding: 20px;
494+
margin: 24px 0;
495+
overflow-x: auto;
496+
font-family: var(--font-google-mono);
497+
font-size: 14px;
498+
line-height: 1.5;
499+
}
500+
501+
.cheatsheet-content pre code {
502+
background: none;
503+
padding: 0;
504+
color: var(--text-primary);
505+
}
506+
507+
.cheatsheet-footer {
508+
margin-top: 60px;
509+
padding: 32px 0;
510+
border-top: 1px solid var(--border-light);
511+
}
512+
513+
.footer-nav {
514+
display: flex;
515+
justify-content: space-between;
516+
align-items: center;
517+
}
518+
519+
.footer-nav-link {
520+
color: var(--primary-blue);
521+
text-decoration: none;
522+
font-weight: 500;
523+
padding: 12px 20px;
524+
border-radius: 6px;
525+
border: 1px solid var(--primary-blue);
526+
transition: all 0.2s ease;
527+
}
528+
529+
.footer-nav-link:hover {
530+
background: var(--primary-blue);
531+
color: white;
532+
}
533+
534+
/* Enhanced Table Styles for Cheatsheets */
535+
.cheatsheet-content table {
536+
width: 100%;
537+
margin: 28px 0;
538+
border-collapse: collapse;
539+
background: var(--background-card);
540+
border-radius: 8px;
541+
overflow: hidden;
542+
box-shadow: var(--shadow-light);
543+
border: 1px solid var(--border-light);
544+
}
545+
546+
.cheatsheet-content th {
547+
background: var(--secondary-blue);
548+
padding: 16px 18px;
549+
font-weight: 600;
550+
color: var(--text-primary);
551+
font-size: 13px;
552+
text-transform: uppercase;
553+
letter-spacing: 0.5px;
554+
border-bottom: 2px solid var(--primary-blue);
555+
}
556+
557+
.cheatsheet-content td {
558+
padding: 14px 18px;
559+
color: var(--text-secondary);
560+
font-size: 14px;
561+
border-bottom: 1px solid var(--border-light);
562+
vertical-align: top;
563+
}
564+
565+
.cheatsheet-content tr:last-child td {
566+
border-bottom: none;
567+
}
568+
569+
.cheatsheet-content tr:hover {
570+
background: var(--background-secondary);
571+
}
572+
316573
/* Responsive Design */
317574
@media (max-width: 768px) {
318575
.container {

doc/cheatsheet/00_template.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
---
2+
layout: cheatsheet
3+
title: "Cheatsheet Template"
4+
description: "Template for creating new cheatsheets with consistent structure"
5+
category: "Template"
6+
difficulty: "Easy"
7+
tags: ["template", "structure", "guide"]
8+
patterns:
9+
- Template structure
10+
- Consistent formatting
11+
---
12+
113
# cheatsheet template
214

315
## 0) Concept

doc/cheatsheet/2_pointers.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
---
2+
layout: cheatsheet
3+
title: "Two Pointers"
4+
description: "Two pointers technique for solving array and string problems efficiently"
5+
category: "Algorithm"
6+
difficulty: "Medium"
7+
tags: ["two-pointers", "array", "string", "sliding-window", "binary-search"]
8+
patterns:
9+
- Fast-slow pointers
10+
- Left-right pointers
11+
- Sliding window
12+
- Binary search
13+
- Array manipulation
14+
time_complexity: "O(n)"
15+
space_complexity: "O(1)"
16+
---
17+
118
# Two pointers
219

320
- Ref

doc/cheatsheet/2_pointers_linkedlist.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
---
2+
layout: cheatsheet
3+
title: "Two Pointers - Linked List"
4+
description: "Two pointer techniques specifically for linked list problems"
5+
category: "Technique"
6+
difficulty: "Medium"
7+
tags: ["two-pointers", "linked-list", "fast-slow", "cycle-detection"]
8+
patterns:
9+
- Fast-slow pointers
10+
- Cycle detection
11+
- Finding middle node
12+
---
13+
114
# Two pointers - Linkedlist
215

316
- Ref

doc/cheatsheet/Collection.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
---
2+
layout: cheatsheet
3+
title: "Collections"
4+
description: "Collection data structures and operations"
5+
category: "Data Structure"
6+
difficulty: "Easy"
7+
tags: ["collections", "data-structures", "operations"]
8+
patterns:
9+
- Collection operations
10+
- Data manipulation
11+
- Container types
12+
---
13+
114
# Collection
215

316
## 0) Concept

0 commit comments

Comments
 (0)