diff --git a/frontend/src/components/App.css b/frontend/src/components/App.css new file mode 100644 index 0000000..48003a6 --- /dev/null +++ b/frontend/src/components/App.css @@ -0,0 +1,124 @@ +:root { + --main: #943ec5; + --grey: #9fa6b2; + --text: #4b5563; + --border: #ddd; + --issueBackground: #f8d7da; + --issueHover: #f4c1c6; + --issueBorder: #f5c6cb; + --issueText: #721c24; +} + +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; + font-size: 15px; +} + +.App { + min-height: 100vh; + display: flex; + flex-direction: column; +} + +.background { + position: fixed; + width: 100%; + height: 100%; + background: var(--grey); + background: linear-gradient( + 165deg, + rgba(87, 35, 117, 1) 0%, + rgba(148, 62, 197, 1) 55%, + rgba(211, 176, 231, 1) 100% + ); + z-index: -1; +} + +h1 { + margin: 0 0 12px 0; + font-weight: 600; + font-size: 19px; +} + +h2 { + margin: 0 0 4px 0; + font-weight: 600; + font-size: 17px; +} + +p { + margin: 12px 0 0 0; +} + +b { + font-weight: 600; +} + +img { + width: 100%; + border-radius: 6px; + border: 1px solid var(--border); + box-sizing: border-box; + display: block; + margin: 0 0 12px 0; +} + +@media screen and (max-width: 500px) { + .github { + width: 24px; + position: absolute; + top: 8px; + right: 8px; + } + + body { + font-size: 14px; + } + + .contentBlock { + padding: 18px; + margin: 0 0 18px 0; + } + + .centerBlockInner { + width: 650px; + margin: 12px 0 0 0; + } + + .logo { + width: 185px; + margin: 0 0 8px 0; + } + + h1 { + font-size: 16px; + } + + h2 { + margin: 0 0 3px 0; + font-size: 15px; + } + + .contentIcon { + flex: none; + margin: 0 18px 0 0; + width: 28px !important; + } + + td:first-child { + width: 70px; + } + + .boxWrap { + padding: 8px; + } + + input[type='text'] { + width: calc(100% - 65px); + } +} diff --git a/frontend/src/components/App.js b/frontend/src/components/App.js index f062a95..956339a 100644 --- a/frontend/src/components/App.js +++ b/frontend/src/components/App.js @@ -1,6 +1,6 @@ import Github from './Github'; import MainColumn from './MainColumn'; -import '../styles/App.css'; +import './App.css'; const App = () => (
diff --git a/frontend/src/components/Block.js b/frontend/src/components/Block.js index dc43139..1e35fa7 100644 --- a/frontend/src/components/Block.js +++ b/frontend/src/components/Block.js @@ -1,9 +1,5 @@ const ContentBlock = ({ children }) => ( -
-
-
{children}
-
-
+
{children}
); export default ContentBlock; diff --git a/frontend/src/components/Blocks.css b/frontend/src/components/Blocks.css new file mode 100644 index 0000000..ba7595f --- /dev/null +++ b/frontend/src/components/Blocks.css @@ -0,0 +1,20 @@ +.centerBlockInner { + width: 500px; +} + +.contentBlock { + color: var(--text); + background-color: #fff; + border-radius: 6px; + box-sizing: border-box; + padding: 24px; + box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px; + margin: 0 0 24px 0; +} + +@media screen and (max-width: 500px) { + .contentBlock { + padding: 18px; + margin: 0 0 18px 0; + } +} diff --git a/frontend/src/components/Blocks.js b/frontend/src/components/Blocks.js index fb6d63d..fc20e4b 100644 --- a/frontend/src/components/Blocks.js +++ b/frontend/src/components/Blocks.js @@ -9,6 +9,7 @@ import LocationBlock from './LocationBlock'; import ConnectionBlock from './ConnectionBlock'; // import FontsBlock from './FontsBlock'; import { fetchAPI, getWebWorker } from '../utils/common'; +import './Blocks.css'; const Blocks = () => { const [workerData, setWorkerData] = useState(); diff --git a/frontend/src/components/FingerprintBlock.css b/frontend/src/components/FingerprintBlock.css new file mode 100644 index 0000000..33e01c0 --- /dev/null +++ b/frontend/src/components/FingerprintBlock.css @@ -0,0 +1,42 @@ +.fingerprintTable td:first-child { + width: 80px; + font-weight: 600; + word-break: normal; +} + +.boxWrap { + border: 1px solid var(--border); + border-radius: 6px; + padding: 12px; +} + +.hash { + text-align: center; + font-weight: 600; +} + +form { + margin: 12px 0 0 0; +} + +.saveButton { + border: 1px solid var(--grey); + border-radius: 6px; + padding: 6px; + background-color: transparent; + cursor: pointer; + color: var(--text); + margin: 0 0 0 6px; +} + +.saveButton:hover { + background-color: var(--border); +} + +input[type='text'] { + border: 1px solid var(--grey); + border-radius: 6px; + padding: 6px; + width: 200px; + outline: none; +} diff --git a/frontend/src/components/FingerprintBlock.js b/frontend/src/components/FingerprintBlock.js index 4c8e995..3a4a72e 100644 --- a/frontend/src/components/FingerprintBlock.js +++ b/frontend/src/components/FingerprintBlock.js @@ -1,3 +1,4 @@ +import './FingerprintBlock.css'; import { useState, useEffect } from 'react'; import Block from './Block'; import Table from './Table'; @@ -42,11 +43,16 @@ const FingerprintBlock = ({ workerData }) => {
postSignature(hash, e.target[0].value)}> - +
); diff --git a/frontend/src/components/GitHub.css b/frontend/src/components/GitHub.css new file mode 100644 index 0000000..2c47124 --- /dev/null +++ b/frontend/src/components/GitHub.css @@ -0,0 +1,18 @@ +.gitHubButton { + position: fixed; + top: 12px; + right: 12px; +} + +@media screen and (max-width: 900px) { + .gitHubButton { + position: absolute; + } +} + +@media screen and (max-width: 500px) { + .gitHubButton { + top: 8px; + right: 8px; + } +} diff --git a/frontend/src/components/Github.js b/frontend/src/components/Github.js index 7557f28..04dcdf8 100644 --- a/frontend/src/components/Github.js +++ b/frontend/src/components/Github.js @@ -1,3 +1,4 @@ +import './GitHub.css'; import GitHubButton from 'react-github-btn'; const Github = () => ( diff --git a/frontend/src/components/IntlBlock.js b/frontend/src/components/IntlBlock.js index 549aa3f..85ae198 100644 --- a/frontend/src/components/IntlBlock.js +++ b/frontend/src/components/IntlBlock.js @@ -1,4 +1,3 @@ -/* eslint-disable no-unused-vars */ import Block from './Block'; import Table from './Table'; import getIntl from '../utils/intl'; diff --git a/frontend/src/components/Logo.css b/frontend/src/components/Logo.css new file mode 100644 index 0000000..7700579 --- /dev/null +++ b/frontend/src/components/Logo.css @@ -0,0 +1,10 @@ +.logoWrap { + display: flex; + align-items: center; + justify-content: center; + margin: 20px 0; +} + +.logo { + width: 250px; +} diff --git a/frontend/src/components/Logo.js b/frontend/src/components/Logo.js index d833a1d..c8f4a19 100644 --- a/frontend/src/components/Logo.js +++ b/frontend/src/components/Logo.js @@ -1,3 +1,4 @@ +import './Logo.css'; import { ReactComponent as LogoImg } from '../images/logo.svg'; const Logo = () => ( diff --git a/frontend/src/components/MainColumn.css b/frontend/src/components/MainColumn.css new file mode 100644 index 0000000..9c71520 --- /dev/null +++ b/frontend/src/components/MainColumn.css @@ -0,0 +1,5 @@ +.centerBlockOuter { + display: flex; + justify-content: center; + gap: 24px; +} diff --git a/frontend/src/components/MainColumn.js b/frontend/src/components/MainColumn.js index a90b114..d652664 100644 --- a/frontend/src/components/MainColumn.js +++ b/frontend/src/components/MainColumn.js @@ -1,3 +1,4 @@ +import './MainColumn.css'; import Logo from './Logo'; import Blocks from './Blocks'; diff --git a/frontend/src/components/OtherBlock.js b/frontend/src/components/OtherBlock.js index ae3efb0..319c827 100644 --- a/frontend/src/components/OtherBlock.js +++ b/frontend/src/components/OtherBlock.js @@ -1,4 +1,3 @@ -/* eslint-disable no-unused-vars */ import { useState, useEffect } from 'react'; import Block from './Block'; diff --git a/frontend/src/components/Table.css b/frontend/src/components/Table.css new file mode 100644 index 0000000..9af2b4a --- /dev/null +++ b/frontend/src/components/Table.css @@ -0,0 +1,14 @@ +table { + width: 100%; + table-layout: fixed; + border-collapse: collapse; +} + +.tableWrap { + border: 1px solid var(--border); + border-radius: 6px; +} + +tbody:not(:last-child) { + border-bottom: 1px solid var(--border); +} diff --git a/frontend/src/components/Table.js b/frontend/src/components/Table.js index f0b5402..ab50f27 100644 --- a/frontend/src/components/Table.js +++ b/frontend/src/components/Table.js @@ -1,3 +1,4 @@ +import './Table.css'; import TableRow from './TableRow'; const Table = ({ data }) => ( diff --git a/frontend/src/components/TableRow.css b/frontend/src/components/TableRow.css new file mode 100644 index 0000000..414dc02 --- /dev/null +++ b/frontend/src/components/TableRow.css @@ -0,0 +1,56 @@ +td { + padding: 12px; +} + +td:first-child { + width: 150px; + font-weight: 600; + word-break: normal; +} + +td:nth-child(3) { + width: 40px; + font-weight: 600; + word-break: normal; +} + +.circleButton { + display: flex; + width: 20px; +} + +.issue { + cursor: pointer; +} + +.issue:hover { + background-color: var(--issueBackground); + color: var(--issueText); +} + +.modalHeader { + display: flex; + justify-content: space-between; + margin: 0 0 6px 0; +} + +.modalTitle { + font-weight: 600; +} + +.closeButton { + fill: var(--border); + display: flex; + width: 12px; + cursor: pointer; + margin: -12px 0 0 0; +} + +.closeButton:hover { + fill: var(--grey); +} + +ul { + padding-left: 20px; + margin: 0px; +} diff --git a/frontend/src/components/TableRow.js b/frontend/src/components/TableRow.js index 63cc417..eaff169 100644 --- a/frontend/src/components/TableRow.js +++ b/frontend/src/components/TableRow.js @@ -1,3 +1,4 @@ +import './TableRow.css'; import Modal from 'react-modal'; import { useState } from 'react'; import { ReactComponent as XCircle } from '../images/xCircle.svg'; @@ -32,16 +33,18 @@ const TableRow = ({ item }) => { setIsOpen(false); }; return ( - - {item.key} - {item.value} - - {issues ? ( - - ) : ( - - )} - + <> + + {item.key} + {item.value} + + {issues ? ( + + ) : ( + + )} + + { ))} - + ); }; diff --git a/frontend/src/images/xCircle.svg b/frontend/src/images/xCircle.svg index 98a6d05..768426f 100644 --- a/frontend/src/images/xCircle.svg +++ b/frontend/src/images/xCircle.svg @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/frontend/src/index.js b/frontend/src/index.js index 5831441..4a6f683 100644 --- a/frontend/src/index.js +++ b/frontend/src/index.js @@ -1,6 +1,5 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import './styles/index.css'; import App from './components/App'; import * as serviceWorker from './serviceWorker'; diff --git a/frontend/src/styles/App.css b/frontend/src/styles/App.css deleted file mode 100644 index c8b3962..0000000 --- a/frontend/src/styles/App.css +++ /dev/null @@ -1,288 +0,0 @@ -:root { - --main: #943ec5; - --grey: #9fa6b2; - --text: #4b5563; - --border: #ddd; - --issueBackground: #f8d7da; - --issueHover: #f4c1c6; - --issueBorder: #f5c6cb; - --issueText: #721c24; -} - -.App { - min-height: 100vh; - display: flex; - flex-direction: column; -} - -.background { - position: fixed; - width: 100%; - height: 100%; - background: var(--grey); - background: linear-gradient( - 165deg, - rgba(87, 35, 117, 1) 0%, - rgba(148, 62, 197, 1) 55%, - rgba(211, 176, 231, 1) 100% - ); - z-index: -1; -} - -.gitHubButton { - position: fixed; - top: 12px; - right: 12px; -} - -.logoWrap { - display: flex; - align-items: center; - justify-content: center; - margin: 20px 0; -} - -.logo { - width: 250px; -} - -.centerBlockOuter { - display: flex; - justify-content: center; - gap: 24px; -} - -.centerBlockInner { - width: 500px; -} - -.contentBlock { - color: var(--text); - background-color: #fff; - border-radius: 6px; - box-sizing: border-box; - padding: 24px; - box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px; - margin: 0 0 24px 0; -} - -.contentItem { - display: flex; -} - -.contentItem:not(:last-child) { - margin: 0 0 24px 0; -} - -.contentIcon { - flex: none; - margin: 0 24px 0 0; - width: 32px !important; -} - -.contentText { - line-height: 24px; -} - -h1 { - margin: 0 0 12px 0; - font-weight: 600; - font-size: 19px; -} - -h2 { - margin: 0 0 4px 0; - font-weight: 600; - font-size: 17px; -} - -.contentList { - margin: 24px 0 0 0; -} - -#scanButton { - display: block; - background-color: var(--main); - color: #fff; - padding: 12px; - border-radius: 6px; - box-sizing: border-box; - text-align: center; - width: 100%; - border: none; - cursor: pointer; - margin: 24px 0 0 0; - font-family: inherit; - font-size: inherit; - -webkit-appearance: none; -} - -#scanButton:hover { - opacity: 0.7; -} - -.boxWrap { - border: 1px solid var(--border); - border-radius: 6px; - padding: 12px; -} - -.tableWrap { - border: 1px solid var(--border); - border-radius: 6px; -} - -table { - width: 100%; - table-layout: fixed; - border-collapse: collapse; -} - -tbody:not(:last-child) { - border-bottom: 1px solid var(--border); -} - -td { - padding: 12px; -} - -td:first-child { - width: 150px; - font-weight: 600; - word-break: normal; -} - -.fingerprintTable td:first-child { - width: 80px; - font-weight: 600; - word-break: normal; -} - -td:nth-child(3) { - width: 40px; - font-weight: 600; - word-break: normal; -} - -.circleButton { - display: flex; - width: 20px; -} - -p { - margin: 12px 0 0 0; -} - -b { - font-weight: 600; -} - -img { - width: 100%; - border-radius: 6px; - border: 1px solid var(--border); - box-sizing: border-box; - display: block; - margin: 0 0 12px 0; -} - -.hash { - text-align: center; - font-weight: 600; -} - -form { - margin: 12px 0 0 0; -} - -input[type='text'] { - border: 1px solid var(--grey); - border-radius: 6px; - padding: 6px; - width: 200px; - outline: none; -} - -#saveButton { - border: 1px solid var(--grey); - border-radius: 6px; - padding: 6px; - background-color: transparent; - cursor: pointer; - color: var(--text); - margin: 0 0 0 6px; -} - -#saveButton:hover { - background-color: var(--border); -} - -.issue { - background-color: var(--issueBackground); - color: var(--issueText); - border: 1px solid var(--issueBorder); - cursor: pointer; -} - -.issue:hover { - background-color: var(--issueHover); -} - -.newline { - display: block; -} - -@media screen and (max-width: 500px) { - .github { - width: 24px; - position: absolute; - top: 8px; - right: 8px; - } - - body { - font-size: 14px; - } - - .contentBlock { - padding: 18px; - margin: 0 0 18px 0; - } - - .centerBlockInner { - width: 650px; - margin: 12px 0 0 0; - } - - .logo { - width: 185px; - margin: 0 0 8px 0; - } - - h1 { - font-size: 16px; - } - - h2 { - margin: 0 0 3px 0; - font-size: 15px; - } - - .contentIcon { - flex: none; - margin: 0 18px 0 0; - width: 28px !important; - } - - td:first-child { - width: 70px; - } - - .boxWrap { - padding: 8px; - } - - input[type='text'] { - width: calc(100% - 65px); - } -} diff --git a/frontend/src/styles/index.css b/frontend/src/styles/index.css deleted file mode 100644 index af471ba..0000000 --- a/frontend/src/styles/index.css +++ /dev/null @@ -1,14 +0,0 @@ -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; - font-size: 15px; -} - -code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', - monospace; -}