Skip to content

Commit 7e5407d

Browse files
authored
feat(demo): add the FAQ link to the demo site (#122)
1 parent 370b128 commit 7e5407d

File tree

2 files changed

+74
-28
lines changed

2 files changed

+74
-28
lines changed

src/demo/css/style.css

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ body {
7474
}
7575

7676
@media only screen and (max-width: 1024px) {
77-
7877
.properties,
7978
.output {
8079
width: 100%;
@@ -263,6 +262,12 @@ a.icon {
263262
color: var(--blue-light);
264263
}
265264

265+
.top-bottom-split {
266+
display: flex;
267+
flex-direction: column;
268+
justify-content: space-between;
269+
}
270+
266271
/* tooltips */
267272
.tooltip {
268273
display: inline-flex;
@@ -310,3 +315,31 @@ a.icon {
310315
.tooltip:disabled:before {
311316
content: "You must first input valid text.";
312317
}
318+
319+
/* link underline effect */
320+
a.underline-hover {
321+
position: relative;
322+
text-decoration: none;
323+
color: var(--text);
324+
margin-top: 2em;
325+
display: inline-flex;
326+
align-items: center;
327+
gap: 0.25em;
328+
}
329+
.underline-hover::before {
330+
content: "";
331+
position: absolute;
332+
bottom: 0;
333+
right: 0;
334+
width: 0;
335+
height: 1px;
336+
background-color: var(--blue-light);
337+
transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
338+
}
339+
@media (hover: hover) and (pointer: fine) {
340+
.underline-hover:hover::before {
341+
left: 0;
342+
right: auto;
343+
width: 100%;
344+
}
345+
}

src/demo/index.php

Lines changed: 40 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -106,37 +106,50 @@ function gtag() {
106106
</form>
107107
</div>
108108

109-
<div class="output">
110-
<h2>Preview</h2>
111-
112-
<img alt="Readme Typing SVG" src="/?lines=The+five+boxing+wizards+jump+quickly" onload="this.classList.remove('loading')" onerror="this.classList.remove('loading')" />
113-
<div class="loader">Loading...</div>
114-
115-
<label class="show-border">
116-
<input type="checkbox">
117-
Show border
118-
</label>
119-
120-
<div>
121-
<h2>Markdown</h2>
122-
<div class="code-container md">
123-
<code></code>
109+
<div class="output top-bottom-split">
110+
<div class="top">
111+
<h2>Preview</h2>
112+
113+
<img alt="Readme Typing SVG" src="/?lines=The+five+boxing+wizards+jump+quickly" onload="this.classList.remove('loading')" onerror="this.classList.remove('loading')" />
114+
<div class="loader">Loading...</div>
115+
116+
<label class="show-border">
117+
<input type="checkbox">
118+
Show border
119+
</label>
120+
121+
<div>
122+
<h2>Markdown</h2>
123+
<div class="code-container md">
124+
<code></code>
125+
</div>
126+
127+
<button class="copy-button btn tooltip" onclick="clipboard.copy(this);" onmouseout="tooltip.reset(this);" disabled>
128+
Copy To Clipboard
129+
</button>
124130
</div>
125131

126-
<button class="copy-button btn tooltip" onclick="clipboard.copy(this);" onmouseout="tooltip.reset(this);" disabled>
127-
Copy To Clipboard
128-
</button>
129-
</div>
132+
<div>
133+
<h2>HTML</h2>
134+
<div class="code-container html">
135+
<code></code>
136+
</div>
130137

131-
<div>
132-
<h2>HTML</h2>
133-
<div class="code-container html">
134-
<code></code>
138+
<button class="copy-button btn tooltip" onclick="clipboard.copy(this);" onmouseout="tooltip.reset(this);" disabled>
139+
Copy To Clipboard
140+
</button>
135141
</div>
136-
137-
<button class="copy-button btn tooltip" onclick="clipboard.copy(this);" onmouseout="tooltip.reset(this);" disabled>
138-
Copy To Clipboard
139-
</button>
142+
</div>
143+
<div class="bottom">
144+
<a href="https://github.com/DenverCoder1/readme-typing-svg/blob/main/docs/faq.md" target="_blank" class="underline-hover faq">
145+
Frequently Asked Questions
146+
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg">
147+
<g>
148+
<path fill="none" d="M0 0h24v24H0z"></path>
149+
<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>
150+
</g>
151+
</svg>
152+
</a>
140153
</div>
141154
</div>
142155
</div>

0 commit comments

Comments
 (0)