You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically we just need the same functionality here, maybe using --color-prism-bg for the background color though I think we can just make it a basic Light DOM component instead of having to rely on JavaScript.
// src/components/edit-on-github/edit-on-github.jsimportstylesfrom'./edit-on-github.module.css';constREPO_PREFIX='https://github.com/ProjectEvergreen/www.greenwoodjs.dev/tree/main/www/pages/';functionconvertRouteToSubLink(route){// clean up leading forward slashreturn ...;}exportdefaultclassEditOnGitHubextendsHTMLElement{connectedCallback(){constroute=this.getAttribute('route');constsubLink=convertRouteToSubLink(route);this.innerHTML=` <div class="${styles.container}"> <a title="Edit on GitHub" href="${REPO_PREFIX}${subLink}" target="_blank">Edit on GitHub</a> </div> `}}customElements.define('app-edit-on-github',EditOnGitHub);
We should also add a basic Storybook and test case to validate the static output.
The text was updated successfully, but these errors were encountered:
Summary
On the old website, we had an "Edit on GitHub" at the bottom of a number of pages, which when clicked would link to the file in the GitHub repo.

Details
Basically we just need the same functionality here, maybe using
--color-prism-bg
for the background color though I think we can just make it a basic Light DOM component instead of having to rely on JavaScript.We should also add a basic Storybook and test case to validate the static output.
The text was updated successfully, but these errors were encountered: