Skip to content
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

Favicon #9

Open
VSharapov opened this issue Dec 19, 2020 · 4 comments
Open

Favicon #9

VSharapov opened this issue Dec 19, 2020 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@VSharapov
Copy link
Owner

SVG of the first character of the title (based on first element innerText) would be real cute.
https://css-tricks.com/svg-favicons-and-all-the-fun-things-we-can-do-with-them/

@VSharapov
Copy link
Owner Author

Ooh, if possible, it would be neat to change the favicon text to the innerText of the last element, iff it is exactly one character long. So you could smack an emoji at the end of your document and that would be the icon.

@VSharapov VSharapov reopened this Dec 21, 2020
@VSharapov
Copy link
Owner Author

...iff it is exactly one character long

After some experimentation, it turns out this is a bit trickier than expected.

@VSharapov VSharapov added enhancement New feature or request help wanted Extra attention is needed labels Dec 21, 2020
@VSharapov
Copy link
Owner Author

VSharapov commented Dec 22, 2020

There is a solution, but ...
https://github.com/orling/grapheme-splitter/blob/master/index.js#L333
...I find it just a bit inelegant.

If anyone knows a solution as elegant as String('👩‍👩‍👧‍👧').graphemeLength == 1 (instead of 9001 lines of range comparisons) I'll gladly implement this.

@VSharapov
Copy link
Owner Author

VSharapov commented Jan 15, 2021

Oh snap, I think I got it, html can be inset in markdow, right? Including comments? I'm thinking:

<!-- favicon=text --> 

...where text can be anything...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant