Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
userdocs committed Mar 18, 2024
1 parent ee8afb4 commit 90bf18d
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 6 deletions.
28 changes: 25 additions & 3 deletions docs/src/components/tooltipTippy.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,20 @@ import "tippy.js/dist/backdrop.css";
import "tippy.js/animations/shift-away.css";
---

<style is:global>
.tippy-box[data-theme~="myLightTheme"] {
background-color: rgb(187, 151, 190) !important;
color: rgb(0, 0, 0) !important;
}

.tippy-box[data-theme~="myDarkTheme"] {
background-color: #543768 !important;
color: rgb(219, 219, 213) !important;
}
</style>

<a
class="tooltippy-link"
class="tooltippy tooltippy-link"
data-tippy-content={htmlSplit[0] +
'<hr class="tooltippy-line"><div class="tooltippy-div">🟩 <a class="tooltippy-link" href=' +
glossaryUrl +
Expand All @@ -28,20 +40,30 @@ import "tippy.js/animations/shift-away.css";
animateFill,
inlinePositioning,
} from "tippy.js";

const theme = document.documentElement.dataset.theme;

console.log(theme);

let tippyTheme;
if (theme === "light") {
tippyTheme = "myLightTheme";
} else if (theme === "dark") {
tippyTheme = "myDarkTheme";
}

tippy("[data-tippy-content]", {
arrow: false,
allowHTML: true,
interactive: true,
animateFill: true,
animateFill: false,
followCursor: false,
inlinePositioning: true,
plugins: [followCursor, animateFill, inlinePositioning],
zIndex: 9999,
appendTo: () => document.body,
trigger: "click",
theme: theme,
placement: "bottom",
theme: tippyTheme,
});
</script>
2 changes: 1 addition & 1 deletion docs/src/content/docs/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ not a dynamic executable
</TabItem>
<TabItem label="Alpine Linux">

The script creates a fully static `qbittorrent-nox` binary using <Tooltip id="muslc" label="musl libc"/> <Modal id="muslc" label="musl libc"/>
The script creates a fully static `qbittorrent-nox` binary using <Tooltip id="muslc" label="musl libc"/>

The final result will show this when using `ldd`

Expand Down
7 changes: 7 additions & 0 deletions docs/src/content/docs/test.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ hide_title: true
import { Advanced, Details, Modal, Tooltip, Charts, Important } from "/src/components/global.jsx"
import { Steps, Tabs, TabItem, Card, CardGrid, LinkCard, Aside, Icon } from '@astrojs/starlight/components';

<Tooltip id="bash" label="bash" />
<Tooltip id="buildjet" label="buildjet"/>
<Tooltip id="muslc" label="musl libc"/>
<Tooltip id="glibc" label="glibc"/>
<Tooltip id="github-actions" label="Github Actions"/>
<Modal id="bash" label="bash"/>

<Details>
## 2142121

Expand Down
4 changes: 2 additions & 2 deletions docs/src/styles/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@

--details-1: #a0b494;
--details-2: #4c0879;
--details-3: #007d6d;
--details-3: rgb(187, 151, 190);

--url-colour: #aa4bb3;
--url-colour: #d020e0;
--url-colour-hover: #54c59f;

--code-inline-background: #54c59f;
Expand Down

0 comments on commit 90bf18d

Please sign in to comment.