diff --git a/src/index.css b/src/content-scripts.css similarity index 100% rename from src/index.css rename to src/content-scripts.css diff --git a/src/components/InviteToOpenSauced/InviteToOpenSaucedButton.ts b/src/content-scripts/components/InviteToOpenSauced/InviteToOpenSaucedButton.ts similarity index 79% rename from src/components/InviteToOpenSauced/InviteToOpenSaucedButton.ts rename to src/content-scripts/components/InviteToOpenSauced/InviteToOpenSaucedButton.ts index 546f434d..b1de7f14 100644 --- a/src/components/InviteToOpenSauced/InviteToOpenSaucedButton.ts +++ b/src/content-scripts/components/InviteToOpenSauced/InviteToOpenSaucedButton.ts @@ -1,6 +1,6 @@ -import logoIcon from "../../assets/opensauced-icon.svg"; -import "../../index.css"; -import { createHtmlElement } from "../../utils/createHtmlElement"; +import logoIcon from "../../../assets/opensauced-icon.svg"; +import "../../content-scripts.css"; +import { createHtmlElement } from "../../../utils/createHtmlElement"; export const InviteToOpenSaucedButton = () => { const inviteToOpenSaucedButton = createHtmlElement("a", { diff --git a/src/components/InviteToOpenSauced/InviteToOpenSaucedModal.ts b/src/content-scripts/components/InviteToOpenSauced/InviteToOpenSaucedModal.ts similarity index 91% rename from src/components/InviteToOpenSauced/InviteToOpenSaucedModal.ts rename to src/content-scripts/components/InviteToOpenSauced/InviteToOpenSaucedModal.ts index 7982e4f2..455a2896 100644 --- a/src/components/InviteToOpenSauced/InviteToOpenSaucedModal.ts +++ b/src/content-scripts/components/InviteToOpenSauced/InviteToOpenSaucedModal.ts @@ -1,8 +1,8 @@ -import "../../index.css"; -import { createHtmlElement } from "../../utils/createHtmlElement"; -import emailSocialIcon from "../../assets/mail-icon.svg"; -import twitterSocialIcon from "../../assets/twitter-icon.svg"; -import linkedInSocailIcon from "../../assets/linkedin-icon.svg"; +import "../../content-scripts.css"; +import { createHtmlElement } from "../../../utils/createHtmlElement"; +import emailSocialIcon from "../../../assets/mail-icon.svg"; +import twitterSocialIcon from "../../../assets/twitter-icon.svg"; +import linkedInSocailIcon from "../../../assets/linkedin-icon.svg"; interface Socials { emailAddress?: string; diff --git a/src/components/ViewOnOpenSaucedButton/ViewOnOpenSaucedButton.ts b/src/content-scripts/components/ViewOnOpenSaucedButton/ViewOnOpenSaucedButton.ts similarity index 81% rename from src/components/ViewOnOpenSaucedButton/ViewOnOpenSaucedButton.ts rename to src/content-scripts/components/ViewOnOpenSaucedButton/ViewOnOpenSaucedButton.ts index 8489f670..15bd7b5e 100644 --- a/src/components/ViewOnOpenSaucedButton/ViewOnOpenSaucedButton.ts +++ b/src/content-scripts/components/ViewOnOpenSaucedButton/ViewOnOpenSaucedButton.ts @@ -1,6 +1,6 @@ -import logoIcon from "../../assets/opensauced-icon.svg"; -import "../../index.css"; -import { createHtmlElement } from "../../utils/createHtmlElement"; +import logoIcon from "../../../assets/opensauced-icon.svg"; +import "../../content-scripts.css"; +import { createHtmlElement } from "../../../utils/createHtmlElement"; export const ViewOnOpenSaucedButton = (username: string) => { const viewOnOpenSaucedButton = createHtmlElement("a", { diff --git a/src/content-scripts/content-scripts.css b/src/content-scripts/content-scripts.css new file mode 100644 index 00000000..591a2cd8 --- /dev/null +++ b/src/content-scripts/content-scripts.css @@ -0,0 +1,27 @@ +/* +style for content-scripts +not using tailwindcss base styles because it's interfering with the github page styles +*/ + +@tailwind components; +@tailwind utilities; + +* { + box-sizing: border-box; + margin: 0px; + padding: 0px; +} + +body { + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", + "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", + sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +code { + font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", + monospace; +} diff --git a/src/main.tsx b/src/main.tsx index 4a1b1509..92f78348 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,7 +1,7 @@ import React from 'react' import ReactDOM from 'react-dom/client' import App from './App' -import './index.css' +import './popup.css' ReactDOM.createRoot(document.getElementById('root')!).render( diff --git a/src/popup.css b/src/popup.css new file mode 100644 index 00000000..f51b059f --- /dev/null +++ b/src/popup.css @@ -0,0 +1,23 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +* { + box-sizing: border-box; + margin: 0px; + padding: 0px; +} + +body { + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", + "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", + sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +code { + font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", + monospace; +} diff --git a/src/utils/dom-utils/inviteToOpenSauced.ts b/src/utils/dom-utils/inviteToOpenSauced.ts index b53f36e9..c2201424 100644 --- a/src/utils/dom-utils/inviteToOpenSauced.ts +++ b/src/utils/dom-utils/inviteToOpenSauced.ts @@ -1,5 +1,5 @@ -import { InviteToOpenSaucedButton } from "../../components/InviteToOpenSauced/InviteToOpenSaucedButton"; -import { InviteToOpenSaucedModal } from "../../components/InviteToOpenSauced/InviteToOpenSaucedModal"; +import { InviteToOpenSaucedButton } from "../../content-scripts/components/InviteToOpenSauced/InviteToOpenSaucedButton"; +import { InviteToOpenSaucedModal } from "../../content-scripts/components/InviteToOpenSauced/InviteToOpenSaucedModal"; import { getTwitterUsername, getLinkedInUsername } from "../urlMatchers"; const injectOpenSaucedInviteButton = (username: string) => { diff --git a/src/utils/dom-utils/viewOnOpenSauced.ts b/src/utils/dom-utils/viewOnOpenSauced.ts index 70aa0961..d920f972 100644 --- a/src/utils/dom-utils/viewOnOpenSauced.ts +++ b/src/utils/dom-utils/viewOnOpenSauced.ts @@ -1,4 +1,4 @@ -import { ViewOnOpenSaucedButton } from "../../components/ViewOnOpenSaucedButton/ViewOnOpenSaucedButton"; +import { ViewOnOpenSaucedButton } from "../../content-scripts/components/ViewOnOpenSaucedButton/ViewOnOpenSaucedButton"; const injectViewOnOpenSaucedButton = (username: string) => { const viewOnOpenSaucedButton = ViewOnOpenSaucedButton(username);