Added simple privacy-focused analytics.
This commit is contained in:
1 parent
eacfd12346
commit
72fb96a970
4 files changed
+16
-27
No files matched your search
+1
-1
@@ -1 +1 @@
|
||||
[{"C:\\Users\\lucas\\WebstormProjects\\projects-page\\src\\index.tsx":"1","C:\\Users\\lucas\\WebstormProjects\\projects-page\\src\\reportWebVitals.ts":"2","C:\\Users\\lucas\\WebstormProjects\\projects-page\\src\\App.tsx":"3","C:\\Users\\lucas\\WebstormProjects\\projects-page\\src\\Portfolio.tsx":"4","C:\\Users\\lucas\\WebstormProjects\\Portfolio-Page\\src\\index.tsx":"5","C:\\Users\\lucas\\WebstormProjects\\Portfolio-Page\\src\\reportWebVitals.ts":"6","C:\\Users\\lucas\\WebstormProjects\\Portfolio-Page\\src\\Portfolio.tsx":"7","C:\\Users\\lucas\\WebstormProjects\\Portfolio-Page\\src\\App.tsx":"8"},{"size":498,"mtime":1610629054018,"results":"9","hashOfConfig":"10"},{"size":425,"mtime":499162500000,"results":"11","hashOfConfig":"10"},{"size":5635,"mtime":1610652012310,"results":"12","hashOfConfig":"10"},{"size":1659,"mtime":1610644821785,"results":"13","hashOfConfig":"10"},{"size":498,"mtime":1610629054018,"results":"14","hashOfConfig":"15"},{"size":425,"mtime":499162500000,"results":"16","hashOfConfig":"15"},{"size":1659,"mtime":1610644821785,"results":"17","hashOfConfig":"15"},{"size":5635,"mtime":1610652012310,"results":"18","hashOfConfig":"15"},{"filePath":"19","messages":"20","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"21"},"1xwkbam",{"filePath":"22","messages":"23","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"21"},{"filePath":"24","messages":"25","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"26"},{"filePath":"27","messages":"28","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"21"},{"filePath":"29","messages":"30","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1u192rt",{"filePath":"31","messages":"32","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"35","messages":"36","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"C:\\Users\\lucas\\WebstormProjects\\projects-page\\src\\index.tsx",[],["37","38"],"C:\\Users\\lucas\\WebstormProjects\\projects-page\\src\\reportWebVitals.ts",[],"C:\\Users\\lucas\\WebstormProjects\\projects-page\\src\\App.tsx",["39"],"import React, {useEffect, useState} from 'react';\nimport {FontAwesomeIcon} from \"@fortawesome/react-fontawesome\";\nimport IProject from './IProject';\nimport Fuse from 'fuse.js';\nimport {faGithub} from \"@fortawesome/free-brands-svg-icons\";\nimport {faGlobe, faGraduationCap} from \"@fortawesome/free-solid-svg-icons\";\nimport './App.css'\nimport {\n Box, Button, ButtonGroup,\n Card,\n CardActions,\n CardContent,\n createMuiTheme,\n Grid, IconButton,\n MuiThemeProvider,\n TextField,\n Typography\n} from \"@material-ui/core\";\n\nfunction App() {\n\n const darkTheme = createMuiTheme({\n palette: {\n type: 'dark',\n background: {\n paper: \"inherit\",\n },\n },\n });\n\n const [isLoaded, setIsLoaded] = useState<Boolean>(false);\n const [projects, setProjects] = useState<IProject[]>([]);\n const [searchBoxValue, setSearchBoxValue] = useState<string>(\"\");\n const [projectsToShow, setProjectsToShow] = useState<IProject[]>([]);\n\n // ['description', 'title', 'tags']\n const searchOptions = {\n keys: [\n {\n name: 'title',\n weight: 1\n },\n {\n name: 'tags',\n weight: 0.7\n },\n {\n name: \"description\",\n weight: 0.3\n }\n ]\n }\n\n let performSearch = (searchTerm: string): IProject[] => {\n if (searchTerm == \"\"){\n console.log(\"Nothing was searched\")\n return projects;\n }\n\n const fuse = new Fuse(projects, searchOptions);\n const result = fuse.search(searchTerm)\n\n // Results from FUSE are nested.\n const realResult = result.map(r => r.item);\n return realResult;\n }\n\n const handleSearchBox = (e: any) => {\n setSearchBoxValue(e.target.value);\n const result = performSearch(e.target.value);\n setProjectsToShow(result);\n }\n\n useEffect(() => {\n if (!isLoaded) {\n fetch(\"/info.json\")\n .then(res => res.json())\n .then(\n (result) => {\n let formattedResult: IProject[] = [];\n Object.values(result).forEach(entry => {\n formattedResult.push(entry as IProject);\n })\n setIsLoaded(true);\n setProjects(formattedResult);\n Line truncated
|
||||
[{"G:\\Projects\\github-repos\\portfolio\\src\\index.tsx":"1","G:\\Projects\\github-repos\\portfolio\\src\\reportWebVitals.ts":"2","G:\\Projects\\github-repos\\portfolio\\src\\Portfolio.tsx":"3","G:\\Projects\\github-repos\\portfolio\\src\\App.tsx":"4"},{"size":514,"mtime":1615755960771,"results":"5","hashOfConfig":"6"},{"size":440,"mtime":1615755960791,"results":"7","hashOfConfig":"6"},{"size":2185,"mtime":1615756199873,"results":"8","hashOfConfig":"6"},{"size":5809,"mtime":1615755960769,"results":"9","hashOfConfig":"6"},{"filePath":"10","messages":"11","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"12"},"1ym830g",{"filePath":"13","messages":"14","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"12"},{"filePath":"15","messages":"16","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"17","usedDeprecatedRules":"12"},{"filePath":"18","messages":"19","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"G:\\Projects\\github-repos\\portfolio\\src\\index.tsx",[],["20","21"],"G:\\Projects\\github-repos\\portfolio\\src\\reportWebVitals.ts",[],"G:\\Projects\\github-repos\\portfolio\\src\\Portfolio.tsx",["22"],"import './Portfolio.css'\r\nimport {Grid} from \"@material-ui/core\";\r\nimport {faGithub, faLinkedin} from \"@fortawesome/free-brands-svg-icons\";\r\nimport {FontAwesomeIcon} from \"@fortawesome/react-fontawesome\";\r\nimport {faEnvelope} from \"@fortawesome/free-solid-svg-icons\";\r\nimport App from \"./App\";\r\nimport {Helmet} from \"react-helmet\";\r\n\r\nfunction Portfolio() {\r\n\r\n // The second grid with xs=5 is needed, cause the first one doent work..?\r\n return (\r\n <div>\r\n <Helmet>\r\n <meta charSet=\"utf-8\" />\r\n <title>Lucas Winther Portfolio</title>\r\n </Helmet>\r\n <Grid container spacing={0}>\r\n <Grid item xs={5} id={\"headerContainer\"}>\r\n <header>\r\n <img alt={\"Lucas Winther\"} src='images/avatar.png' />\r\n <p>\r\n <strong>My name is Lucas</strong>, a student <br />\r\n at Aarhus University with <br />\r\n passion for development.\r\n </p>\r\n <div id={\"icons\"}>\r\n <a href={\"https://www.linkedin.com/in/lucas-winther/\"}><FontAwesomeIcon icon={faLinkedin} /></a>\r\n <a href={\"mailto:lucas@lucaswinther.info\"}><FontAwesomeIcon icon={faEnvelope} /></a>\r\n <a href={\"https://github.com/StereotypicalCat\"}><FontAwesomeIcon icon={faGithub} /></a>\r\n </div>\r\n </header>\r\n </Grid>\r\n {/* I dont know why this grid is needed, but the first grid apparently doesn't register correctly.*/}\r\n <Grid item xs={5}>\r\n </Grid>\r\n <Grid item xs={7} id={\"appContainer\"}>\r\n <App />\r\n </Grid>\r\n </Grid>\r\n <noscript><img src=\"https://websiteanalytics.herokuapp.com/ingress/34f15484-8d83-4381-a829-c4cf4ac7e32b/pixel.gif\"/></noscript> <script src=\"https://websiteanalytics.herokuapp.com/ingress/34f15484-8d83-4381-a829-c4cf4ac7e32b/script.js\" />\r\n </div>\r\n )\r\n\r\n}\r\n\r\nexport default Portfolio;","G:\\Projects\\github-repos\\portfolio\\src\\App.tsx",[],{"ruleId":"23","replacedBy":"24"},{"ruleId":"25","replacedBy":"26"},{"ruleId":"27","severity":1,"message":"28","line":41,"column":23,"nodeType":"29","endLine":41,"endColumn":129},"no-native-reassign",["30"],"no-negated-in-lhs",["31"],"jsx-a11y/alt-text","img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.","JSXOpeningElement","no-global-assign","no-unsafe-negation"]
|
||||
Generated
+13
-25
@@ -20,6 +20,7 @@
|
||||
"@types/node": "^12.19.13",
|
||||
"@types/react": "^16.14.2",
|
||||
"@types/react-dom": "^16.9.10",
|
||||
"chokidar": "^3.5.1",
|
||||
"fuse.js": "^6.4.6",
|
||||
"normalize.css": "^8.0.1",
|
||||
"react": "^17.0.1",
|
||||
@@ -1654,7 +1655,6 @@
|
||||
"jest-resolve": "^26.6.2",
|
||||
"jest-util": "^26.6.2",
|
||||
"jest-worker": "^26.6.2",
|
||||
"node-notifier": "^8.0.0",
|
||||
"slash": "^3.0.0",
|
||||
"source-map": "^0.6.0",
|
||||
"string-length": "^4.0.1",
|
||||
@@ -4227,7 +4227,6 @@
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
|
||||
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
|
||||
"optional": true,
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
@@ -4676,14 +4675,12 @@
|
||||
"integrity": "sha512-tzWzvgePgLORb9/3a0YenggReLKAIb2owL03H2Xdoe5pKcUyWRSEQ8xfCar8t2SIAuEDwtmx2da1YB52YuHQMQ=="
|
||||
},
|
||||
"node_modules/chokidar": {
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.0.tgz",
|
||||
"integrity": "sha512-JgQM9JS92ZbFR4P90EvmzNpSGhpPBGBSj10PILeDyYFwp4h2/D9OM03wsJ4zW1fEp4ka2DGrnUeD7FuvQ2aZ2Q==",
|
||||
"optional": true,
|
||||
"version": "3.5.1",
|
||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz",
|
||||
"integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==",
|
||||
"dependencies": {
|
||||
"anymatch": "~3.1.1",
|
||||
"braces": "~3.0.2",
|
||||
"fsevents": "~2.3.1",
|
||||
"glob-parent": "~5.1.0",
|
||||
"is-binary-path": "~2.1.0",
|
||||
"is-glob": "~4.0.1",
|
||||
@@ -4692,6 +4689,9 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8.10.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"fsevents": "~2.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/chownr": {
|
||||
@@ -6470,8 +6470,7 @@
|
||||
"esprima": "^4.0.1",
|
||||
"estraverse": "^4.2.0",
|
||||
"esutils": "^2.0.2",
|
||||
"optionator": "^0.8.1",
|
||||
"source-map": "~0.6.1"
|
||||
"optionator": "^0.8.1"
|
||||
},
|
||||
"bin": {
|
||||
"escodegen": "bin/escodegen.js",
|
||||
@@ -9128,7 +9127,6 @@
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
|
||||
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"binary-extensions": "^2.0.0"
|
||||
},
|
||||
@@ -10180,7 +10178,6 @@
|
||||
"@types/node": "*",
|
||||
"anymatch": "^3.0.3",
|
||||
"fb-watchman": "^2.0.0",
|
||||
"fsevents": "^2.1.2",
|
||||
"graceful-fs": "^4.2.4",
|
||||
"jest-regex-util": "^26.0.0",
|
||||
"jest-serializer": "^26.6.2",
|
||||
@@ -15153,7 +15150,6 @@
|
||||
"eslint-webpack-plugin": "^2.1.0",
|
||||
"file-loader": "6.1.1",
|
||||
"fs-extra": "^9.0.1",
|
||||
"fsevents": "^2.1.3",
|
||||
"html-webpack-plugin": "4.5.0",
|
||||
"identity-obj-proxy": "3.0.0",
|
||||
"jest": "26.6.0",
|
||||
@@ -15340,7 +15336,6 @@
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz",
|
||||
"integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"picomatch": "^2.2.1"
|
||||
},
|
||||
@@ -18326,10 +18321,8 @@
|
||||
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz",
|
||||
"integrity": "sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==",
|
||||
"dependencies": {
|
||||
"chokidar": "^3.4.1",
|
||||
"graceful-fs": "^4.1.2",
|
||||
"neo-async": "^2.5.0",
|
||||
"watchpack-chokidar2": "^2.0.1"
|
||||
"neo-async": "^2.5.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"chokidar": "^3.4.1",
|
||||
@@ -18814,7 +18807,6 @@
|
||||
"anymatch": "^2.0.0",
|
||||
"async-each": "^1.0.1",
|
||||
"braces": "^2.3.2",
|
||||
"fsevents": "^1.2.7",
|
||||
"glob-parent": "^3.1.0",
|
||||
"inherits": "^2.0.3",
|
||||
"is-binary-path": "^1.0.0",
|
||||
@@ -23718,8 +23710,7 @@
|
||||
"binary-extensions": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
|
||||
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
|
||||
"optional": true
|
||||
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA=="
|
||||
},
|
||||
"bluebird": {
|
||||
"version": "3.7.2",
|
||||
@@ -24112,10 +24103,9 @@
|
||||
"integrity": "sha512-tzWzvgePgLORb9/3a0YenggReLKAIb2owL03H2Xdoe5pKcUyWRSEQ8xfCar8t2SIAuEDwtmx2da1YB52YuHQMQ=="
|
||||
},
|
||||
"chokidar": {
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.0.tgz",
|
||||
"integrity": "sha512-JgQM9JS92ZbFR4P90EvmzNpSGhpPBGBSj10PILeDyYFwp4h2/D9OM03wsJ4zW1fEp4ka2DGrnUeD7FuvQ2aZ2Q==",
|
||||
"optional": true,
|
||||
"version": "3.5.1",
|
||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz",
|
||||
"integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==",
|
||||
"requires": {
|
||||
"anymatch": "~3.1.1",
|
||||
"braces": "~3.0.2",
|
||||
@@ -27822,7 +27812,6 @@
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
|
||||
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"binary-extensions": "^2.0.0"
|
||||
}
|
||||
@@ -32857,7 +32846,6 @@
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz",
|
||||
"integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"picomatch": "^2.2.1"
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
"@types/node": "^12.19.13",
|
||||
"@types/react": "^16.14.2",
|
||||
"@types/react-dom": "^16.9.10",
|
||||
"chokidar": "^3.5.1",
|
||||
"fuse.js": "^6.4.6",
|
||||
"normalize.css": "^8.0.1",
|
||||
"react": "^17.0.1",
|
||||
|
||||
+1
-1
@@ -37,8 +37,8 @@ function Portfolio() {
|
||||
<Grid item xs={7} id={"appContainer"}>
|
||||
<App />
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
<noscript><img src="https://websiteanalytics.herokuapp.com/ingress/34f15484-8d83-4381-a829-c4cf4ac7e32b/pixel.gif"/></noscript> <script src="https://websiteanalytics.herokuapp.com/ingress/34f15484-8d83-4381-a829-c4cf4ac7e32b/script.js" />
|
||||
</div>
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user