Compare commits
No commits in common. 'main' and 'feature/svelte' have entirely different histories.
main
...
feature/sv
@ -1,11 +1,38 @@
|
||||
# No Chromium
|
||||
# create-svelte
|
||||
|
||||
This is the source code for [no-chromium.org](https://no-chromium.org/).
|
||||
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
|
||||
|
||||
## Contributing
|
||||
## Creating a project
|
||||
|
||||
Yes. Read [this](./CODE_OF_CONDUCT.md).
|
||||
If you're seeing this, you've probably already done this step. Congrats!
|
||||
|
||||
## License
|
||||
```bash
|
||||
# create a new project in the current directory
|
||||
npm create svelte@latest
|
||||
|
||||
CNPLv7+
|
||||
# create a new project in my-app
|
||||
npm create svelte@latest my-app
|
||||
```
|
||||
|
||||
## Developing
|
||||
|
||||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
|
||||
# or start the server and open the app in a new browser tab
|
||||
npm run dev -- --open
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
To create a production version of your app:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
You can preview the production build with `npm run preview`.
|
||||
|
||||
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,14 +0,0 @@
|
||||
import { handler } from "./handler.js";
|
||||
import express from "express";
|
||||
import cors from 'cors';
|
||||
|
||||
const app = express();
|
||||
|
||||
app.use("/popup/", cors());
|
||||
|
||||
// let SvelteKit handle everything else, including serving prerendered pages and static assets
|
||||
app.use(handler);
|
||||
|
||||
app.listen(3000, () => {
|
||||
console.log("listening on port 3000");
|
||||
});
|
@ -1,9 +1,42 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
html {
|
||||
font-family: Noto Sans, sans-serif;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
*, *:before, *:after {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Noto Sans, sans serif;
|
||||
min-height: 1vh;
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p {
|
||||
line-height: 1.5rem;
|
||||
}
|
||||
|
||||
.banner {
|
||||
margin: 10%;
|
||||
font-size: 2em;
|
||||
margin: 0 auto 4rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.content {
|
||||
margin: 0 10%;
|
||||
padding: 0 1rem;
|
||||
margin: 0 auto;
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
height: 100vh;
|
||||
height: 100dvh;
|
||||
}
|
@ -1 +0,0 @@
|
||||
export const prerender = true;
|
@ -1,13 +0,0 @@
|
||||
<script lang="ts">
|
||||
|
||||
export let url: string;
|
||||
export let title: string;
|
||||
export let author: string;
|
||||
|
||||
</script>
|
||||
|
||||
<a href="{ url }">
|
||||
<span class="author">{ author }</span>
|
||||
-
|
||||
<i class="title">{ title }</i>
|
||||
</a>
|
@ -1 +0,0 @@
|
||||
export const prerender = true;
|
@ -1,78 +0,0 @@
|
||||
<div id="no-chromium-head">
|
||||
|
||||
<style lang="scss">
|
||||
#no-chromium-popup {
|
||||
position: fixed;
|
||||
display: flex;
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: rgba(0, 0, 0, 0.125);
|
||||
font-family: Noto Sans, sans serif;
|
||||
color: white;
|
||||
z-index: 10;
|
||||
|
||||
.nc-popup-inner {
|
||||
display: block;
|
||||
position: relative;
|
||||
margin: auto;
|
||||
background-color: #FF6F00;
|
||||
padding: 1em;
|
||||
border-radius: 5px;
|
||||
|
||||
button {
|
||||
border-style: none;
|
||||
font-weight: bold;
|
||||
background-colour: white;
|
||||
font-size: 2em;
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
margin: 3px;
|
||||
color: white;
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
}
|
||||
|
||||
transition-duration: 0.1s;
|
||||
|
||||
&.nc-no {
|
||||
background-color: #800;
|
||||
|
||||
&:hover {
|
||||
background-color: #B00;
|
||||
}
|
||||
}
|
||||
|
||||
&.nc-ok {
|
||||
background-color: #080;
|
||||
|
||||
&:hover {
|
||||
background-color: #0B0;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="no-chromium-body">
|
||||
|
||||
<div id="no-chromium-popup" style="display: none">
|
||||
|
||||
<div class="nc-popup-inner">
|
||||
<center><h1>Stop using Chromium based Web Browsers</h1></center>
|
||||
<a href="https://no-chromium.org/redirect"><button class="nc-no">No</button></a>
|
||||
<button class="nc-ok" id="no-chromium-hide-button">Ok</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
@ -1,26 +0,0 @@
|
||||
async function showNoChromiumPopup() {
|
||||
if (navigator.userAgent.includes("Chrome") && localStorage.getItem("no-chromium-popup-shown") != "1") {
|
||||
|
||||
const divPage = document.createElement("div");
|
||||
const response = await fetch("https://no-chromium.org/popup/");
|
||||
divPage.innerHTML = await response.text();
|
||||
|
||||
for (const child of divPage.querySelectorAll("#no-chromium-head > *")) {
|
||||
document.head.appendChild(child);
|
||||
}
|
||||
|
||||
for (const child of divPage.querySelectorAll("#no-chromium-body > *")) {
|
||||
document.body.appendChild(child);
|
||||
}
|
||||
|
||||
document.querySelector("#no-chromium-popup").style = "z-index: 9999;";
|
||||
document.querySelector("#no-chromium-hide-button").addEventListener("click", hideNoChromiumPopup);
|
||||
}
|
||||
}
|
||||
|
||||
function hideNoChromiumPopup() {
|
||||
document.querySelector("#no-chromium-popup").remove();
|
||||
localStorage.setItem("no-chromium-popup-shown", "1");
|
||||
}
|
||||
|
||||
showNoChromiumPopup();
|
@ -1,6 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<script type="text/javascript" src="/popup.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -1,13 +1,9 @@
|
||||
const plugin = require("tailwindcss/plugin");
|
||||
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
export default {
|
||||
content: ["./src/**/*.{htm,js,svelte,ts}"],
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [
|
||||
require('@tailwindcss/typography'),
|
||||
],
|
||||
plugins: [],
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue