-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from UnsignedArduino/staging
Help guide for installing extensions, optimize tooltips
- Loading branch information
Showing
15 changed files
with
330 additions
and
79 deletions.
There are no files selected for viewing
Binary file added
BIN
+23.6 KB
src/assets/images/help/adding-extensions/copying-riknoll-arcade-mini-menu-url.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+25.6 KB
src/assets/images/help/adding-extensions/extension-button-in-toolbox-hover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+30.7 KB
...ssets/images/help/adding-extensions/riknoll-arcade-mini-menu-extension-card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+110 KB
src/assets/images/help/adding-extensions/riknoll-arcade-mini-menu-toolbox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
import { StaticImport } from "next/dist/shared/lib/get-img-props"; | ||
import Image from "next/image"; | ||
import React from "react"; | ||
import { BootstrapLibContext } from "@/pages/_app"; | ||
import Tippy from "@tippyjs/react"; | ||
|
||
export default function ClickableFigure({ | ||
id, | ||
src, | ||
alt, | ||
caption, | ||
}: { | ||
id: string; | ||
src: string | StaticImport; | ||
alt: string; | ||
caption: string | React.ReactNode; | ||
}) { | ||
const bootstrapLib = React.useContext(BootstrapLibContext); | ||
|
||
return ( | ||
<div> | ||
<figure className="figure"> | ||
<Tippy content="Click to expand"> | ||
<Image | ||
src={src} | ||
className="figure-img img-fluid rounded" | ||
style={{ width: "50%", height: "50%" }} | ||
alt={alt} | ||
onClick={() => { | ||
if (bootstrapLib !== null) { | ||
const modal = bootstrapLib.Modal.getOrCreateInstance( | ||
`#${id}Modal`, | ||
); | ||
modal.show(); | ||
} | ||
}} | ||
/> | ||
</Tippy> | ||
<figcaption className="figure-caption">{caption}</figcaption> | ||
</figure> | ||
<div | ||
className="modal fade" | ||
id={`${id}Modal`} | ||
tabIndex={-1} | ||
aria-labelledby={`${id}ModalLabel`} | ||
aria-hidden="true" | ||
> | ||
<div className="modal-dialog modal-xl modal-dialog-centered modal-dialog-scrollable"> | ||
<div className="modal-content"> | ||
<div className="modal-header"> | ||
<h1 className="modal-title fs-5" id={`${id}ModalLabel`}> | ||
Enlarged image | ||
</h1> | ||
<button | ||
type="button" | ||
className="btn-close" | ||
data-bs-dismiss="modal" | ||
aria-label="Close" | ||
></button> | ||
</div> | ||
<div className="modal-body text-center"> | ||
<figure className="figure"> | ||
<Image | ||
src={src} | ||
className="figure-img img-fluid rounded" | ||
alt={alt} | ||
/> | ||
<figcaption className="figure-caption">{caption}</figcaption> | ||
</figure> | ||
</div> | ||
<div className="modal-footer"> | ||
<button | ||
type="button" | ||
className="btn btn-secondary" | ||
data-bs-dismiss="modal" | ||
> | ||
Close | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.