Skip to content

Commit

Permalink
Partial support to external link
Browse files Browse the repository at this point in the history
  • Loading branch information
marcodpt committed Aug 19, 2024
1 parent cd6daab commit 92a5f4a
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 48 deletions.
102 changes: 68 additions & 34 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,11 @@
References
</a>
<ul class="dropdown-menu">
<li data-paw-path="Icons">
<li>
<a
href="https://fontawesome.com/search?o=r&amp;m=free&amp;s=solid"
target="_blank"
class="dropdown-item"
data-paw-active="active"
title="FontAwesome Solid Icons."
>
<span
Expand All @@ -166,15 +165,17 @@
>
<i class="fa-solid fa-icons"></i>
Icons
<sup>
<i class="small fa-solid fa-arrow-up-right-from-square"></i>
</sup>
</span>
</a>
</li>
<li data-paw-path="Brands">
<li>
<a
href="https://fontawesome.com/search?o=r&amp;m=free&amp;f=brands"
target="_blank"
class="dropdown-item"
data-paw-active="active"
title="FontAwesome Brands Icons."
>
<span
Expand All @@ -183,15 +184,17 @@
>
<i class="fa-solid fa-copyright"></i>
Brands
<sup>
<i class="small fa-solid fa-arrow-up-right-from-square"></i>
</sup>
</span>
</a>
</li>
<li data-paw-path="Bootstrap">
<li>
<a
href="https://getbootstrap.com/docs/5.3/getting-started/introduction/"
target="_blank"
class="dropdown-item"
data-paw-active="active"
title="Bootstrap 5.3 documentation."
>
<span
Expand All @@ -200,15 +203,17 @@
>
<i class="fa-brands fa-bootstrap"></i>
Bootstrap
<sup>
<i class="small fa-solid fa-arrow-up-right-from-square"></i>
</sup>
</span>
</a>
</li>
<li data-paw-path="Bootswatch">
<li>
<a
href="https://bootswatch.com/"
target="_blank"
class="dropdown-item"
data-paw-active="active"
title="Bootstrap themes available."
>
<span
Expand All @@ -217,15 +222,17 @@
>
<i class="fa-solid fa-palette"></i>
Bootswatch
<sup>
<i class="small fa-solid fa-arrow-up-right-from-square"></i>
</sup>
</span>
</a>
</li>
<li data-paw-path="JSON Schema">
<li>
<a
href="https://www.learnjsonschema.com/2020-12/validation/"
target="_blank"
class="dropdown-item"
data-paw-active="active"
title="JSON Schema 2020-12 reference."
>
<span
Expand All @@ -234,15 +241,17 @@
>
<i class="fa-solid fa-circle-check"></i>
JSON Schema
<sup>
<i class="small fa-solid fa-arrow-up-right-from-square"></i>
</sup>
</span>
</a>
</li>
<li data-paw-path="HTML5 Boilerplate">
<li>
<a
href="https://html5boilerplate.com/"
target="_blank"
class="dropdown-item"
data-paw-active="active"
title="Good reference on best practices in HTML pages."
>
<span
Expand All @@ -251,15 +260,17 @@
>
<i class="fa-solid fa-star"></i>
HTML5 Boilerplate
<sup>
<i class="small fa-solid fa-arrow-up-right-from-square"></i>
</sup>
</span>
</a>
</li>
<li data-paw-path="highlight.js">
<li>
<a
href="https://highlightjs.org/"
target="_blank"
class="dropdown-item"
data-paw-active="active"
title="Syntax Highlight used in this docs."
>
<span
Expand All @@ -268,15 +279,17 @@
>
<i class="fa-solid fa-code"></i>
highlight.js
<sup>
<i class="small fa-solid fa-arrow-up-right-from-square"></i>
</sup>
</span>
</a>
</li>
<li data-paw-path="Cytoscape.js">
<li>
<a
href="https://js.cytoscape.org/"
target="_blank"
class="dropdown-item"
data-paw-active="active"
title="Graph component dependency."
>
<span
Expand All @@ -285,15 +298,17 @@
>
<i class="fa-solid fa-project-diagram"></i>
Cytoscape.js
<sup>
<i class="small fa-solid fa-arrow-up-right-from-square"></i>
</sup>
</span>
</a>
</li>
<li data-paw-path="Chart.js">
<li>
<a
href="https://www.chartjs.org/"
target="_blank"
class="dropdown-item"
data-paw-active="active"
title="Chart component dependency."
>
<span
Expand All @@ -302,15 +317,17 @@
>
<i class="fa-solid fa-chart-line"></i>
Chart.js
<sup>
<i class="small fa-solid fa-arrow-up-right-from-square"></i>
</sup>
</span>
</a>
</li>
<li data-paw-path="JsBarcode">
<li>
<a
href="https://lindell.me/JsBarcode/"
target="_blank"
class="dropdown-item"
data-paw-active="active"
title="Barcode component dependency."
>
<span
Expand All @@ -319,15 +336,17 @@
>
<i class="fa-solid fa-barcode"></i>
JsBarcode
<sup>
<i class="small fa-solid fa-arrow-up-right-from-square"></i>
</sup>
</span>
</a>
</li>
<li data-paw-path="Leaflet">
<li>
<a
href="https://leafletjs.com/"
target="_blank"
class="dropdown-item"
data-paw-active="active"
title="Map component dependency."
>
<span
Expand All @@ -336,15 +355,17 @@
>
<i class="fa-solid fa-earth-americas"></i>
Leaflet
<sup>
<i class="small fa-solid fa-arrow-up-right-from-square"></i>
</sup>
</span>
</a>
</li>
<li data-paw-path="QUnit">
<li>
<a
href="https://qunitjs.com/api/"
target="_blank"
class="dropdown-item"
data-paw-active="active"
title="The testing tool used in this project."
>
<span
Expand All @@ -353,15 +374,17 @@
>
<i class="fa-solid fa-flask"></i>
QUnit
<sup>
<i class="small fa-solid fa-arrow-up-right-from-square"></i>
</sup>
</span>
</a>
</li>
<li data-paw-path="FontIcon">
<li>
<a
href="https://gauger.io/fonticon/"
target="_blank"
class="dropdown-item"
data-paw-active="active"
title="An online tool to generate favicon.ico"
>
<span
Expand All @@ -370,15 +393,17 @@
>
<i class="fa-solid fa-heart"></i>
FontIcon
<sup>
<i class="small fa-solid fa-arrow-up-right-from-square"></i>
</sup>
</span>
</a>
</li>
<li data-paw-path="bundlejs">
<li>
<a
href="https://bundlejs.com/"
target="_blank"
class="dropdown-item"
data-paw-active="active"
title="An online tool to bundle and minify javascript modules."
>
<span
Expand All @@ -387,15 +412,17 @@
>
<i class="fa-solid fa-box"></i>
bundlejs
<sup>
<i class="small fa-solid fa-arrow-up-right-from-square"></i>
</sup>
</span>
</a>
</li>
<li data-paw-path="HTML5 Reference">
<li>
<a
href="https://www.w3schools.com/TAGS/default.asp"
target="_blank"
class="dropdown-item"
data-paw-active="active"
title="An online HTML reference."
>
<span
Expand All @@ -404,15 +431,17 @@
>
<i class="fa-solid fa-graduation-cap"></i>
HTML5 Reference
<sup>
<i class="small fa-solid fa-arrow-up-right-from-square"></i>
</sup>
</span>
</a>
</li>
<li data-paw-path="Unicode Party">
<li>
<a
href="https://unicode.party/"
target="_blank"
class="dropdown-item"
data-paw-active="active"
title="An online emoji search engine."
>
<span
Expand All @@ -421,17 +450,19 @@
>
<i class="fa-solid fa-face-smile"></i>
Unicode Party
<sup>
<i class="small fa-solid fa-arrow-up-right-from-square"></i>
</sup>
</span>
</a>
</li>
</ul>
</li>
<li class="nav-item" data-paw-path="Repository">
<li class="nav-item">
<a
href="https://github.com/marcodpt/paw"
target="_blank"
class="nav-link"
data-paw-active="active"
title="Github repository of this project."
>
<span
Expand All @@ -440,6 +471,9 @@
>
<i class="fa-brands fa-github"></i>
Repository
<sup>
<i class="small fa-solid fa-arrow-up-right-from-square"></i>
</sup>
</span>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion src/hyperscript/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const print = (X, ident) => {
) {
return s+`${C[0]}</${tagName}>`
} else {
const content = children.map(
const content = C.map(
child => print(child, ident+' ')
).join('\n')
return s+'\n'+content+'\n'+ident+`</${tagName}>`
Expand Down
4 changes: 2 additions & 2 deletions views/settings/crawler.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default (home, {navLinks, footerLinks, devRef}) => {
li,
a: li.querySelector('a')
})).map(({li, a}) => ({
title: li.getAttribute('data-paw-path'),
title: li.querySelector('a').textContent.trim(),
description: a?.getAttribute('title') || '',
icon: readIcon(a?.querySelector('i')),
href: a?.getAttribute('href'),
Expand All @@ -109,7 +109,7 @@ export default (home, {navLinks, footerLinks, devRef}) => {
li,
a: li.querySelector('a')
})).map(({li, a, icon}) => ({
title: li.getAttribute('data-paw-path'),
title: li.textContent.trim(),
description: a?.getAttribute('title') || '',
icon: readIcon(a?.querySelector('i')),
href: a?.getAttribute('href')
Expand Down
Loading

0 comments on commit 92a5f4a

Please sign in to comment.