Skip to content

Commit

Permalink
Updated draft, added do not track component
Browse files Browse the repository at this point in the history
  • Loading branch information
skyeto committed Jun 26, 2023
1 parent 8ac6ea2 commit 3bac2b7
Show file tree
Hide file tree
Showing 8 changed files with 254 additions and 11 deletions.
8 changes: 5 additions & 3 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { defineConfig } from 'astro/config';

// https://astro.build/config
import tailwind from "@astrojs/tailwind";

// https://astro.build/config
Expand All @@ -12,8 +11,11 @@ import prefetch from "@astrojs/prefetch";
// https://astro.build/config
import compress from "astro-compress";

// https://astro.build/config
import react from "@astrojs/react";

// https://astro.build/config
export default defineConfig({
site: "https://skyeto.com",
integrations: [tailwind(), mdx(), prefetch(), compress()]
});
integrations: [tailwind(), mdx(), prefetch(), compress(), react()]
});
173 changes: 173 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@
"dependencies": {
"@astrojs/mdx": "^0.11.5",
"@astrojs/prefetch": "^0.1.1",
"@astrojs/react": "^2.2.1",
"@astrojs/rss": "^1.2.1",
"@astrojs/tailwind": "^3.0.0-beta.1",
"@types/react": "^18.2.14",
"@types/react-dom": "^18.2.6",
"astro": "^2.1.7",
"astro-compress": "^1.1.1",
"postcss": "^8.4.21",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tailwind": "^4.0.0",
"tailwindcss": "^3.2.1",
"three": "^0.151.3"
Expand Down
8 changes: 8 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
User-agent: ChatGPT-User
Disallow: /

User-agent: ChatGPT
Disallow: /

User-agent: OpenAI
Disallow: /
22 changes: 22 additions & 0 deletions src/components/DNT.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { useState } from 'react';

export default function DND(props) {
const [consent, setConsent] = useState(false);

if(navigator && navigator.doNotTrack == "1" && !consent) {
return (
<div style={{
background: "rgb(40, 40, 40)",
border: "1px solid rgb(60, 60, 60)",
padding: "0.5rem",
borderRadius: "0.25rem"
}}>
You have do not track enabled. Do you still want to show the remote content{props.source && <span> from {props.source}</span>}? <button style={{textDecoration: "underline"}} onClick={(e) => setConsent(true)}>Show</button>
</div>
)
}

return (
<div>{props.children}</div>
)
}
3 changes: 1 addition & 2 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ const { title, description, pubDate } = Astro.props;
<slot />

<footer class="container">
&copy; 2023 skyeto;<br>
Content is not licensed for use in AI models nor for training AI models. Copying for non-commercial purposes as long as you give attribution is totally okay!
&copy; 2023 skyeto; <a style="text-decoration: underline dotted" href="http://creativecommons.org/licenses/by-sa/4.0/">Licensed under CC-BY-SA 4.0</a><br>
</footer>

<!--
Expand Down
9 changes: 9 additions & 0 deletions src/layouts/Post.astro
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ const { frontmatter } = Astro.props;

article > ul {
@apply list-disc mb-[1rem];
list-style-position: inside;
}

article > ol {
Expand All @@ -82,5 +83,13 @@ const { frontmatter } = Astro.props;
article a {
@apply hover:underline decoration-dashed text-[#00b5e2];
}

article > .footnotes {
@apply mt-[10rem];
}

article > .footnotes > ol li p:first-child:before {
content: "> ";
}
</style>

Loading

0 comments on commit 3bac2b7

Please sign in to comment.