-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
184 lines (172 loc) · 12.6 KB
/
index.html
File metadata and controls
184 lines (172 loc) · 12.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GitHub Social Preview Generator</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./assets/css/styles.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js" defer></script>
<script type="module" src="./assets/js/app.js"></script>
</head>
<body>
<a class="repo-link-btn" href="https://github.com/readme-SVG/github-social-preview-generator" target="_blank" rel="noopener noreferrer" aria-label="Open project repository">
<svg viewBox="0 0 16 16" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/></svg>
<span>View Source on GitHub</span>
</a>
<div class="top-label">Generator</div>
<h1>GitHub Social <span>Preview</span></h1>
<div class="input-row">
<input type="text" id="inp" placeholder="https://github.com/owner/repo" autocomplete="off" spellcheck="false">
<button class="btn-fetch" id="btn-go">Generate</button>
</div>
<div class="status" id="status"></div>
<div class="theme-row">
<span class="theme-label">Theme</span>
<div class="theme-dot active" data-theme="blue"></div>
<div class="theme-dot" data-theme="green"></div>
<div class="theme-dot" data-theme="purple"></div>
<div class="theme-dot" data-theme="orange"></div>
<div class="theme-dot" data-theme="red"></div>
<div class="theme-dot" data-theme="cyan"></div>
<div class="color-picker-wrap" id="custom-picker-wrap">
<div class="theme-dot color-picker-trigger" id="custom-picker-trigger" title="Custom color"></div>
<input type="color" id="custom-color-picker" value="#58a6ff" aria-label="Pick custom theme color">
<div class="color-picker-panel" id="custom-picker-panel">
<div class="cp-preview-row">
<div class="cp-swatch" id="cp-swatch"></div>
<input class="cp-hex-input" id="cp-hex" type="text" maxlength="7" value="#58a6ff" spellcheck="false">
</div>
<div class="cp-sliders">
<label class="cp-label">Hue</label>
<input class="cp-range cp-hue" id="cp-hue" type="range" min="0" max="360" value="213">
<label class="cp-label">Saturation</label>
<input class="cp-range cp-sat" id="cp-sat" type="range" min="0" max="100" value="100">
<label class="cp-label">Lightness</label>
<input class="cp-range cp-lit" id="cp-lit" type="range" min="10" max="90" value="61">
</div>
</div>
</div>
</div>
<div class="template-row">
<span class="template-label">Template</span>
<button class="template-btn active" data-template="grid">Grid</button>
<button class="template-btn" data-template="timeline">Timeline</button>
<button class="template-btn" data-template="spotlight">Spotlight</button>
<button class="template-btn" data-template="minimal">Minimal</button>
<button class="template-btn" data-template="compact">Compact</button>
<button class="template-btn" data-template="terminal">Terminal</button>
<button class="template-btn" data-template="masonry">Masonry</button>
</div>
<div class="platform-row">
<span class="platform-label">Platform</span>
<button class="template-btn active" data-platform="mobile">Mobile</button>
<button class="template-btn" data-platform="desktop">Desktop</button>
</div>
<div class="card-theme-row" role="group" aria-label="Card appearance">
<span class="card-theme-label">Appearance</span>
<button class="template-btn active" data-card-theme="dark" aria-pressed="true">Dark</button>
<button class="template-btn" data-card-theme="light" aria-pressed="false">Light</button>
</div>
<div class="dl-row">
<button class="btn-dl" id="btn-jpg">
<svg width="15" height="15" fill="currentColor" viewBox="0 0 16 16"><path d="M2.75 14A1.75 1.75 0 011 12.25v-2.5a.75.75 0 011.5 0v2.5c0 .138.112.25.25.25h10.5a.25.25 0 00.25-.25v-2.5a.75.75 0 011.5 0v2.5A1.75 1.75 0 0113.25 14H2.75z"/><path d="M7.25 7.689V2a.75.75 0 011.5 0v5.689l1.97-1.969a.749.749 0 111.06 1.06l-3.25 3.25a.749.749 0 01-1.06 0L4.22 6.78a.749.749 0 111.06-1.06l1.97 1.969z"/></svg>
JPEG
</button>
<span class="dim">JPEG 1280×640</span>
</div>
<div class="frame">
<div class="loading-overlay" id="loader">
<div class="spinner"></div>
<div class="loading-text" id="loader-text">Fetching data...</div>
</div>
<div class="card" id="capture">
<div class="card-bg">
<div class="card-bg-blob1" id="blob1"></div>
<div class="card-bg-blob2" id="blob2"></div>
<div class="card-bg-blob3" id="blob3"></div>
<div class="card-bg-grain" id="grain-layer">
<svg xmlns="http://www.w3.org/2000/svg" width="1280" height="640">
<filter id="grain">
<feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="5" stitchTiles="stitch"/>
<feColorMatrix type="saturate" values="0"/>
</filter>
<rect width="100%" height="100%" filter="url(#grain)" opacity="0.18"/>
</svg>
</div>
</div>
<div class="card-header">
<svg class="gh-logo" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/></svg>
<div class="gh-path">
<span class="gh-path-text" id="o-repo-display">owner/repo</span>
<span class="gh-path-slash">/</span>
</div>
<div class="hdr-nav">
<span>Full requests</span>
<span>Issues</span>
<span>Moderactions</span>
</div>
<div class="hdr-spacer"></div>
<div class="hdr-btns">
<div class="hdr-btn-group">
<div class="hdr-btn">
<svg class="hdr-btn-icon" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25z"/></svg>
Star
</div>
<div class="hdr-btn cnt" id="o-stars">0</div>
</div>
<div class="hdr-btn-group">
<div class="hdr-btn">
<svg class="hdr-btn-icon" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M5 3.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm0 2.122a2.25 2.25 0 10-1.5 0v.878A2.25 2.25 0 005.75 8.5h1.5v2.128a2.251 2.251 0 101.5 0V8.5h1.5a2.25 2.25 0 002.25-2.25v-.878a2.25 2.25 0 10-1.5 0v.878a.75.75 0 01-.75.75h-4.5A.75.75 0 015 6.25v-.878zm3.75 7.378a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm3-8.75a.75.75 0 100-1.5.75.75 0 000 1.5z"/></svg>
Fork
</div>
<div class="hdr-btn cnt" id="o-forks">0</div>
</div>
</div>
</div>
<div class="card-body">
<div class="bento-container">
<div class="main-repo-title" id="o-title">Repository</div>
<div class="main-repo-desc" id="o-desc">Paste a GitHub repository link and press Generate</div>
<div class="bento-grid" id="o-features">
<div class="bento-box">
<div class="bento-box-title">Activity</div>
<div class="bento-box-text">Repository stats will appear here.</div>
</div>
<div class="bento-box">
<div class="bento-box-title">Tech Stack</div>
<div class="bento-box-text">Language details will appear here.</div>
</div>
<div class="bento-box">
<div class="bento-box-title">Details</div>
<div class="bento-box-text">License and branch info will appear here.</div>
</div>
</div>
</div>
</div>
<div class="card-footer">
<div class="foot-langs" id="o-langs">
<div class="foot-item">
<span class="foot-dot" style="background:#8b949e"></span>
<span>Code</span>
</div>
</div>
<div class="foot-item" id="o-lic-wrap" style="display:none;">
<svg class="foot-icon" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8.75.75a.75.75 0 00-1.5 0V2h-.984c-.305 0-.604.08-.869.23l-1.288.737A.25.25 0 013.984 3H1.75a.75.75 0 000 1.5h.428L.066 9.192a.75.75 0 00.154.838l.53-.53-.53.53v.001l.002.002.004.004.012.011.048.042.104.08c.09.065.216.148.378.22.344.195.83.396 1.466.396.636 0 1.122-.2 1.466-.396a2.534 2.534 0 00.546-.386l.012-.011.004-.004.002-.002-.53-.53.53.53a.75.75 0 00.154-.838L2.822 4.5h.162c.305 0 .604-.08.869-.23l1.289-.737a.25.25 0 01.124-.033h.984V13h-2.5a.75.75 0 000 1.5h6.5a.75.75 0 000-1.5h-2.5V3.5h.984a.25.25 0 01.124.033l1.289.737c.265.15.564.23.869.23h.162l-2.112 4.692a.75.75 0 00.154.838l.53-.53-.53.53v.001l.002.002.004.004.012.011.048.042.104.08c.09.065.216.148.378.22.344.195.83.396 1.466.396.636 0 1.122-.2 1.466-.396a2.534 2.534 0 00.546-.386l.012-.011.004-.004.002-.002-.53-.53.53.53a.75.75 0 00.154-.838L13.178 4.5h.428a.75.75 0 000-1.5h-2.234a.25.25 0 01-.124-.033l-1.289-.737A1.75 1.75 0 009.091 2H8.75V.75z"/></svg>
<span id="o-lic">MIT</span>
</div>
<div class="foot-item">
<svg class="foot-icon" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1h-8a1 1 0 00-1 1v6.708A2.486 2.486 0 014.5 9h8V1.5zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"/></svg>
<span id="o-size">—</span>
</div>
<div class="foot-item">
<svg class="foot-icon" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M11.75 2.5a.75.75 0 100 1.5.75.75 0 000-1.5zm-2.25.75a2.25 2.25 0 113 2.122V6c0 .73-.593 1.322-1.322 1.322H7.927A.678.678 0 007.25 8v.878a2.25 2.25 0 11-1.5 0V5.372a2.25 2.25 0 111.5 0v1.836l.678-.678A2.822 2.822 0 019.178 5.822h1.572V5.372a2.25 2.25 0 012.25-2.122zM4.25 12.75a.75.75 0 100-1.5.75.75 0 000 1.5zm0-8.5a.75.75 0 100-1.5.75.75 0 000 1.5z"/></svg>
<span id="o-branch">main</span>
</div>
</div>
</div>
</div>
</body>
</html>