summaryrefslogtreecommitdiff
path: root/examples/docs/src
diff options
context:
space:
mode:
authorGravatar Princesseuh <Princesseuh@users.noreply.github.com> 2022-11-08 18:39:22 +0000
committerGravatar fredkbot <fred+astrobot@astro.build> 2022-11-08 18:39:22 +0000
commitdcdeca56acb6c03d4868ece51ef4611e7598e270 (patch)
treef8731cc4f82f335c00a4a9a7f4b573d277b84a3e /examples/docs/src
parent0dcdc6fb1e6160c8a225a65c4810f565e2b673b5 (diff)
downloadastro-dcdeca56acb6c03d4868ece51ef4611e7598e270.tar.gz
astro-dcdeca56acb6c03d4868ece51ef4611e7598e270.tar.zst
astro-dcdeca56acb6c03d4868ece51ef4611e7598e270.zip
[ci] format
Diffstat (limited to 'examples/docs/src')
-rw-r--r--examples/docs/src/components/Footer/AvatarList.astro44
-rw-r--r--examples/docs/src/components/HeadCommon.astro4
-rw-r--r--examples/docs/src/components/LeftSidebar/LeftSidebar.astro40
-rw-r--r--examples/docs/src/components/RightSidebar/MoreMenu.astro100
4 files changed, 98 insertions, 90 deletions
diff --git a/examples/docs/src/components/Footer/AvatarList.astro b/examples/docs/src/components/Footer/AvatarList.astro
index 5926936d6..b75589f5a 100644
--- a/examples/docs/src/components/Footer/AvatarList.astro
+++ b/examples/docs/src/components/Footer/AvatarList.astro
@@ -72,27 +72,31 @@ const additionalContributors = unique.length - recentContributors.length; // lis
<!-- Thanks to @5t3ph for https://smolcss.dev/#smol-avatar-list! -->
<div class="contributors">
<ul class="avatar-list" style={`--avatar-count: ${recentContributors.length}`}>
- {recentContributors.map((item) => (
- <li>
- <a href={`https://github.com/${item.login}`}>
- <img
- alt={`Contributor ${item.login}`}
- title={`Contributor ${item.login}`}
- width="64"
- height="64"
- src={`https://avatars.githubusercontent.com/u/${item.id}`}
- />
- </a>
- </li>
- ))}
+ {
+ recentContributors.map((item) => (
+ <li>
+ <a href={`https://github.com/${item.login}`}>
+ <img
+ alt={`Contributor ${item.login}`}
+ title={`Contributor ${item.login}`}
+ width="64"
+ height="64"
+ src={`https://avatars.githubusercontent.com/u/${item.id}`}
+ />
+ </a>
+ </li>
+ ))
+ }
</ul>
- {additionalContributors > 0 && (
- <span>
- <a href={commitsURL}>{`and ${additionalContributors} additional contributor${
- additionalContributors > 1 ? 's' : ''
- }.`}</a>
- </span>
- )}
+ {
+ additionalContributors > 0 && (
+ <span>
+ <a href={commitsURL}>{`and ${additionalContributors} additional contributor${
+ additionalContributors > 1 ? 's' : ''
+ }.`}</a>
+ </span>
+ )
+ }
{unique.length === 0 && <a href={commitsURL}>Contributors</a>}
</div>
diff --git a/examples/docs/src/components/HeadCommon.astro b/examples/docs/src/components/HeadCommon.astro
index 3551e5489..d77e4a90c 100644
--- a/examples/docs/src/components/HeadCommon.astro
+++ b/examples/docs/src/components/HeadCommon.astro
@@ -21,9 +21,7 @@ import '../styles/index.css';
/>
<!-- Scrollable a11y code helper -->
-<script src="/make-scrollable-code-focusable.js" is:inline>
-
-</script>
+<script src="/make-scrollable-code-focusable.js" is:inline></script>
<!-- This is intentionally inlined to avoid FOUC -->
<script is:inline>
diff --git a/examples/docs/src/components/LeftSidebar/LeftSidebar.astro b/examples/docs/src/components/LeftSidebar/LeftSidebar.astro
index 33af79463..33433f5be 100644
--- a/examples/docs/src/components/LeftSidebar/LeftSidebar.astro
+++ b/examples/docs/src/components/LeftSidebar/LeftSidebar.astro
@@ -16,25 +16,27 @@ const sidebar = SIDEBAR[langCode];
<nav aria-labelledby="grid-left">
<ul class="nav-groups">
- {Object.entries(sidebar).map(([header, children]) => (
- <li>
- <div class="nav-group">
- <h2>{header}</h2>
- <ul>
- {children.map((child) => {
- const url = Astro.site?.pathname + child.link;
- return (
- <li class="nav-link">
- <a href={url} aria-current={currentPageMatch === child.link ? 'page' : false}>
- {child.text}
- </a>
- </li>
- );
- })}
- </ul>
- </div>
- </li>
- ))}
+ {
+ Object.entries(sidebar).map(([header, children]) => (
+ <li>
+ <div class="nav-group">
+ <h2>{header}</h2>
+ <ul>
+ {children.map((child) => {
+ const url = Astro.site?.pathname + child.link;
+ return (
+ <li class="nav-link">
+ <a href={url} aria-current={currentPageMatch === child.link ? 'page' : false}>
+ {child.text}
+ </a>
+ </li>
+ );
+ })}
+ </ul>
+ </div>
+ </li>
+ ))
+ }
</ul>
</nav>
diff --git a/examples/docs/src/components/RightSidebar/MoreMenu.astro b/examples/docs/src/components/RightSidebar/MoreMenu.astro
index 8fcbfa567..655f8eac1 100644
--- a/examples/docs/src/components/RightSidebar/MoreMenu.astro
+++ b/examples/docs/src/components/RightSidebar/MoreMenu.astro
@@ -12,54 +12,58 @@ const showMoreSection = CONFIG.COMMUNITY_INVITE_URL;
{showMoreSection && <h2 class="heading">More</h2>}
<ul>
- {editHref && (
- <li class={`heading-link depth-2`}>
- <a class="edit-on-github" href={editHref} target="_blank">
- <svg
- aria-hidden="true"
- focusable="false"
- data-prefix="fas"
- data-icon="pen"
- class="svg-inline--fa fa-pen fa-w-16"
- role="img"
- xmlns="http://www.w3.org/2000/svg"
- viewBox="0 0 512 512"
- height="1em"
- width="1em"
- >
- <path
- fill="currentColor"
- d="M290.74 93.24l128.02 128.02-277.99 277.99-114.14 12.6C11.35 513.54-1.56 500.62.14 485.34l12.7-114.22 277.9-277.88zm207.2-19.06l-60.11-60.11c-18.75-18.75-49.16-18.75-67.91 0l-56.55 56.55 128.02 128.02 56.55-56.55c18.75-18.76 18.75-49.16 0-67.91z"
- />
- </svg>
- <span>Edit this page</span>
- </a>
- </li>
- )}
- {CONFIG.COMMUNITY_INVITE_URL && (
- <li class={`heading-link depth-2`}>
- <a href={CONFIG.COMMUNITY_INVITE_URL} target="_blank">
- <svg
- aria-hidden="true"
- focusable="false"
- data-prefix="fas"
- data-icon="comment-alt"
- class="svg-inline--fa fa-comment-alt fa-w-16"
- role="img"
- xmlns="http://www.w3.org/2000/svg"
- viewBox="0 0 512 512"
- height="1em"
- width="1em"
- >
- <path
- fill="currentColor"
- d="M448 0H64C28.7 0 0 28.7 0 64v288c0 35.3 28.7 64 64 64h96v84c0 9.8 11.2 15.5 19.1 9.7L304 416h144c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64z"
- />
- </svg>
- <span>Join our community</span>
- </a>
- </li>
- )}
+ {
+ editHref && (
+ <li class={`heading-link depth-2`}>
+ <a class="edit-on-github" href={editHref} target="_blank">
+ <svg
+ aria-hidden="true"
+ focusable="false"
+ data-prefix="fas"
+ data-icon="pen"
+ class="svg-inline--fa fa-pen fa-w-16"
+ role="img"
+ xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 512 512"
+ height="1em"
+ width="1em"
+ >
+ <path
+ fill="currentColor"
+ d="M290.74 93.24l128.02 128.02-277.99 277.99-114.14 12.6C11.35 513.54-1.56 500.62.14 485.34l12.7-114.22 277.9-277.88zm207.2-19.06l-60.11-60.11c-18.75-18.75-49.16-18.75-67.91 0l-56.55 56.55 128.02 128.02 56.55-56.55c18.75-18.76 18.75-49.16 0-67.91z"
+ />
+ </svg>
+ <span>Edit this page</span>
+ </a>
+ </li>
+ )
+ }
+ {
+ CONFIG.COMMUNITY_INVITE_URL && (
+ <li class={`heading-link depth-2`}>
+ <a href={CONFIG.COMMUNITY_INVITE_URL} target="_blank">
+ <svg
+ aria-hidden="true"
+ focusable="false"
+ data-prefix="fas"
+ data-icon="comment-alt"
+ class="svg-inline--fa fa-comment-alt fa-w-16"
+ role="img"
+ xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 512 512"
+ height="1em"
+ width="1em"
+ >
+ <path
+ fill="currentColor"
+ d="M448 0H64C28.7 0 0 28.7 0 64v288c0 35.3 28.7 64 64 64h96v84c0 9.8 11.2 15.5 19.1 9.7L304 416h144c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64z"
+ />
+ </svg>
+ <span>Join our community</span>
+ </a>
+ </li>
+ )
+ }
</ul>
<div style="margin: 2rem 0; text-align: center;">
<ThemeToggleButton client:visible />