mirror of https://github.com/zer0bin-dev/zer0bin
Compare commits
37 Commits
Author | SHA1 | Date |
---|---|---|
Kainoa Kanter | 832ccc3e88 | |
Kainoa Kanter | 1677032f4e | |
Daniel Mason | 9c245cf827 | |
Kainoa Kanter | ac1f4cf33a | |
hkc | 90d1966779 | |
Kainoa Kanter | f0a3670913 | |
Kainoa Kanter | 81e5a3f7a8 | |
Mars | e7c96047cf | |
Kainoa Kanter | e2037f7522 | |
idanoo | 7eb63190f0 | |
Kainoa Kanter | 82d2087281 | |
Kainoa Kanter | 5e77dcf43b | |
mellowmarshe | db0d09bad7 | |
Noel | 0c78b83b30 | |
Noel | 6e8e2b119a | |
Noel | 479354fe2c | |
Noel | 75de8c53e3 | |
Noel | e9e18e3501 | |
domterion | de58aa84c2 | |
ThatOneCalculator | fd6b91977b | |
ThatOneCalculator | 0050ea2fb9 | |
ThatOneCalculator | 5bb8c3441b | |
Kainoa Kanter | 3ee8b85213 | |
ThatOneCalculator | 535530c34f | |
ThatOneCalculator | 21ec4c1ef0 | |
ThatOneCalculator | d683701360 | |
ThatOneCalculator | 0e1bb82944 | |
ThatOneCalculator | f1ccf6a836 | |
ThatOneCalculator | fa07222803 | |
ThatOneCalculator | 3cfda99765 | |
ThatOneCalculator | d96287c206 | |
mellowmarshe | 1146f4b7da | |
Kainoa Kanter | 7be6aa6cf2 | |
ThatOneCalculator | 6f55b59d7b | |
ThatOneCalculator | 9ff53c1345 | |
ThatOneCalculator | f001286f5b | |
Kainoa Kanter | b03ca2c8f7 |
|
@ -1,3 +1,10 @@
|
|||
"Wait, but isn't Cartograph CF a paid font you need a license for?"
|
||||
|
||||
![You](https://c.tenor.com/Mxgk7rxrzq8AAAAC/lithiumare-kiracord.gif)
|
||||
|
||||
# Ok but fr
|
||||
|
||||
People have been pirating Cartograph CF for a looong time, but if you would like to use Fira Code (a free font) instead:
|
||||
1. `cd frontend`
|
||||
2. `mv style/font-fira.scss style/font.scss`
|
||||
3. Rebuild frontend
|
||||
|
|
11
README.md
11
README.md
|
@ -26,8 +26,8 @@
|
|||
# Features
|
||||
|
||||
- ✨ Code highlighting and line numbers (default)
|
||||
- 📖 Markdown rendering (click the <a href=""><img alt="Markdown" src="https://user-images.githubusercontent.com/44733677/161484749-fdf60750-36ae-4d0a-aaa5-cdcae54fc805.svg" height=18></a> button)
|
||||
- 🔥 Single-view pastes (click the <a href=""><img alt="Fire" src="https://user-images.githubusercontent.com/44733677/161485115-c5fccb81-fa21-4e67-88fd-9a6f9dff728e.svg" height=18></a> button)
|
||||
- 📖 Markdown rendering (click the <a href="https://github.com/zer0bin-dev/zer0bin"><img alt="Markdown" src="https://user-images.githubusercontent.com/44733677/161484749-fdf60750-36ae-4d0a-aaa5-cdcae54fc805.svg" height=18></a> button)
|
||||
- 🔥 Single-view pastes (click the <a href="https://github.com/zer0bin-dev/zer0bin"><img alt="Fire" src="https://user-images.githubusercontent.com/44733677/161485115-c5fccb81-fa21-4e67-88fd-9a6f9dff728e.svg" height=18></a> button)
|
||||
- 🧑💻 [CLI Client](https://github.com/zer0bin-dev/zer0)
|
||||
- 🚀 Easily selfhostable
|
||||
- 👀 View counter
|
||||
|
@ -46,15 +46,14 @@ Submit your public instance [here](https://github.com/Domterion/zer0bin/issues/n
|
|||
|
||||
| URL | Expiration | Max paste size | Total Pastes | Version | Country |
|
||||
| ---------------------------------------------- | ---------- | -------------- | -------------------------------------------- | --------------------------------------------- | ------- |
|
||||
| [zer0b.in](https://zer0b.in) | 90 days | 50,000 chars | ![pastes](https://zer0b.in/api/b/t) | ![version](https://zer0b.in/api/b/v) | 🇺🇸 USA |
|
||||
| [stepbro.voring.me](https://stepbro.voring.me) | 365 days | 69,000 chars | ![pastes](https://stepbro.voring.me/api/b/t) | ![version](https://stepbro.voring.me/api/b/v) | 🇺🇸 USA |
|
||||
| [tinker.nz](https://tinker.nz/) | 28 days | 69,420 chars | ![pastes](https://tinker.nz/api/b/t) | ![version](https://tinker.nz/api/b/v) | 🇳🇿 NZ |
|
||||
| [paste.mint.lgbt](https://paste.mint.lgbt) | 30 days | 50,000 chars | ![pastes](https://paste.mint.lgbt/api/b/t) | ![version](https://paste.mint.lgbt/api/b/v) | 🇨🇱 Chile |
|
||||
|
||||
|
||||
# Technologies used
|
||||
|
||||
### Frontend:
|
||||
|
||||
<a href="https://www.typescriptlang.org/"><img src="https://github.com/tandpfun/skill-icons/raw/main/icons/TypeScript.svg" height=40/></a> <a href="https://definitelytyped.org/"><img src="https://cdn.discordapp.com/attachments/810799100940255260/953567495321710602/DefinitelyTyped.svg" height=40/></a> <a href="https://sass-lang.com/"><img src="https://github.com/tandpfun/skill-icons/raw/main/icons/Sass.svg" height=40/></a> <a href="https://pugjs.org/"><img src="https://github.com/tandpfun/skill-icons/raw/main/icons/Pug-Dark.svg" height=40/></a> <a href="https://rosepinetheme.com/"><img src="https://cdn.discordapp.com/attachments/810799100940255260/953176309444542464/RosePine.svg" height=40/></a> <a href="https://highlightjs.org/"><img src="https://cdn.discordapp.com/attachments/810799100940255260/956227499229061140/hljs.svg" height=40/></a> <a href="https://marked.js.org/"><img src="https://cdn.discordapp.com/attachments/810799100940255260/956263178961047612/MarkedJS.svg" height=40/></a> <a href="https://github.com/ant-design/ant-design-icons"><img src="https://cdn.discordapp.com/attachments/810799100940255260/956227498985799690/anticons.svg" height=40/></a><br><a href="https://github.com/idiotWu/smooth-scrollbar"><img src="https://cdn.discordapp.com/attachments/810799100940255260/953564432628322364/SmoothScrollJS.svg" height=40/></a> <a href="https://atomiks.github.io/tippyjs/"><img src="https://cdn.discordapp.com/attachments/872332549777666078/955624715521769522/Tippy.svg" height=40/></a> <a href="https://github.com/loonywizard/js-confetti"><img src="https://cdn.discordapp.com/attachments/810799100940255260/955609316042362930/JSConfetti.svg" height=40/></a> <a href="https://github.com/hadialqattan/no-darkreader"><img src="https://cdn.discordapp.com/attachments/810799100940255260/955869669535907870/NoDarkReader.svg" height=40/></a> <a href="https://parceljs.org/"><img src="https://user-images.githubusercontent.com/44733677/158683062-17ac3b62-cacd-4add-babb-1f74f36020d8.svg" height=40/></a> <a href="https://prettier.io/"><img src="https://cdn.discordapp.com/attachments/810799100940255260/953339670538887318/Prettier.svg" height=40/></a> <a href="https://yarnpkg.org"><img src="https://cdn.discordapp.com/attachments/810799100940255260/954823377493852170/Yarn.svg" height=40/></a> <a href="https://transfonter.org"><img src="https://user-images.githubusercontent.com/44733677/159066877-234f68ba-e95c-439d-b5fe-74def49dc762.svg" height=40></a>
|
||||
<a href="https://www.typescriptlang.org/"><img src="https://github.com/tandpfun/skill-icons/raw/main/icons/TypeScript.svg" height=40/></a> <a href="https://sass-lang.com/"><img src="https://github.com/tandpfun/skill-icons/raw/main/icons/Sass.svg" height=40/></a> <a href="https://pugjs.org/"><img src="https://github.com/tandpfun/skill-icons/raw/main/icons/Pug-Dark.svg" height=40/></a> <a href="https://rosepinetheme.com/"><img src="https://cdn.discordapp.com/attachments/810799100940255260/953176309444542464/RosePine.svg" height=40/></a> <a href="https://highlightjs.org/"><img src="https://cdn.discordapp.com/attachments/810799100940255260/956227499229061140/hljs.svg" height=40/></a> <a href="https://marked.js.org/"><img src="https://cdn.discordapp.com/attachments/810799100940255260/956263178961047612/MarkedJS.svg" height=40/></a> <a href="https://github.com/ant-design/ant-design-icons"><img src="https://cdn.discordapp.com/attachments/810799100940255260/956227498985799690/anticons.svg" height=40/></a><br><a href="https://github.com/idiotWu/smooth-scrollbar"><img src="https://cdn.discordapp.com/attachments/810799100940255260/953564432628322364/SmoothScrollJS.svg" height=40/></a> <a href="https://atomiks.github.io/tippyjs/"><img src="https://cdn.discordapp.com/attachments/872332549777666078/955624715521769522/Tippy.svg" height=40/></a> <a href="https://github.com/loonywizard/js-confetti"><img src="https://cdn.discordapp.com/attachments/810799100940255260/955609316042362930/JSConfetti.svg" height=40/></a> <a href="https://github.com/hadialqattan/no-darkreader"><img src="https://cdn.discordapp.com/attachments/810799100940255260/955869669535907870/NoDarkReader.svg" height=40/></a> <a href="https://vitejs.dev/"><img src="https://cdn.discordapp.com/attachments/810799100940255260/961789632834600960/Vite-Dark.svg" height=40/></a> <a href="https://prettier.io/"><img src="https://cdn.discordapp.com/attachments/810799100940255260/953339670538887318/Prettier.svg" height=40/></a> <a href="https://yarnpkg.org"><img src="https://cdn.discordapp.com/attachments/810799100940255260/954823377493852170/Yarn.svg" height=40/></a>
|
||||
|
||||
### Backend:
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ CREATE TABLE IF NOT EXISTS pastes (
|
|||
"id" TEXT PRIMARY KEY,
|
||||
"content" TEXT NOT NULL,
|
||||
"views" BIGINT DEFAULT 0,
|
||||
"single_view" BOOLEAN DEFAULT false,
|
||||
"expires_at" TIMESTAMP WITHOUT TIME ZONE,
|
||||
"created_at" TIMESTAMP WITHOUT TIME ZONE DEFAULT(NOW() AT TIME ZONE 'utc')
|
||||
);
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"removeComments": false
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"extends": "@parcel/config-default",
|
||||
"compressors": {
|
||||
"*.{html,css,js,svg,map}": [
|
||||
"...",
|
||||
"@parcel/compressor-gzip",
|
||||
"@parcel/compressor-brotli"
|
||||
]
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB |
|
@ -0,0 +1,195 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="256"
|
||||
height="256"
|
||||
viewBox="0 0 256 256"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg12"
|
||||
sodipodi:docname="zer0bin.svg"
|
||||
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
|
||||
inkscape:export-filename="/home/kainoa/Downloads/zer0bin.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs16">
|
||||
<g
|
||||
id="SVG"
|
||||
fill="#ffffff"
|
||||
transform="scale(2) translate(20,79)">
|
||||
<path
|
||||
id="S"
|
||||
d="M 5.482,31.319 C2.163,28.001 0.109,23.419 0.109,18.358 C0.109,8.232 8.322,0.024 18.443,0.024 C28.569,0.024 36.782,8.232 36.782,18.358 L26.042,18.358 C26.042,14.164 22.638,10.765 18.443,10.765 C14.249,10.765 10.850,14.164 10.850,18.358 C10.850,20.453 11.701,22.351 13.070,23.721 L13.075,23.721 C14.450,25.101 15.595,25.500 18.443,25.952 L18.443,25.952 C23.509,26.479 28.091,28.006 31.409,31.324 L31.409,31.324 C34.728,34.643 36.782,39.225 36.782,44.286 C36.782,54.412 28.569,62.625 18.443,62.625 C8.322,62.625 0.109,54.412 0.109,44.286 L10.850,44.286 C10.850,48.480 14.249,51.884 18.443,51.884 C22.638,51.884 26.042,48.480 26.042,44.286 C26.042,42.191 25.191,40.298 23.821,38.923 L23.816,38.923 C22.441,37.548 20.468,37.074 18.443,36.697 L18.443,36.692 C13.533,35.939 8.800,34.638 5.482,31.319 L5.482,31.319 L5.482,31.319 Z" />
|
||||
<path
|
||||
id="V"
|
||||
d="M 73.452,0.024 L60.482,62.625 L49.742,62.625 L36.782,0.024 L47.522,0.024 L55.122,36.687 L62.712,0.024 L73.452,0.024 Z" />
|
||||
<path
|
||||
id="G"
|
||||
d="M 91.792,25.952 L110.126,25.952 L110.126,44.286 L110.131,44.286 C110.131,54.413 101.918,62.626 91.792,62.626 C81.665,62.626 73.458,54.413 73.458,44.286 L73.458,44.286 L73.458,18.359 L73.453,18.359 C73.453,8.233 81.665,0.025 91.792,0.025 C101.913,0.025 110.126,8.233 110.126,18.359 L99.385,18.359 C99.385,14.169 95.981,10.765 91.792,10.765 C87.597,10.765 84.198,14.169 84.198,18.359 L84.198,44.286 L84.198,44.286 C84.198,48.481 87.597,51.880 91.792,51.880 C95.981,51.880 99.380,48.481 99.385,44.291 L99.385,44.286 L99.385,36.698 L91.792,36.698 L91.792,25.952 L91.792,25.952 Z" />
|
||||
</g>
|
||||
<clipPath
|
||||
id="_clipPath_8TWIgR1z3pxinjWBiigzcEIrVJKv9Gq4">
|
||||
<rect
|
||||
width="500"
|
||||
height="500"
|
||||
id="rect836" />
|
||||
</clipPath>
|
||||
<filter
|
||||
id="Hmac7mZraFWHw0G84Yxj4QuzeTFp0E7Y"
|
||||
x="-0.22015058"
|
||||
y="-0.085804489"
|
||||
width="1.4403012"
|
||||
height="1.171609"
|
||||
filterUnits="objectBoundingBox"
|
||||
color-interpolation-filters="sRGB">
|
||||
<feGaussianBlur
|
||||
in="SourceGraphic"
|
||||
stdDeviation="6.440413594258542"
|
||||
id="feGaussianBlur843" />
|
||||
<feOffset
|
||||
dx="0"
|
||||
dy="0"
|
||||
result="pf_100_offsetBlur"
|
||||
id="feOffset845" />
|
||||
<feFlood
|
||||
flood-color="#000000"
|
||||
flood-opacity="0.65"
|
||||
id="feFlood847" />
|
||||
<feComposite
|
||||
in2="pf_100_offsetBlur"
|
||||
operator="in"
|
||||
result="pf_100_dropShadow"
|
||||
id="feComposite849" />
|
||||
<feBlend
|
||||
in="SourceGraphic"
|
||||
in2="pf_100_dropShadow"
|
||||
mode="normal"
|
||||
id="feBlend851" />
|
||||
</filter>
|
||||
<linearGradient
|
||||
id="linearGradient5041">
|
||||
<stop
|
||||
style="stop-color:#3e4b4b;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop5043" />
|
||||
<stop
|
||||
style="stop-color:#1e3449;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop5045" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
r="640"
|
||||
fy="825.16089"
|
||||
fx="293.49887"
|
||||
cy="825.16089"
|
||||
cx="293.49887"
|
||||
gradientTransform="matrix(2.7998301,-1.4738538,0.45507806,0.86449643,-926.2596,769.338)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="radialGradient3133"
|
||||
xlink:href="#linearGradient4453-1"
|
||||
inkscape:collect="always" />
|
||||
<linearGradient
|
||||
id="linearGradient4453-1">
|
||||
<stop
|
||||
id="stop4455-4"
|
||||
offset="0"
|
||||
style="stop-color:#070808;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop4457-0"
|
||||
offset="1"
|
||||
style="stop-color:#152534;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="namedview14"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.28"
|
||||
inkscape:cx="111.32812"
|
||||
inkscape:cy="116.40625"
|
||||
inkscape:window-width="1183"
|
||||
inkscape:window-height="686"
|
||||
inkscape:window-x="1353"
|
||||
inkscape:window-y="730"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg12" />
|
||||
<rect
|
||||
style="fill:#191724;fill-opacity:1;stroke:#9ccfd8;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect2248"
|
||||
width="256"
|
||||
height="256"
|
||||
x="0"
|
||||
y="0" />
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
id="layer1"
|
||||
style="display:none"
|
||||
transform="translate(-606.58583,-699.5242)">
|
||||
<image
|
||||
y="392.14789"
|
||||
x="-90.714287"
|
||||
id="image3047"
|
||||
xlink:href="../../tomasi/Projects/nimrod/logo/new-symbols.png"
|
||||
height="329"
|
||||
width="800" />
|
||||
</g>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
d="m 602.64247,29.71093 h -28.65 v 7.28362 c 0,1.59787 0.4668,2.98732 1.4003,4.16834 0.9336,1.18104 2.0863,1.84067 3.4542,1.77155 h 23.6088 v 5.013 h -25.1124 c -2.2405,0 -4.1698,-0.86841 -5.7879,-2.60522 -1.556,-1.80627 -2.3339,-3.95992 -2.3339,-6.46093 V 14.28805 c 0,-2.50097 0.7779,-4.61988 2.3339,-6.35673 1.6181,-1.80625 3.5474,-2.70938 5.7879,-2.70942 h 17.1773 c 2.2405,4e-5 4.1387,0.90317 5.6946,2.70942 1.6181,1.73685 2.4272,3.85576 2.4272,6.35673 v 15.42288 m -4.9576,-4.59617 V 16.1748 c 0,-1.59784 -0.4668,-2.98729 -1.4003,-4.16836 -0.9336,-1.18099 -2.1161,-1.77151 -3.5475,-1.77154 h -13.8901 c -1.3693,3e-5 -2.5206,0.59055 -3.4542,1.77154 -0.9335,1.18107 -1.6566,2.59635 -1.4003,4.16836 v 8.93996 h 23.6924 m -40.8208,-41.56827 -0.093,64.40095 h -25.4857 c -2.2406,0 -4.1699,-0.86841 -5.788,-2.60522 -1.5559,-1.80627 -2.3339,-3.95992 -2.3339,-6.46093 l 0.093,-24.59324 c 0.062,-2.50097 0.8713,-4.61988 2.4272,-6.35673 1.5559,-1.80625 3.4541,-2.70938 5.6947,-2.70942 h 20.3414 l 0.093,-21.67541 h 5.051 m -5.1444,59.80479 -0.093,-33.53321 h -18.7445 c -1.3692,4e-5 -2.5206,0.66002 -3.4542,1.97996 -0.9335,1.32001 -1.4003,2.77893 -1.4003,4.37677 l 0.093,20.81975 c 0,1.59787 0.4357,3.05679 1.307,4.37675 0.8713,1.31999 1.9915,1.97998 3.3608,1.97998 h 18.9312 m -40.4211,-4.46999 c 0,2.50101 -0.8091,4.65466 -2.4272,6.46093 -1.5559,1.73681 -3.4541,2.60522 -5.6946,2.60522 h -19.0443 c -2.2406,0 -4.1699,-0.86841 -5.788,-2.60522 -1.5559,-1.80627 -2.3339,-3.95992 -2.3339,-6.46093 V 14.28805 c 0,-2.50097 0.778,-4.61988 2.3339,-6.35673 1.6181,-1.80625 3.5474,-2.70938 5.788,-2.70942 h 19.0443 c 2.2405,4e-5 4.1387,0.90317 5.6946,2.70942 1.6181,1.73685 2.4272,3.85576 2.4272,6.35673 v 24.59324 m -4.9576,-1.88674 V 16.1748 c 0,-1.59784 -0.4668,-2.98729 -1.4003,-4.16836 -0.9336,-1.18099 -2.1161,-1.77151 -3.5475,-1.77154 h -15.7572 c -1.3692,3e-5 -2.5206,0.59055 -3.4541,1.77154 -0.9336,1.18107 -1.4004,2.57052 -1.4004,4.16836 v 20.81975 c 0,1.59787 0.4668,2.98732 1.4004,4.16834 0.9335,1.18104 2.0849,1.77155 3.4541,1.77155 h 15.7572 c 1.4314,0 2.6139,-0.59051 3.5475,-1.77155 0.9335,-1.18102 1.4003,-2.57047 1.4003,-4.16834 m -43.2742,-8.62734 h -4.9577 V 16.1748 c 0,-1.59784 -0.4667,-2.98729 -1.4003,-4.16836 -0.9335,-1.18099 -2.116,-1.77151 -3.5474,-1.77154 h -13.8902 c -1.3692,3e-5 -2.5206,0.59055 -3.4541,1.77154 -0.9336,1.18107 -1.4003,2.57052 -1.4003,4.16836 v 20.81975 c 0,1.59787 0.4667,2.98732 1.4003,4.16834 0.9335,1.18104 2.0849,1.77155 3.4541,1.77155 h 23.5155 l 0.093,5.013 h -25.1124 c -2.2405,0 -4.1698,-0.86841 -5.7879,-2.60522 -1.5559,-1.80627 -2.3339,-3.95992 -2.3339,-6.46093 V 14.28805 c 0,-2.50097 0.778,-4.61988 2.3339,-6.35673 1.6181,-1.80625 3.5474,-2.70938 5.7879,-2.70942 h 17.1773 c 2.2405,4e-5 4.1387,0.90317 5.6946,2.70942 1.6181,1.73685 2.4272,3.85576 2.4272,6.35673 v 14.07916"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:87.357px;line-height:125%;font-family:Discognate;-inkscape-font-specification:Discognate;letter-spacing:0px;word-spacing:0px;display:none;fill:#ffffff;fill-opacity:1;stroke:none"
|
||||
id="path4870" />
|
||||
<g
|
||||
id="g881"
|
||||
transform="translate(-2.593955,-1.015618)">
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="m 130.59396,234.67648 c -55.515318,0 -78.87335,-25.08496 -78.87335,-105.66087 0,-80.575902 23.358032,-105.660854 78.87335,-105.660854 55.51531,0 78.87334,25.084952 78.87334,105.660854 0,80.57591 -23.35803,105.66087 -78.87334,105.66087 z m 0,-29.18977 c 32.79723,0 48.15593,-11.40225 48.15593,-76.4711 0,-65.068838 -15.3587,-76.471096 -48.15593,-76.471096 -32.797246,0 -48.15594,11.402258 -48.15594,76.471096 0,65.06885 15.358694,76.4711 48.15594,76.4711 z"
|
||||
id="path1181"
|
||||
style="fill:#9ccfd8;fill-opacity:1;stroke-width:0.155958"
|
||||
sodipodi:nodetypes="ssssssssss" />
|
||||
<g
|
||||
id="g1392"
|
||||
transform="matrix(1.9416434,-0.45122023,0.48590571,2.0908983,88.365407,95.983077)">
|
||||
<path
|
||||
fill="#c1694f"
|
||||
d="M 3.968,33.446 C 2.211,35.204 0.47,36.312 0.079,35.921 -0.312,35.53 0.797,33.789 2.554,32.032 4.311,30.274 6.052,29.166 6.443,29.557 6.833,29.948 5.725,31.688 3.968,33.446 Z"
|
||||
id="path1368"
|
||||
style="fill:#eb6f92;fill-opacity:1" />
|
||||
<path
|
||||
fill="#ffcc4d"
|
||||
d="M 6.443,29.558 4.321,27.436 c 0,0 -1.083,1.393 -2.284,3.63 -0.9,1.676 -1.251,2.734 -1.251,2.734 l 0.707,0.707 0.707,0.707 c 0,0 1.059,-0.352 2.734,-1.251 2.237,-1.201 3.629,-2.284 3.629,-2.284 z"
|
||||
id="path1370"
|
||||
style="fill:#f6c177;fill-opacity:1" />
|
||||
<path
|
||||
fill="#31373d"
|
||||
d="m 34.02,1.98 c -3.535,-3.536 -18.164,10.297 -18.871,11.004 -0.707,0.707 -1.304,1.348 -0.928,1.724 L 12.1,16.829 C 9.978,18.951 3.614,26.728 4.321,27.435 l 2.122,2.122 2.121,2.121 c 0.707,0.707 8.485,-5.657 10.607,-7.778 l 2.121,-2.121 c 0.376,0.376 1.017,-0.222 1.724,-0.929 C 23.723,20.144 37.556,5.516 34.02,1.98 Z"
|
||||
id="path1372"
|
||||
style="fill:#31748f;fill-opacity:1" />
|
||||
<path
|
||||
fill="#ffcc4d"
|
||||
d="m 23.016,20.851 c 0.085,-0.084 0.362,-0.375 0.774,-0.817 l -7.823,-7.822 c -0.442,0.411 -0.732,0.689 -0.817,0.774 -0.707,0.707 -1.304,1.348 -0.928,1.724 l 3.535,3.536 3.536,3.535 c 0.375,0.374 1.016,-0.223 1.723,-0.93 z"
|
||||
id="path1374"
|
||||
style="fill:#f6c177;fill-opacity:1" />
|
||||
<path
|
||||
fill="#ffac33"
|
||||
d="M 31.212,2.001 C 30.285,1.074 29.048,0.102 27.28,0.986 25.512,1.87 19.967,5.427 17.402,7.991 c -1.322,1.322 -1.247,2.102 -0.751,2.165 0.821,0.106 1.37,0.088 2.122,-0.663 0.75,-0.751 0.883,-2.033 0.883,-2.033 0,0 3.05,-2.342 5.458,-3.778 2.409,-1.437 3.268,-1.682 4.11,-0.84 0.842,0.842 1.988,-0.841 1.988,-0.841 z"
|
||||
id="path1376"
|
||||
style="fill:#ebbcba;fill-opacity:1" />
|
||||
<path
|
||||
fill="#ffac33"
|
||||
d="m 28.87,2.487 4.643,4.643 c 0.353,-0.709 0.631,-1.384 0.818,-2.011 l -3.45,-3.45 C 30.254,1.857 29.58,2.135 28.87,2.487 Z"
|
||||
id="path1378"
|
||||
style="fill:#ebbcba;fill-opacity:1" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.svg" />
|
||||
<link rel="stylesheet" href="/style/style.scss" />
|
||||
<script type="module" src="/src/index.ts" defer></script>
|
||||
<pug src="index.pug"></pug>
|
|
@ -1,5 +1,3 @@
|
|||
doctype html
|
||||
|
||||
!= '<!--\n'
|
||||
!= '▀▀█ █▀▀ █▀▀█ █▀▀█ █▀▀▄ ▀ █▀▀▄ \n'
|
||||
!= '▄▀ █▀▀ █▄▄▀ █▄▀█ █▀▀▄ █ █ █ \n'
|
||||
|
@ -14,12 +12,9 @@ html(lang='en')
|
|||
meta(charset='UTF-8')
|
||||
meta(name='viewport' content='width=device-width, initial-scale=1.0')
|
||||
title zer0bin
|
||||
link(rel='shortcut icon' type='image/x-icon' href='favicon.ico')
|
||||
meta(name='theme-color' content='#90BDC9')
|
||||
meta(name='keywords' content='zerobin, zer0bin, paste, paste bin, pastebin, pastebin alternative, foss pastebin, open source pastebin, free pastebin, ghostbin, hastebin, pastebin.com, free pastebin online, paste online, github paste, github gist, github gist paste')
|
||||
meta(name='darkreader' content='NO-DARKREADER-PLUGIN')
|
||||
link(href='style/style.scss' rel='stylesheet')
|
||||
link(href='min/rosepine.min.css' rel='stylesheet')
|
||||
meta(name='title' content='zer0bin')
|
||||
meta(name='description' content='🖊 Just a place to paste')
|
||||
meta(property='og:type' content='website')
|
||||
|
@ -29,7 +24,6 @@ html(lang='en')
|
|||
meta(property='twitter:title' content='zer0bin')
|
||||
meta(property='twitter:description' content='🖊 Just a place to paste')
|
||||
meta(property='twitter:image' content='https://raw.githubusercontent.com/zer0bin-dev/.github/main/zer0bin.png')
|
||||
script(defer='' type='module' src='src/index.ts')
|
||||
|
||||
body
|
||||
ul.noselect#messages
|
||||
|
@ -46,13 +40,13 @@ html(lang='en')
|
|||
//- - }
|
||||
button#new-button.btn(aria-label='New paste')
|
||||
button#copy-button.btn(aria-label='Copy')
|
||||
button#share-button.btn(aria-label='Share')
|
||||
a(href='https://github.com/zer0bin-dev/zer0bin' aria-label='GitHub repo')
|
||||
button#github-button.btn(aria-label='GitHub')
|
||||
span.viewcounter.noselect#viewcounter-label(style='visibility: hidden; display: none') Views:
|
||||
span.viewcounter.noselect#viewcounter-count(style='visibility: hidden; display: none')
|
||||
|
||||
.bottom-button-wrapper
|
||||
button#share-button.btn(aria-label='Share' style='visibility: hidden')
|
||||
button#hide-button.btn(aria-label='Hide')
|
||||
|
||||
.scrollbar-container
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -5,27 +5,28 @@
|
|||
"browserslist": "> 0.5%, last 2 versions, not dead",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"start": "parcel index.pug",
|
||||
"build": "parcel build index.pug --public-url /"
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@parcel/compressor-brotli": "^2.4.1",
|
||||
"@parcel/compressor-gzip": "^2.4.1",
|
||||
"@parcel/core": "^2.4.1",
|
||||
"@parcel/transformer-pug": "^2.4.1",
|
||||
"@parcel/transformer-sass": "^2.4.1",
|
||||
"@types/core-js": "^2.5.5",
|
||||
"@types/node": "^17.0.21"
|
||||
"@types/node": "^17.0.21",
|
||||
"pug": "^3.0.2",
|
||||
"sass": "^1.50.0",
|
||||
"vite": "^2.9.0",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-pug": "^0.3.1"
|
||||
},
|
||||
"description": "just a place to paste",
|
||||
"repository": "https://github.com/zer0bin-dev/zer0bin",
|
||||
"author": "Domterion, ThatOneCalculator",
|
||||
"dependencies": {
|
||||
"@ant-design/icons-svg": "^4.2.1",
|
||||
"highlight.js": "^11.5.0",
|
||||
"js-confetti": "^0.10.2",
|
||||
"marked": "^4.0.12",
|
||||
"no-darkreader": "^1.0.1",
|
||||
"parcel": "^2.4.1",
|
||||
"smooth-scrollbar": "^8.7.4",
|
||||
"tippy.js": "^6.3.7"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
declare const API_URL: string
|
||||
declare const CONFETTI_CHANCE: string
|
|
@ -93,6 +93,14 @@ tippy("#copy-button", {
|
|||
allowHTML: true,
|
||||
})
|
||||
|
||||
tippy("#share-button", {
|
||||
content: `Share paste<br><span class='keybind'>Copies URL</span>`,
|
||||
placement: "top",
|
||||
animation: "scale",
|
||||
theme: "rosepine",
|
||||
allowHTML: true,
|
||||
})
|
||||
|
||||
tippy("#github-button", {
|
||||
content: `GitHub<br><span class='keybind'>
|
||||
${renderIconDefinitionToSVGElement(StarOutlined, {
|
||||
|
@ -116,14 +124,6 @@ tippy("#hide-button", {
|
|||
allowHTML: true,
|
||||
})
|
||||
|
||||
tippy("#share-button", {
|
||||
content: "Share paste",
|
||||
placement: "top",
|
||||
animation: "scale",
|
||||
theme: "rosepine",
|
||||
allowHTML: true,
|
||||
})
|
||||
|
||||
const observer = new MutationObserver(callback)
|
||||
|
||||
function callback() {
|
||||
|
|
|
@ -5,12 +5,12 @@ import JSConfetti from "js-confetti"
|
|||
import Scrollbar from "smooth-scrollbar"
|
||||
|
||||
import "./icons"
|
||||
import hljs from "../min/highlight.min"
|
||||
import hljs from "highlight.js/lib/common"
|
||||
// import hljs from "../min/highlight.min"
|
||||
|
||||
import config from "../config.json"
|
||||
import "../min/rosepine.min.css"
|
||||
import { toggleHiddenIcon } from "./icons"
|
||||
const apiUrl = config.api_url
|
||||
const confettiChance = parseInt(config.confetti_chance)
|
||||
|
||||
let rawContent = ""
|
||||
let buttonPaneHidden = false
|
||||
let isMarkdown = false
|
||||
|
@ -63,7 +63,7 @@ function enable(element: HTMLButtonElement) {
|
|||
|
||||
async function postPaste(content: string, callback: Function) {
|
||||
const payload = { content, single_view: singleView }
|
||||
await fetch(`${apiUrl}/p/n`, {
|
||||
await fetch(`${API_URL}/p/n`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
@ -87,7 +87,7 @@ async function postPaste(content: string, callback: Function) {
|
|||
}
|
||||
|
||||
async function getPaste(id: string, callback: Function) {
|
||||
await fetch(`${apiUrl}/p/${id}`, {
|
||||
await fetch(`${API_URL}/p/${id}`, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
@ -117,6 +117,7 @@ function newPaste() {
|
|||
enable(saveButton)
|
||||
disable(newButton)
|
||||
disable(copyButton)
|
||||
disable(shareButton)
|
||||
enable(singleViewButton)
|
||||
|
||||
editor.value = ""
|
||||
|
@ -128,7 +129,6 @@ function newPaste() {
|
|||
hide(codeViewPre)
|
||||
hide(viewCounterLabel)
|
||||
hide(viewCounter)
|
||||
hide(shareButton)
|
||||
viewCounterLabel.style.display = "none"
|
||||
viewCounter.style.display = "none"
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ function viewPaste(content: string, views: string, singleView: boolean) {
|
|||
addMessage("This is a single-view paste!")
|
||||
}
|
||||
|
||||
show(shareButton)
|
||||
enable(shareButton)
|
||||
shareButton.addEventListener("click", function () {
|
||||
const url = window.location.toString()
|
||||
if (navigator.canShare) {
|
||||
|
@ -218,7 +218,9 @@ async function savePaste() {
|
|||
rawContent = res["data"]["content"]
|
||||
viewPaste(rawContent, "0", res["data"]["single_view"])
|
||||
|
||||
const rand = Math.floor(Math.random() * confettiChance * 6)
|
||||
const rand = Math.floor(
|
||||
Math.random() * parseInt(CONFETTI_CHANCE ?? "10") * 6
|
||||
)
|
||||
|
||||
if (rand < 5) {
|
||||
jsConfetti.addConfetti({
|
||||
|
@ -270,16 +272,16 @@ saveButton.addEventListener("click", async function () {
|
|||
})
|
||||
|
||||
document.addEventListener("keydown", (e) => {
|
||||
if (e.ctrlKey && e.key === "s") {
|
||||
if (e.ctrlKey && e.code === "KeyS") {
|
||||
e.preventDefault()
|
||||
savePaste()
|
||||
} else if (e.ctrlKey && e.key === "n") {
|
||||
} else if (e.ctrlKey && e.code === "KeyN") {
|
||||
e.preventDefault()
|
||||
newPaste()
|
||||
} else if (e.ctrlKey && e.key === "d") {
|
||||
} else if (e.ctrlKey && e.code === "KeyD") {
|
||||
e.preventDefault()
|
||||
duplicatePaste()
|
||||
} else if (e.ctrlKey && e.key === "m") {
|
||||
} else if (e.ctrlKey && e.code === "KeyM") {
|
||||
e.preventDefault()
|
||||
toggleMarkdown()
|
||||
}
|
||||
|
@ -288,7 +290,7 @@ document.addEventListener("keydown", (e) => {
|
|||
editor.addEventListener(
|
||||
"keydown",
|
||||
function (e: KeyboardEvent) {
|
||||
if (e.key == "Tab") {
|
||||
if (e.code == "Tab") {
|
||||
e.preventDefault()
|
||||
|
||||
let start: number = this.selectionStart
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
||||
|
||||
/* Modules */
|
||||
"module": "es6" /* Specify what module code is generated. */,
|
||||
"module": "esnext" /* Specify what module code is generated. */,
|
||||
// "rootDir": "./", /* Specify the root folder within your source files. */
|
||||
"moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */,
|
||||
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
@font-face {
|
||||
font-family: "Cartograph CF";
|
||||
src: url("../fonts/FiraCode-VF.woff2") format("woff2");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
|
@ -1,17 +1,13 @@
|
|||
@font-face {
|
||||
font-family: "Cartograph CF";
|
||||
src: url("../fonts/CartographCF-Regular.woff2") format("woff2"),
|
||||
url("../fonts/CartographCF-Regular.woff") format("woff"),
|
||||
url("../fonts/CartographCF-Regular.ttf") format("truetype");
|
||||
src: url("../fonts/CartographCF-Regular.woff2") format("woff2");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Cartograph CF";
|
||||
src: url("../fonts/CartographCF-RegularItalic.woff2") format("woff2"),
|
||||
url("../fonts/CartographCF-RegularItalic.woff") format("woff"),
|
||||
url("../fonts/CartographCF-RegularItalic.ttf") format("truetype");
|
||||
src: url("../fonts/CartographCF-RegularItalic.woff2") format("woff2");
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
font-display: swap;
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
import { defineConfig, loadEnv } from "vite"
|
||||
import pugPlugin from "vite-plugin-pug"
|
||||
import viteCompression from "vite-plugin-compression"
|
||||
import { createRequire } from "module"
|
||||
|
||||
export default defineConfig(async ({ mode }) => {
|
||||
let config: any
|
||||
const env = loadEnv(mode, process.cwd(), "")
|
||||
|
||||
try {
|
||||
// @ts-ignore
|
||||
|
||||
// lazy hack so vite doesn't emit:
|
||||
// [rollup-plugin-dynamic-import-variables] Unexpected token (46:55)
|
||||
// file: zer0bin/frontend/src/index.ts:46:55
|
||||
// error during build:
|
||||
// SyntaxError: Unexpected token (46:55)
|
||||
|
||||
const _config = await import("./config.json")
|
||||
config = {
|
||||
api_url: JSON.stringify(_config.api_url),
|
||||
confetti_chance: JSON.stringify(_config.confetti_chance),
|
||||
}
|
||||
} catch (e) {
|
||||
config = {
|
||||
api_url: JSON.stringify(env.ZEROBIN_API_URL ?? env.API_URL),
|
||||
confetti_chance: JSON.stringify(
|
||||
env.ZEROBIN_CONFETTI_CHANCE ?? env.CONFETTI_CHANCE
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
plugins: [pugPlugin(), viteCompression()],
|
||||
define: {
|
||||
API_URL: config.api_url,
|
||||
CONFETTI_CHANCE: config.confetti_chance,
|
||||
},
|
||||
}
|
||||
})
|
1947
frontend/yarn.lock
1947
frontend/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue