Skip to content

Commit

Permalink
feat: add external link icon to sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
huijing committed May 3, 2024
1 parent 3e7a51b commit 6e75bf6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default defineConfig({
If you are using them in an Astro layout file, then the import would look like this for the build to not fail:

```
import '/node_modules/@interledger/docs-design-system/src/styles/green-theme.css';
import '/node_modules/@interledger/docs-design-system/src/styles/teal-theme.css';
```

We also have a number of documentation-specific helper components that can be imported and used where necessary. For these shared components, if you are using both `CodeBlock` and `Disclosure` on the same page, you can import them both like so:
Expand All @@ -29,7 +29,7 @@ import { CodeBlock, Disclosure } from "@interledger/docs-design-system";

For more information about importing things in Javascript, please refer to [import on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import).

The available shared components are documented at our [documentation style guide](https://interledger.tech).
The available shared components are documented at our [documentation style guide](https://interledger.net).

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@interledger/docs-design-system",
"version": "0.4.0",
"version": "0.5.0",
"type": "module",
"description": "Shared styles and components used across all Interledger Starlight documentation sites",
"exports": {
Expand Down
13 changes: 13 additions & 0 deletions src/styles/ilf-docs.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@
padding: var(--space-2xs) var(--sl-sidebar-item-padding-inline);
}

.sidebar-content [data-icon="external"]::after {
content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 18 18"><path stroke="hsl(221,8%,56%)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 3H3a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-4M11 1h6m0 0v6m0-6L7 11"/></svg>');
height: 0.75em;
width: 0.75em;
display: inline-block;
}

.sidebar-content a[aria-current="page"],
.sidebar-content a[aria-current="page"]:hover,
.sidebar-content a[aria-current="page"]:focus {
Expand Down Expand Up @@ -514,6 +521,12 @@ input:not([type="submit"]):not([type="file"]):focus {
}
}

@media screen and (min-width: 80rem) {
.expressive-code {
max-width: 48rem;
}
}

/* Footnote styles */
.footnotes.footnotes.footnotes {
margin-block-start: var(--space-l);
Expand Down

0 comments on commit 6e75bf6

Please sign in to comment.