Skip to content

Commit

Permalink
remove inline css from navigation and add hashes to gatsby-config and…
Browse files Browse the repository at this point in the history
… re-enable csp plugin

Signed-off-by: Michael Robinson <[email protected]>
  • Loading branch information
merobi-hub committed Aug 24, 2023
1 parent 7b122a6 commit daf7c50
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 121 deletions.
11 changes: 5 additions & 6 deletions gatsby-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,14 @@ const plugins = [
disableOnDev: false,
reportOnly: false,
mergeScriptHashes: true,
mergeStyleHashes: false,
mergeStyleHashes: true,
mergeDefaultDirectives: true,
directives: {
"script-src": "https: 'unsafe-eval'",
"script-src-elem": "'self' 'unsafe-inline' https://plausible.io/js/script.outbound-links.js",
"style-src": "'self' 'unsafe-inline'",
"style-src-elem": "'self' 'unsafe-inline' https://fonts.googleapis.com",
"script-src": "'self' 'unsafe-eval' https://plausible.io/js/script.outbound-links.js",
"script-src-elem": "'self' https://plausible.io/js/script.outbound-links.js",
"style-src": "'self' 'unsafe-hashes' 'sha256-iahNazrr5t3BQXcVfXbYSR8Bd2AOXPifwVTBbIKb/bE=' 'sha256-7buiYDizqbiAS404WOu2AY5NZDzyVesjpBU80D6Nno4=' 'sha256-f7qc12gYVX0xoX9jAoOIxHvtXcfppKYwcBr7sE0GLR4=' 'sha256-o4LYhp5wtluJ8/NWUV2vi+r5AxmP8X2zEvYHCpji+kI=' 'sha256-MtxTLcyxVEJFNLEIqbVTaqR4WWr0+lYSZ78AzGmNsuA=' https://fonts.googleapis.com",
"style-src-elem": "'self' 'sha256-27nLLCfJPKzC4cpzFwNqY3YTXYmR0/qs1ExOGhQCw/c=' 'sha256-cLHlYu9WwZQgD1K6YlWPqFYXJEuD9YpxdlDktBDedco=' https://fonts.googleapis.com",
"font-src": "'self' data: https://fonts.gstatic.com/s/karla/v30/qkBIXvYC6trAT55ZBi1ueQVIjQTD-JqaHUlKZbLXGhmRytc.woff2 https://fonts.gstatic.com/s/karla/v30/qkBIXvYC6trAT55ZBi1ueQVIjQTD-JqaE0lKZbLXGhmR.woff2",
"img-src": "*"
}
}
},
Expand Down
110 changes: 0 additions & 110 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2221,30 +2221,6 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "port",
"description": null,
"args": [],
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "host",
"description": null,
"args": [],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "polyfill",
"description": null,
Expand Down Expand Up @@ -3699,18 +3675,6 @@
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "img_src",
"description": null,
"args": [],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
Expand Down Expand Up @@ -7767,26 +7731,6 @@
},
"defaultValue": null
},
{
"name": "port",
"description": null,
"type": {
"kind": "INPUT_OBJECT",
"name": "IntQueryOperatorInput",
"ofType": null
},
"defaultValue": null
},
{
"name": "host",
"description": null,
"type": {
"kind": "INPUT_OBJECT",
"name": "StringQueryOperatorInput",
"ofType": null
},
"defaultValue": null
},
{
"name": "polyfill",
"description": null,
Expand Down Expand Up @@ -17573,18 +17517,6 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "port",
"description": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "host",
"description": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "polyfill",
"description": null,
Expand Down Expand Up @@ -18440,26 +18372,6 @@
},
"defaultValue": null
},
{
"name": "port",
"description": null,
"type": {
"kind": "INPUT_OBJECT",
"name": "IntQueryOperatorInput",
"ofType": null
},
"defaultValue": null
},
{
"name": "host",
"description": null,
"type": {
"kind": "INPUT_OBJECT",
"name": "StringQueryOperatorInput",
"ofType": null
},
"defaultValue": null
},
{
"name": "polyfill",
"description": null,
Expand Down Expand Up @@ -20410,16 +20322,6 @@
"ofType": null
},
"defaultValue": null
},
{
"name": "img_src",
"description": null,
"type": {
"kind": "INPUT_OBJECT",
"name": "StringQueryOperatorInput",
"ofType": null
},
"defaultValue": null
}
],
"interfaces": null,
Expand Down Expand Up @@ -21838,12 +21740,6 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "pluginCreator___pluginOptions___directives___img_src",
"description": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "pluginCreator___pluginOptions___pathCheck",
"description": null,
Expand Down Expand Up @@ -23194,12 +23090,6 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "pluginOptions___directives___img_src",
"description": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "pluginOptions___pathCheck",
"description": null,
Expand Down
5 changes: 0 additions & 5 deletions src/components/navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,6 @@ const Navbar: React.FC<NavbarProps> = ({ navPlaceholder, location, currentTheme,
>
<button
className="navigation-btn"
style={{
transform: "translateY(-50%)",
top: "50%",
left: "10px",
}}
onClick={() => {
setSidebarOpen(true)
}}
Expand Down
3 changes: 3 additions & 0 deletions src/style/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,9 @@ h1, h2, h3, h4, h5, h6 {

.navigation-btn {
@apply absolute text-primary lg:hidden;
transform: "translateY(-50%)";
top: "50%";
left: "10px";
}

.navigation-sidebar-outer-div {
Expand Down

0 comments on commit daf7c50

Please sign in to comment.