Skip to content

Commit 48dbc18

Browse files
authored
feat(demo): add the FAQ link to the demo site (#302)
1 parent d0a49ae commit 48dbc18

File tree

2 files changed

+61
-14
lines changed

2 files changed

+61
-14
lines changed

src/demo/css/style.css

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,12 @@ input:focus:invalid {
247247
margin-top: 16px;
248248
}
249249

250+
.top-bottom-split {
251+
display: flex;
252+
flex-direction: column;
253+
justify-content: space-between;
254+
}
255+
250256
/* tooltips */
251257
.btn.tooltip {
252258
display: flex;
@@ -301,3 +307,31 @@ textarea#exportedPhp {
301307
resize: vertical;
302308
height: 100px;
303309
}
310+
311+
/* link underline effect */
312+
a.underline-hover {
313+
position: relative;
314+
text-decoration: none;
315+
color: var(--text);
316+
margin-top: 2em;
317+
display: inline-flex;
318+
align-items: center;
319+
gap: 0.25em;
320+
}
321+
.underline-hover::before {
322+
content: "";
323+
position: absolute;
324+
bottom: 0;
325+
right: 0;
326+
width: 0;
327+
height: 1px;
328+
background-color: var(--blue-light);
329+
transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
330+
}
331+
@media (hover: hover) and (pointer: fine) {
332+
.underline-hover:hover::before {
333+
left: 0;
334+
right: auto;
335+
width: 100%;
336+
}
337+
}

src/demo/index.php

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -143,21 +143,34 @@ function gtag() {
143143
</form>
144144
</div>
145145

146-
<div class="output">
147-
<h2>Preview</h2>
148-
<img alt="GitHub Readme Streak Stats" src="preview.php?user=" />
149-
<p class="warning">
150-
Note: The stats above are just examples and not from your GitHub profile.
151-
</p>
152-
153-
<h2>Markdown</h2>
154-
<div class="md">
155-
<code></code>
146+
<div class="output top-bottom-split">
147+
<div class="top">
148+
<h2>Preview</h2>
149+
<img alt="GitHub Readme Streak Stats" src="preview.php?user=" />
150+
<p class="warning">
151+
Note: The stats above are just examples and not from your GitHub profile.
152+
</p>
153+
154+
<h2>Markdown</h2>
155+
<div class="md">
156+
<code></code>
157+
</div>
158+
159+
<button class="copy-button btn tooltip" onclick="clipboard.copy(this);" onmouseout="tooltip.reset(this);" disabled>
160+
Copy To Clipboard
161+
</button>
162+
</div>
163+
<div class="bottom">
164+
<a href="https://github.com/DenverCoder1/github-readme-streak-stats/blob/main/docs/faq.md" target="_blank" class="underline-hover faq">
165+
Frequently Asked Questions
166+
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg">
167+
<g>
168+
<path fill="none" d="M0 0h24v24H0z"></path>
169+
<path d="M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm11-3v9l-3.794-3.793-5.999 6-1.414-1.414 5.999-6L12 3h9z"></path>
170+
</g>
171+
</svg>
172+
</a>
156173
</div>
157-
158-
<button class="copy-button btn tooltip" onclick="clipboard.copy(this);" onmouseout="tooltip.reset(this);" disabled>
159-
Copy To Clipboard
160-
</button>
161174
</div>
162175
</div>
163176

0 commit comments

Comments
 (0)