-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fully connect text editor & markdown rendering
- Fix using Heading for home link, that's not recommended for accessibility, the h1 should be the title of the specific page's content - Add support for manually overriding the aesthetic level & component names that a heading uses - Make block headers an hgroup - Search inside hgroups for finding the correct heading level - Fix Component.replaceElement not moving over text node children - Clear text editor draft on submit - Make the page user-scalable because that's an accessibility issue (can apparently prevent zoom on ios with big font size) - Support new API text body stuff for author descriptions
- Loading branch information
1 parent
0237f7a
commit aa1b449
Showing
19 changed files
with
314 additions
and
104 deletions.
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,10 +1,22 @@ | ||
import type { Author } from "api.fluff4.me" | ||
import type { AuthorFull } from "api.fluff4.me" | ||
import Component from "ui/Component" | ||
import Block from "ui/component/core/Block" | ||
|
||
export default Component.Builder((component, author: Author) => { | ||
export default Component.Builder((component, author: AuthorFull) => { | ||
component.style("author") | ||
|
||
const block = component.and(Block) | ||
block.title.text.set(author.name) | ||
block.description.text.set(`@${author.vanity}`) | ||
block.title | ||
.style("author-name") | ||
.text.set(author.name) | ||
block.description | ||
.style("author-vanity") | ||
.text.set(`@${author.vanity}`) | ||
|
||
Component() | ||
.style("author-description") | ||
.setMarkdownContent(author.description.body) | ||
.appendTo(block) | ||
|
||
return block | ||
}) |
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.