-
-
Notifications
You must be signed in to change notification settings - Fork 93
Replaced Tailwind with Bootstrap #3224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+1,717
−1,369
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
1cda815
Started working on replacing tailwind with bootstrap
AndreasArvidsson 0dc841a
more styles
AndreasArvidsson bd5b468
Docs
AndreasArvidsson 05b67fd
docs
AndreasArvidsson 27c7a59
2c49bce
tutorial
AndreasArvidsson 038b5c3
More fixes
AndreasArvidsson 5506a14
cheatsheet
AndreasArvidsson 7c7eac9
Fix
AndreasArvidsson 6b4ab60
lock
AndreasArvidsson f8988e8
lint fix
AndreasArvidsson aecbada
Fixed test
AndreasArvidsson 640f3f2
purgecss
AndreasArvidsson b514c5a
Preact aliases
AndreasArvidsson 5325702
Renamed folder
AndreasArvidsson 5430dd3
fixes
AndreasArvidsson f9e045c
Style landing page
AndreasArvidsson 38eb3ed
Use bootstrap scss
AndreasArvidsson 768ee21
Some clean up
AndreasArvidsson 9da0ea0
remove Cursorless org directory before assembling
AndreasArvidsson 4d654f7
Added x
AndreasArvidsson 00c4ea8
Added comment
AndreasArvidsson 051adc2
Replace fortawesome with react-bootstrap-icons
AndreasArvidsson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
3 changes: 0 additions & 3 deletions
3
packages/cheatsheet-local/src/environments/environment.prod.ts
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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 @@ | ||
| @import "bootstrap/dist/css/bootstrap.min.css"; |
2 changes: 1 addition & 1 deletion
2
...ges/cheatsheet-local/src/app/app.spec.tsx → ...es/cheatsheet-local/src/test/app.spec.tsx
This file contains hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| export * from "./lib/CheatsheetPage"; | ||
| export * from "./lib/CheatsheetInfo"; | ||
| export * from "./lib/fakeCheatsheetInfo"; | ||
| export * from "./lib/Cheatsheet"; | ||
| export * from "./lib/cheatsheet.types"; | ||
| export * from "./lib/utils/fakeCheatsheetInfo"; | ||
| export { default as defaultCheatsheetInfo } from "./lib/sampleSpokenFormInfos/defaults.json"; |
This file contains hidden or 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,63 @@ | ||
| import { useEffect } from "preact/hooks"; | ||
| import { QuestionCircleFill } from "react-bootstrap-icons"; | ||
| import "./cheatsheet.css"; | ||
| import type { CheatsheetInfo } from "./cheatsheet.types"; | ||
| import CheatsheetLegendSection from "./CheatsheetLegendSection"; | ||
| import CheatsheetListSection from "./CheatsheetListSection"; | ||
| import CheatsheetNotesSection from "./CheatsheetNotesSection"; | ||
| import { applyBootstrapTheme } from "./utils/applyBootstrapTheme"; | ||
| import { cheatsheetLegendData } from "./utils/cheatsheetLegendData"; | ||
| import SmartLink from "./utils/SmartLink"; | ||
|
|
||
| type Props = { | ||
| cheatsheetInfo: CheatsheetInfo; | ||
| }; | ||
|
|
||
| export function Cheatsheet({ cheatsheetInfo }: Props) { | ||
| useEffect(() => { | ||
| return applyBootstrapTheme(); | ||
| }, []); | ||
|
|
||
| return ( | ||
| <main className="cheatsheet"> | ||
| <div className="container-xxl pb-2"> | ||
| <Title /> | ||
| <CheatsheetSections cheatsheetInfo={cheatsheetInfo} /> | ||
| </div> | ||
| </main> | ||
| ); | ||
| } | ||
|
|
||
| function Title() { | ||
| return ( | ||
| <div className="col-12 text-center mb-3"> | ||
| <h1> | ||
| Cursorless Cheatsheet{" "} | ||
| <SmartLink to="#legend"> | ||
| <QuestionCircleFill className="question-icon" /> | ||
| </SmartLink> | ||
| <small> | ||
| See the{" "} | ||
| <SmartLink to={"https://www.cursorless.org/docs/"}> | ||
| full documentation | ||
| </SmartLink>{" "} | ||
| to learn more. | ||
| </small> | ||
| </h1> | ||
| </div> | ||
| ); | ||
| } | ||
|
|
||
| function CheatsheetSections({ cheatsheetInfo }: Props) { | ||
| return ( | ||
| <div className="cheatsheet-sections"> | ||
| {cheatsheetInfo.sections | ||
| .filter((section) => section.items.length > 0) | ||
| .map((section) => ( | ||
| <CheatsheetListSection key={section.id} section={section} /> | ||
| ))} | ||
| <CheatsheetLegendSection data={cheatsheetLegendData} /> | ||
| <CheatsheetNotesSection /> | ||
| </div> | ||
| ); | ||
| } |
This file contains hidden or 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,62 @@ | ||
| import type { JSX } from "preact"; | ||
| import type { CheatsheetLegend } from "./cheatsheet.types"; | ||
| import { formatCaptures } from "./utils/formatCaptures"; | ||
| import SmartLink from "./utils/SmartLink"; | ||
| import useIsHighlighted from "./utils/useIsHighlighted"; | ||
|
|
||
| type Props = { | ||
| data: CheatsheetLegend; | ||
| }; | ||
|
|
||
| export default function CheatsheetLegendSection({ data }: Props): JSX.Element { | ||
| const isHighlighted = useIsHighlighted("legend"); | ||
|
|
||
| return ( | ||
| <section | ||
| id="legend" | ||
| className={"card bg-info" + (isHighlighted ? " highlighted" : "")} | ||
| > | ||
| <div className="card-header"> | ||
| <h2>Legend</h2> | ||
| </div> | ||
| <div className="card-body"> | ||
| <table className="table table-striped"> | ||
| <thead> | ||
| <tr> | ||
| <th>Term</th> | ||
| <th>Definition</th> | ||
| </tr> | ||
| </thead> | ||
| <tbody> | ||
| {data.map(({ term, definition, link, linkName, id }) => ( | ||
| <tr key={id}> | ||
| <td>{formatCaptures(`<${term}>`)}</td> | ||
| <td>{renderDefinition(definition, link, linkName)}</td> | ||
| </tr> | ||
| ))} | ||
| </tbody> | ||
| </table> | ||
| </div> | ||
| </section> | ||
| ); | ||
| } | ||
|
|
||
| function renderDefinition( | ||
| definition: string, | ||
| link?: string, | ||
| linkName?: string, | ||
| ) { | ||
| if (link == null) { | ||
| return definition; | ||
| } | ||
| if (linkName == null) { | ||
| return <SmartLink to={link}>{definition}</SmartLink>; | ||
| } | ||
| return ( | ||
| <> | ||
| <SmartLink to={link}>{linkName}</SmartLink> | ||
| | ||
| {definition} | ||
| </> | ||
| ); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.