aktueller Stand

This commit is contained in:
Flummi 2021-03-03 05:34:57 +01:00
parent ce6e23b77e
commit d6c12b9311
20 changed files with 652 additions and 225 deletions

6
package-lock.json generated
View File

@ -15,9 +15,9 @@
"integrity": "sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw==" "integrity": "sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw=="
}, },
"cuffeo": { "cuffeo": {
"version": "1.0.7", "version": "1.0.7-2",
"resolved": "https://registry.npmjs.org/cuffeo/-/cuffeo-1.0.7.tgz", "resolved": "https://registry.npmjs.org/cuffeo/-/cuffeo-1.0.7-2.tgz",
"integrity": "sha512-9XpEUnN9jIfaiIMJwcfPW61PxTxBJUoa9VN/TjiWk7Z/jNStdrlPTdn6Y2cdclsWsHtAyabHdCNUAHscQ89WCQ==", "integrity": "sha512-4ZrP6C5jpCu7+UtgB3rJl5wZJ48FSrdaTVgyx7bPtC0gMcEm0O5NcCjiZkJDvbLqsN92LAywFoGmdjt/rXG9EA==",
"requires": { "requires": {
"flumm-fetch-cookies": "^1.3.5" "flumm-fetch-cookies": "^1.3.5"
} }

View File

@ -10,7 +10,7 @@
"author": "Flummi", "author": "Flummi",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"cuffeo": "^1.0.7", "cuffeo": "^1.0.7-2",
"flumm-fetch-cookies": "^1.4.0", "flumm-fetch-cookies": "^1.4.0",
"mariadb": "^2.5.2" "mariadb": "^2.5.2"
} }

View File

@ -1,146 +1,161 @@
/* written by sirx for f0ck.me */ /* written by sirx for f0ck.me */
/* use whatever you like */ /* use whatever you like */
ul#posts { ul#posts {
display: grid; display: grid;
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
grid-gap: 1em; grid-gap: 1em;
list-style: none; list-style: none;
padding: 0; padding: 0;
margin-top: 10px; margin-top: 10px;
} }
.navbar { .navbar {
background-color: #1b1b1b; background-color: #1b1b1b;
position: sticky; position: sticky;
top: 0; top: 0;
z-index: 1; z-index: 1;
font-family: monospace; font-family: monospace;
text-transform: uppercase; text-transform: uppercase;
text-shadow: 1px 1px black; text-shadow: 1px 1px black;
} }
body { body {
background-color: black; background-color: black;
color: white; color: white;
} }
html { html {
background-color: black; background-color: black;
} }
.container.is-fluid { .container.is-fluid {
padding-top: 10px; padding-top: 10px;
} }
li.post { li.post {
position: relative; position: relative;
} }
span.item-mime { span.item-mime {
position: absolute; position: absolute;
right: 0; right: 0;
top: 0; top: 0;
color: #68da20; color: #68da20;
text-shadow: 1px 1px black; text-shadow: 1px 1px black;
font-size: 11px; font-size: 11px;
text-transform: uppercase; text-transform: uppercase;
background: #000000b8; background: #000000b8;
visibility: hidden; visibility: hidden;
} }
li.post:hover > span.item-mime { li.post:hover > span.item-mime {
visibility: visible; visibility: visible;
} }
a.navbar-item:focus, a.navbar-item:focus-within, a.navbar-item:hover, a.navbar-item.is-active, .navbar-link:focus, .navbar-link:focus-within, .navbar-link:hover, .navbar-link.is-active { a.navbar-item:focus, a.navbar-item:focus-within, a.navbar-item:hover, a.navbar-item.is-active, .navbar-link:focus, .navbar-link:focus-within, .navbar-link:hover, .navbar-link.is-active {
background-color: #000000; background-color: #000000;
color: #ffffff; color: #ffffff;
} }
a#next, a#prev { a#next, a#prev {
position: relative; position: relative;
font-weight: normal; font-weight: normal;
top: 0px; top: 0px;
bottom: 932px; bottom: 932px;
margin: unset; margin: unset;
font-size: 30px; font-size: 30px;
color: #99ff00; color: #99ff00;
padding: 140px 40px 140px 40px; padding: 140px 40px 140px 40px;
cursor: pointer; cursor: pointer;
-webkit-transform: translateZ(0); align-content: inherit;
align-content: inherit; align-self: center;
align-self: center; bottom: 0;
bottom: 0;
} }
a#next, a#prev { a#next, a#prev {
position: sticky; position: sticky;
top: 0; top: 0;
} }
.content { .content {
display: grid; display: grid;
justify-content: space-around; justify-content: space-around;
grid-template-columns: 0fr 1fr 0fr; grid-template-columns: 0fr 1fr 0fr;
} }
.previous-post, .next-post { .previous-post, .next-post {
display: flex; display: flex;
} }
img#f0ck-image { img#f0ck-image {
max-width: 100%; max-width: 100%;
max-height: 500px; max-height: 500px;
} }
.metadata { .metadata {
text-align: center; text-align: center;
position: sticky; position: sticky;
bottom: 0; bottom: 0;
} }
a:hover { a:hover {
color: #99ff00; color: #99ff00;
opacity: 0.8; opacity: 0.8;
} }
a { a {
color: #99ff00; color: #99ff00;
cursor: pointer; cursor: pointer;
text-decoration: none; text-decoration: none;
} }
.navbar-item, .navbar-link { .navbar-item, .navbar-link {
color: white; color: white;
text-shadow: 1px 1px black; text-shadow: 1px 1px black;
} }
.media-object { .media-object {
text-align: center; text-align: center;
align-self: center; align-self: center;
} }
/*a.id-link { /*a.id-link {
padding-right: 5; padding-right: 5;
}*/ }*/
div#my-video { div#my-video {
max-height: unset; max-height: unset;
} }
.box:not(:last-child), .content:not(:last-child), .notification:not(:last-child), .progress:not(:last-child), .table:not(:last-child), .table-container:not(:last-child), .title:not(:last-child), .subtitle:not(:last-child), .block:not(:last-child), .highlight:not(:last-child), .breadcrumb:not(:last-child), .level:not(:last-child), .list:not(:last-child), .message:not(:last-child), .pagination:not(:last-child), .tabs:not(:last-child) { .box:not(:last-child),
margin-bottom: 0; .content:not(:last-child),
margin-top: 0; .notification:not(:last-child),
.progress:not(:last-child),
.table:not(:last-child),
.table-container:not(:last-child),
.title:not(:last-child),
.subtitle:not(:last-child),
.block:not(:last-child),
.highlight:not(:last-child),
.breadcrumb:not(:last-child),
.level:not(:last-child),
.list:not(:last-child),
.message:not(:last-child),
.pagination:not(:last-child),
.tabs:not(:last-child) {
margin-bottom: 0;
margin-top: 0;
} }
.video-container { .video-container {
position: relative; position: relative;
padding-bottom: 56.25%; /*16:9*/ padding-bottom: 56.25%;
padding-top: 30px; /*16:9*/
height: 0; padding-top: 30px;
height: 0;
overflow: hidden; overflow: hidden;
} }
.video-container video { .video-container video {
position: absolute; position: absolute;
top: 0; top: 0;
@ -150,189 +165,516 @@ max-height: unset;
} }
.irc { .irc {
padding: 10px; padding: 10px;
color: white; color: white;
} }
a#next:hover { a#next:hover {
box-shadow: -1px 0px #99ff001c; box-shadow: -1px 0px #99ff001c;
transition: all .2s; transition: all .2s;
} }
a#prev:hover { a#prev:hover {
box-shadow: 1px 0px #99ff001c; box-shadow: 1px 0px #99ff001c;
transition: all .2s; transition: all .2s;
} }
.navbar-brand a.navbar-item:focus, .navbar-brand a.navbar-item:hover { .navbar-brand a.navbar-item:focus, .navbar-brand a.navbar-item:hover {
background-color: black; background-color: black;
} }
.controls { .controls {
text-align: center; text-align: center;
} }
.content { .content {
min-height: 517px; min-height: 517px;
} }
#themeselector { #themeselector {
color: #fff; color: #fff;
background-color: #343a40; background-color: #343a40;
display: inline-block; display: inline-block;
font-weight: 600; font-weight: 600;
line-height: 1; line-height: 1;
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
vertical-align: baseline; vertical-align: baseline;
border-radius: 0.25rem; border-radius: 0.25rem;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
border: 0; border: 0;
outline: 0; outline: 0;
} }
select { select {
font-size: small; font-size: small;
} }
@media (max-width: 600px) { @media (max-width: 600px) {
a#next, a#prev { a#next, a#prev {
padding: 0; padding: 0;
} }
.content { .content {
min-height: 0; min-height: 0;
} }
} }
img#biohaz { img#biohaz {
width: 28px; width: 28px;
} }
.metadata { .metadata {
background: #1b1b1b; background: #1b1b1b;
border-top: 1px solid #262626; border-top: 1px solid #262626;
} }
.content { .content {
border-left: 1px solid #1b1b1b; border-left: 1px solid #1b1b1b;
border-right: 1px solid #1b1b1b; border-right: 1px solid #1b1b1b;
} }
.controls { .controls {
border-left: 1px solid #1b1b1b; border-left: 1px solid #1b1b1b;
border-right: 1px solid #1b1b1b; border-right: 1px solid #1b1b1b;
} }
#themeselector { #themeselector {
padding: 0.04em 0.2em; padding: 0.04em 0.2em;
vertical-align: top; vertical-align: top;
font-weight: 560; font-weight: 560;
} }
span.badge.badge-dark { span.badge.badge-dark {
margin-right: 5px; margin-right: 5px;
} }
.badge-dark, #themeselector { .badge-dark, #themeselector {
color: #fff; color: #fff;
background-color: #000000; background-color: #000000;
border-radius: 0; border-radius: 0;
border-left: 1px solid #262626; border-left: 1px solid #262626;
border-right: 1px solid #262626; border-right: 1px solid #262626;
border-top: 1px solid #000; border-top: 1px solid #000;
border-bottom: 1px solid #262626; border-bottom: 1px solid #262626;
} }
.video-js .vjs-control-bar { .video-js .vjs-control-bar {
background-color: #1b1b1b !important; background-color: #1b1b1b !important;
} }
a#rndbtn { a#rndbtn {
color: #fff; color: #fff;
background-color: #1b1b1b; background-color: #1b1b1b;
border-radius: 0; border-radius: 0;
border-left: 1px solid #262626; border-left: 1px solid #262626;
border-right: 1px solid #262626; border-right: 1px solid #262626;
border-top: 1px solid #262626; border-top: 1px solid #262626;
border-bottom: 1px solid #262626; border-bottom: 1px solid #262626;
padding: 0px 5px 0px 5px; padding: 0px 5px 0px 5px;
text-decoration: none; text-decoration: none;
} }
.contact { .contact {
border-left: 1px solid #1b1b1b; border-left: 1px solid #1b1b1b;
border-right: 1px solid #1b1b1b; border-right: 1px solid #1b1b1b;
border-bottom: 1px solid #1b1b1b; border-bottom: 1px solid #1b1b1b;
padding: 5px; padding: 5px;
} }
.irc { .irc {
border-left: 1px solid #1b1b1b; border-left: 1px solid #1b1b1b;
border-right: 1px solid #1b1b1b; border-right: 1px solid #1b1b1b;
border-bottom: 1px solid #1b1b1b; border-bottom: 1px solid #1b1b1b;
padding: 5px; padding: 5px;
} }
/* Testing Area */ /* Testing Area */
.content { .content {
position: relative; position: relative;
} }
a#next { a#next {
top: 0; top: 0;
position: absolute; position: absolute;
z-index: 1; z-index: 1;
left: 0; left: 0;
background: transparent; background: transparent;
width: 25%; width: 25%;
height: 95%; height: 95%;
} }
a#prev { a#prev {
position: absolute; position: absolute;
z-index: 1; z-index: 1;
right: 0; right: 0;
background: transparent; background: transparent;
width: 25%; width: 25%;
height: 95%; height: 95%;
} }
.vjs-control-bar { .vjs-control-bar {
z-index: 2; z-index: 2;
} }
.arrow-prev { .arrow-prev {
height: 100%; height: 100%;
display: flex; display: flex;
width: 100%; width: 100%;
align-items: center; align-items: center;
justify-content: end; justify-content: end;
} }
.arrow-next { .arrow-next {
height: 100%; height: 100%;
display: flex; display: flex;
width: 100%; width: 100%;
align-items: center; align-items: center;
justify-content: start; justify-content: start;
} }
a#next:hover { a#next:hover {
opacity: 1; opacity: 1;
box-shadow: none; box-shadow: none;
} }
a#next { a#next {
opacity: 0.2; opacity: 0.2;
} }
a#prev:hover { a#prev:hover {
opacity: 1; opacity: 1;
box-shadow: none; box-shadow: none;
} }
a#prev { a#prev {
opacity: 0.2; opacity: 0.2;
}
/* pagination */
.pagination {
padding: 8px;
background-clip: padding-box;
border: 1px solid;
border-color: #070809 #0d0e0f #131517;
border-color: rgba(0, 0, 0, 0.8) rgba(0, 0, 0, 0.65) rgba(0, 0, 0, 0.5);
border-radius: 3px;
display: inline-block;
vertical-align: baseline;
zoom: 1; *display: inline;
*vertical-align: auto;
background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0));
background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0));
background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0));
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0));
-webkit-box-shadow: 0 1px rgba(255, 255, 255, 0.05);
box-shadow: 0 1px rgba(255, 255, 255, 0.05);
}
.pagination > a, .pagination > span {
float: left;
margin-left: 5px;
padding: 0 6px;
min-width: 17px;
line-height: 27px;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 12px;
font-weight: 500;
color: #68da20;
text-align: center;
text-decoration: none;
border: 1px solid black;
border-radius: 3px;
}
.pagination :first-child {
margin-left: 0;
}
.pagination > a {
text-decoration: none;
text-shadow: 0 1px black;
background-clip: padding-box;
border-color: rgba(0, 0, 0, 0.9);
background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
background-image: -moz-linear-gradient(top, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
background-image: -o-linear-gradient(top, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
-webkit-box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), inset 0 1px rgba(255, 255, 255, 0.04), inset 0 -1px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.1);
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), inset 0 1px rgba(255, 255, 255, 0.04), inset 0 -1px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.1);
-webkit-transition: 0.1s ease-out;
-moz-transition: 0.1s ease-out;
-o-transition: 0.1s ease-out;
transition: 0.1s ease-out;
}
.pagination > a:hover {
background-color: #333;
background-color: rgba(255, 255, 255, 0.05);
}
.pagination > span, .pagination > a:active {
color: #68da20;
text-shadow: 0 -1px black;
background: #1c1c1c;
background: rgba(255, 255, 255, 0.01);
border-color: black rgba(0, 0, 0, 0.65) rgba(0, 0, 0, 0.6);
-webkit-box-shadow: inset 0 1px rgba(0, 0, 0, 0.05), inset 0 2px 2px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.06);
box-shadow: inset 0 1px rgba(0, 0, 0, 0.05), inset 0 2px 2px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.06);
}
.pagination .prev, .pagination .next {
font-family: Noteworthy, Arial, sans-serif;
font-size: 14px;
}
@font-face {
font-family: 'VCR';
src: url('/s/vcr.ttf') format('truetype');
}
span#f0ck {
font-family: 'VCR';
font-size: xx-large;
text-shadow: 1px 1px 1px black, 0px 0px 0px #9f0, -1px -1px 0px black, 1px -1px 0px black, -1px 1px 0px black, 0px 0px 0px #9f0;
}
.navbar-brand {
padding-bottom: 0;
}
/* nav overhaul */
.nav-item {
width: 100%;
text-align: center
}
.navbar-brand {
padding-top: 0
}
.navbar-nav.mr-auto {
flex-flow: row;
justify-content: space-between
}
.navbar.navbar-expand-lg {
background: #242424
}
.navigation-links {
display: flex;
background: #232323;
background-image: none;
border-radius: 3px;
border: 1px solid #000;
background-image: linear-gradient(to bottom,rgba(0,0,0,.12),rgba(0,0,0,0));
-webkit-box-shadow: 0 1px rgba(255,255,255,.05);
box-shadow: 0 1px rgba(255,255,255,.05);
border: 1px solid;
border-top-color: currentcolor;
border-right-color: currentcolor;
border-bottom-color: currentcolor;
border-left-color: currentcolor;
border-top-color: currentcolor;
border-right-color: currentcolor;
border-bottom-color: currentcolor;
border-left-color: currentcolor;
border-color: #070809 #0d0e0f #131517;
border-color: rgba(0,0,0,.8) rgba(0,0,0,.65) rgba(0,0,0,.5);
border-radius: 3px
}
.nav-link {
padding: 0;
display: flex;
border: 1px solid #000;
border-radius: 3px;
transition: .1s ease-out
}
.nav-link {
min-width: 17px;
line-height: 27px;
background-image: -webkit-linear-gradient(top,rgba(255,255,255,.04),rgba(255,255,255,0));
background-image: -moz-linear-gradient(top,rgba(255,255,255,.04),rgba(255,255,255,0));
background-image: -o-linear-gradient(top,rgba(255,255,255,.04),rgba(255,255,255,0));
background-image: linear-gradient(to bottom,rgba(255,255,255,.04),rgba(255,255,255,0));
-webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.04),inset 0 1px rgba(255,255,255,.04),inset 0 -1px rgba(0,0,0,.15),0 1px 1px rgba(0,0,0,.1)
}
.nav-item:hover>a:hover {
background-color: #333;
background-color: rgba(255,255,255,.05)
}
.navbar-nav {
padding: 5px
}
.nav-item {
width: 100%;
text-align: center
}
#navbarSupportedContent {
padding: 5px
}
.pagination-container-fluid {
display: flex;
margin-left: 15px
}
.navbar-expand-lg .navbar-nav .nav-link {
padding-right: .5rem;
padding-left: .5rem;
margin-right: 5px;
margin-left: 5px
}
.pagination {
padding: 5px;
background-clip: padding-box;
border: 1px solid;
border-color: #070809 #0d0e0f #131517;
border-color: rgba(0,0,0,.8) rgba(0,0,0,.65) rgba(0,0,0,.5);
border-radius: 3px;
display: inline-block;
vertical-align: baseline;
zoom:1;background-image: -webkit-linear-gradient(top,rgba(0,0,0,.12),rgba(0,0,0,0));
background-image: -moz-linear-gradient(top,rgba(0,0,0,.12),rgba(0,0,0,0));
background-image: -o-linear-gradient(top,rgba(0,0,0,.12),rgba(0,0,0,0));
background-image: linear-gradient(to bottom,rgba(0,0,0,.12),rgba(0,0,0,0));
-webkit-box-shadow: 0 1px rgba(255,255,255,.05);
box-shadow: 0 1px rgba(255,255,255,.05)
}
.pagination>a,.pagination>span {
float: left;
margin-left: 5px;
padding: 0 10px;
min-width: 17px;
line-height: 27px;
font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif;
font-size: 12px;
font-weight: 500;
color: #68da20;
text-align: center;
text-decoration: none;
border: 1px solid #000;
border-radius: 3px
}
.pagination :first-child {
margin-left: 0
}
.pagination>a {
text-decoration: none;
text-shadow: 0 1px #000;
background-clip: padding-box;
border-color: rgba(0,0,0,.9);
background-image: -webkit-linear-gradient(top,rgba(255,255,255,.04),rgba(255,255,255,0));
background-image: -moz-linear-gradient(top,rgba(255,255,255,.04),rgba(255,255,255,0));
background-image: -o-linear-gradient(top,rgba(255,255,255,.04),rgba(255,255,255,0));
background-image: linear-gradient(to bottom,rgba(255,255,255,.04),rgba(255,255,255,0));
-webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.04),inset 0 1px rgba(255,255,255,.04),inset 0 -1px rgba(0,0,0,.15),0 1px 1px rgba(0,0,0,.1);
box-shadow: inset 0 0 0 1px rgba(255,255,255,.04),inset 0 1px rgba(255,255,255,.04),inset 0 -1px rgba(0,0,0,.15),0 1px 1px rgba(0,0,0,.1);
-webkit-transition: .1s ease-out;
-moz-transition: .1s ease-out;
-o-transition: .1s ease-out;
transition: .1s ease-out
}
.pagination>a:hover {
background-color: #333;
background-color: rgba(255,255,255,.05)
}
.pagination>a:active,.pagination>span {
color: #68da20;
text-shadow: 0 -1px #000;
background: #1c1c1c;
background: rgba(255,255,255,.01);
border-color: #000 rgba(0,0,0,.65) rgba(0,0,0,.6);
-webkit-box-shadow: inset 0 1px rgba(0,0,0,.05),inset 0 2px 2px rgba(0,0,0,.3),0 1px rgba(255,255,255,.06);
box-shadow: inset 0 1px rgba(0,0,0,.05),inset 0 2px 2px rgba(0,0,0,.3),0 1px rgba(255,255,255,.06)
}
.pagination .next,.pagination .prev {
font-family: Noteworthy,Arial,sans-serif;
font-size: 14px
}
.navbar-nav {
width: 100%;
padding: 5px
}
.nav-link-identifier {
text-align: center;
width: 100%
}
@media (max-width: 768px) {
ul#posts {
grid-template-columns: repeat(auto-fill,minmax(120px,1fr));
text-align: center;
padding-top: 5px
}
}
@media (max-width: 422px) {
ul#posts {
grid-column-gap: 0;
grid-row-gap: 5px
}
.container-fluid,.container-lg,.container-md,.container-sm,.container-xl {
padding-right: 5px;
padding-left: 5px
}
}
@media (max-width: 410px) {
ul#posts {
grid-column-gap: 15px;
grid-row-gap: 10px
}
.container-fluid,.container-lg,.container-md,.container-sm,.container-xl {
padding-right: 15px;
padding-left: 15px
}
}
@media (max-width: 991px) {
.navbar-nav {
width: 100%;
padding: 0
}
.navbar-expand-lg .navbar-nav .nav-link {
margin: 0
}
.pagination-container-fluid {
display: flex;
justify-content: center;
padding-top: 5px;
margin-bottom: 0
}
.navbar {
padding: .5rem 1rem 0
}
.navigation-links {
border-color: transparent transparent transparent
}
.pagination-container-fluid {
margin-left: 0
}
} }

View File

@ -320,4 +320,4 @@ video#player {
pre { pre {
letter-spacing: 7px; letter-spacing: 7px;
} }

BIN
public/s/img/broken.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

2
public/s/js/bootstrap-native.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@ let load = false;
if((((document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop + window.innerHeight) + 310 if((((document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop + window.innerHeight) + 310
>= ((document.documentElement && document.documentElement.scrollHeight) || document.body.scrollHeight)) && !load) { >= ((document.documentElement && document.documentElement.scrollHeight) || document.body.scrollHeight)) && !load) {
load = true; load = true;
fetch(`./api/p/${posts.dataset.last}`) fetch(`./api/v1/p/${posts.dataset.last}`)
.then(res => res.json()) .then(res => res.json())
.then((msg, html = "") => { .then((msg, html = "") => {
for(let i = 0; i < msg.items.length; i++) for(let i = 0; i < msg.items.length; i++)

BIN
public/s/vcr.ttf Normal file

Binary file not shown.

View File

@ -3,22 +3,22 @@ import sql from "../sql.mjs";
import { parse } from "url"; import { parse } from "url";
import cfg from "../../../config.json"; import cfg from "../../../config.json";
import { mimes, queries } from "./inc/api.mjs"; import { mimes, queries } from "./inc/apiv1.mjs";
router.get("/api", (req, res) => { router.get("/api/v1", (req, res) => {
res.end("api lol"); res.end("api lol");
}); });
router.get(/^\/api\/random(\/user\/.+|\/image|\/video|\/audio)?$/, async (req, res) => { router.get(/^\/api\/v1\/random(\/user\/.+|\/image|\/video|\/audio)?$/, async (req, res) => {
const args = []; const args = [];
let q = queries.random.main; let q = queries.random.main;
if(req.url.split[2] === "user") { if(req.url.split[3] === "user") {
q += queries.random.where("username like ?"); q += queries.random.where("username like ?");
args.push(req.url.split[3] || "flummi"); args.push(req.url.split[4] || "flummi");
} }
else else
q += queries.random.where(mimes[req.url.split[2]] ? mimes[req.url.split[2]].map(mime => `mime = "${mime}"`).join(" or ") : null); q += queries.random.where(mimes[req.url.split[3]] ? mimes[req.url.split[3]].map(mime => `mime = "${mime}"`).join(" or ") : null);
try { try {
const rows = await sql.query(q, args); const rows = await sql.query(q, args);
@ -32,7 +32,7 @@ router.get(/^\/api\/random(\/user\/.+|\/image|\/video|\/audio)?$/, async (req, r
} }
}); });
router.get("/api/p", async (req, res) => { router.get("/api/v1/p", async (req, res) => {
let id = parseInt(req.url.qs.id) || 99999999; let id = parseInt(req.url.qs.id) || 99999999;
const eps = Math.min(parseInt(req.url.qs.eps) || 100, 200); const eps = Math.min(parseInt(req.url.qs.eps) || 100, 200);
let [ order, trend ] = req.url.qs.order === "asc" ? [ "asc", ">" ] : [ "desc", "<" ]; let [ order, trend ] = req.url.qs.order === "asc" ? [ "asc", ">" ] : [ "desc", "<" ];
@ -67,9 +67,9 @@ router.get("/api/p", async (req, res) => {
} }
}); });
router.get(/^\/api\/p\/([0-9]+)/, async (req, res) => { // legacy router.get(/^\/api\/v1\/p\/([0-9]+)/, async (req, res) => { // legacy
let eps = 100; let eps = 100;
let id = +req.url.split[2]; let id = +req.url.split[3];
const query = await sql.query("select * from items where id < ? order by id desc limit ?", [ id, eps ]); const query = await sql.query("select * from items where id < ? order by id desc limit ?", [ id, eps ]);
const items = { const items = {
@ -81,9 +81,9 @@ router.get(/^\/api\/p\/([0-9]+)/, async (req, res) => { // legacy
res.end(JSON.stringify(items), "utf-8"); res.end(JSON.stringify(items), "utf-8");
}); });
router.get(/^\/api\/item\/[0-9]+$/, async (req, res) => { router.get(/^\/api\/v1\/item\/[0-9]+$/, async (req, res) => {
try { try {
const rows = await sql.query(queries.item, Array(3).fill(req.url.split[2])); const rows = await sql.query(queries.item, Array(3).fill(req.url.split[3]));
res.reply({ res.reply({
type: "application/json", type: "application/json",
body: JSON.stringify(rows?.shift() || []) body: JSON.stringify(rows?.shift() || [])
@ -96,9 +96,9 @@ router.get(/^\/api\/item\/[0-9]+$/, async (req, res) => {
} }
}); });
router.get(/^\/api\/user\/.*(\/[0-9]+)?$/, async (req, res) => { // auf qs umstellen router.get(/^\/api\/v1\/user\/.*(\/[0-9]+)?$/, async (req, res) => { // auf qs umstellen
const user = req.url.split[2]; const user = req.url.split[3];
const eps = Math.min(req.url.split[3] || 50, 50); const eps = Math.min(req.url.split[4] || 50, 50);
try { try {
const rows = await sql.query(queries.user, [ user, eps ]); const rows = await sql.query(queries.user, [ user, eps ]);
res.reply({ res.reply({

View File

@ -1,6 +1,7 @@
import router from "../router.mjs"; import router from "../router.mjs";
import cfg from "../../../config.json"; import cfg from "../../../config.json";
import url from "url"; import url from "url";
import fs from "fs";
import { queries } from "./inc/index.mjs"; import { queries } from "./inc/index.mjs";
import sql from "../sql.mjs"; import sql from "../sql.mjs";
import lib from "../lib.mjs"; import lib from "../lib.mjs";
@ -8,22 +9,55 @@ import tpl from "../tpl.mjs";
tpl.readdir("views"); tpl.readdir("views");
router.get("/", async (req, res) => { router.get(/\/(p\/\d+)?$/, async (req, res) => {
const query = await sql.query("select id, mime from items order by id desc limit 300"); try {
const data = { const total = (await sql.query("select count(*) as total from items"))[0].total;
items: query, const limit = 299;
last: query[query.length - 1].id const pages = +Math.ceil(total / limit);
}; const page = Math.min(pages, +req.url.split[1] || 1);
const offset = (page - 1) * limit;
res.reply({ body: tpl.render("views/index", data) }); const query = await sql.query("select id, mime from items order by id desc limit ?, ?", [ offset, limit ]);
let cheat = [];
for(let i = Math.max(1, page - 3); i <= Math.min(page + 3, pages); i++)
cheat.push(i);
query.forEach(e => {
if(!fs.existsSync(`public/t/${e.id}.png`))
fs.copyFileSync("public/s/img/broken.png", `public/t/${e.id}.png`);
});
const data = {
items: query,
pagination: {
end: pages,
prev: (page > 1) ? page - 1 : null,
next: (page < pages) ? page + 1 : null,
page: page,
cheat: cheat,
link: "/p/"
},
last: query[query.length - 1].id
};
res.reply({ body: tpl.render("views/index", data) });
} catch(err) {
res.reply({ body: "error :(" });
}
}); });
router.get(/^\/([0-9]+)$/, async (req, res) => { router.get(/^\/([0-9]+)$/, async (req, res) => {
const query = (await sql.query(queries.item, Array(3).fill(req.url.split[0])))?.shift(); const query = (await sql.query(queries.item, Array(3).fill(req.url.split[0])))?.shift();
const qmax = (await sql.query("select id from items order by id desc limit 1"))[0].id;
if(!query?.id) if(!query?.id)
return res.redirect("/404"); return res.redirect("/404");
let cheat = [];
for(let i = Math.min(query.id + 3, qmax); i >= Math.max(1, query.id - 3); i--)
cheat.push(i);
const data = { const data = {
user: { user: {
name: query.username, name: query.username,
@ -44,7 +78,15 @@ router.get(/^\/([0-9]+)$/, async (req, res) => {
}, },
next: query.next ? query.next : null, next: query.next ? query.next : null,
prev: query.prev ? query.prev : null, prev: query.prev ? query.prev : null,
title: `${query.id} - f0ck.me` title: `${query.id} - f0ck.me`,
pagination: {
end: 1,
prev: query.id + 1,
next: Math.max(query.id - 1, 1),
page: query.id,
cheat: cheat,
link: "/"
}
}; };
res.reply({ body: tpl.render("views/item", data) }); res.reply({ body: tpl.render("views/item", data) });
}); });

View File

@ -3,7 +3,7 @@ import sql from "../sql.mjs";
import lib from "../lib.mjs"; import lib from "../lib.mjs";
const _query = "select id, mime, size, username, userchannel, usernetwork, stamp from items where "; const _query = "select id, mime, size, username, userchannel, usernetwork, stamp from items where ";
const regex = /https\:\/\/f0ck\.me\/(\d+|(?:b\/)(\w{8})\.(jpg|webm|gif|mp4|png|mov|mp3|ogg|flac))/gi; const regex = /(https\:\/\/f0ck\.me|http\:\/\/fockmoonsb24iczs7odozzy5uktlzbcgp337nabrgffzxv5ihabgpvyd\.onion)\/(\d+|(?:b\/)(\w{8})\.(jpg|webm|gif|mp4|png|mov|mp3|ogg|flac))/gi;
export default async bot => { export default async bot => {

View File

@ -132,9 +132,9 @@ export default async bot => {
speed = !Number.isFinite(speed) ? "yes" : `${speed.toFixed(2)} Mbit/s`; speed = !Number.isFinite(speed) ? "yes" : `${speed.toFixed(2)} Mbit/s`;
e.reply([ e.reply([
`title: ${meta.fulltitle}`, //`title: ${meta.fulltitle}`,
`size: ${lib.formatSize(size)} speed: ${speed}`, `link: ${cfg.main.url}/${insertq.insertId} | size: ${lib.formatSize(size)} | speed: ${speed}`
`link: ${cfg.main.url}/${insertq.insertId}` //`link: ${cfg.main.url}/${insertq.insertId}`
]); ]);
}); });

View File

@ -1,10 +1,10 @@
{{include main/header}} {{include main/header}}
<div class="container-fluid"> <div class="container-fluid">
<ul id="posts" data-last="{{=last}}"> <ul id="posts">
{{each items as item}} {{each items as item}}
<li class="post"> <li class="post">
<a href="/{{=item.id}}" title="{{=item.mime}}"> <a href="/{{=item.id}}" title="{{=item.mime}}">
<img class="thumb" src="/t/{{=item.id}}.png" onerror="this.onerror=null;this.src='/s/img/mp3.png';" /> <img class="thumb" src="/t/{{=item.id}}.png" />
<span class="item-mime">{{=item.mime}}</span> <span class="item-mime">{{=item.mime}}</span>
</a> </a>
</li> </li>

View File

@ -1,8 +1,5 @@
{{include main/header}} {{include main/header}}
<div class="container"> <div class="container">
<div class="controls">
<a id="rndbtn" href="/random">Random</a>
</div>
<div class="content"> <div class="content">
<div class="next-post"> <div class="next-post">
{{if next}} {{if next}}
@ -10,7 +7,9 @@
<div class="arrow-next">«</div> <div class="arrow-next">«</div>
</a> </a>
{{else}} {{else}}
<a id="next" href="#" style="color: #ccc !important;">«</a> <a id="next" href="#" style="color: #ccc !important;">
<div class="arrow-next">«</div>
</a>
{{/if}} {{/if}}
</div> </div>
<div class="media-object"> <div class="media-object">
@ -37,7 +36,9 @@
<div class="arrow-prev">»</div> <div class="arrow-prev">»</div>
</a> </a>
{{else}} {{else}}
<a id="prev" href="#" style="color: #ccc !important;">»</a> <a id="prev" href="#" style="color: #ccc !important;">
<div class="arrow-prev">»</div>
</a>
{{/if}} {{/if}}
</div> </div>
</div> </div>

View File

@ -1,7 +1,7 @@
<script src="./s/js/video.min.js"></script> <script src="/s/js/video.min.js"></script>
<script src="./s/js/videojs.persistvolume.js"></script> <script src="/s/js/videojs.persistvolume.js"></script>
<script src="./s/js/item.js"></script> <script src="/s/js/item.js"></script>
<script src="./s/js/scroller.js"></script> <script src="/s/js/theme.js"></script>
<script src="./s/js/theme.js"></script> <script src="/s/js/bootstrap-native.min.js"></script>
</body> </body>
</html> </html>

View File

@ -2,11 +2,11 @@
<html> <html>
<head> <head>
<title>{{if data.title}}{{=data.title}}{{else}}f0ck!{{/if}}</title> <title>{{if data.title}}{{=data.title}}{{else}}f0ck!{{/if}}</title>
<link rel="icon" type="image/png" href="./s/img/favicon.png" /> <link rel="icon" type="image/gif" href="/s/img/favicon.gif" />
<link rel="stylesheet" type="text/css" href="./s/css/video-js.min.css" /> <link rel="stylesheet" type="text/css" href="/s/css/video-js.min.css" />
<link rel="stylesheet" type="text/css" href="./s/css/vsg-skin.css" /> <link rel="stylesheet" type="text/css" href="/s/css/vsg-skin.css" />
<link rel="stylesheet" type="text/css" href="./s/css/bootstrap.css" /> <link rel="stylesheet" type="text/css" href="/s/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="./s/css/f0ck-custom.css" /> <link rel="stylesheet" type="text/css" href="/s/css/f0ck-custom.css" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="f0ck.me is the place where internet purists gather to celebrate content of all kinds"> <meta name="description" content="f0ck.me is the place where internet purists gather to celebrate content of all kinds">
{{if data.item}} {{if data.item}}

View File

@ -0,0 +1,15 @@
{{if typeof pagination !== "undefined"}}
<nav class="pagination">
<a href="{{=pagination.link}}1" class="start{{if !pagination.prev}} disabled{{/if}}">&laquo;</a>
<a href="{{=pagination.link}}{{=pagination.prev}}" class="prev{{if !pagination.prev}} disabled{{/if}}">&lsaquo;</a>
{{each pagination.cheat as i}}
{{if i == pagination.page}}
<span>{{=i}}</span>
{{else}}
<a href="{{=pagination.link}}{{=i}}">{{=i}}</a>
{{/if}}
{{/each}}
<a href="{{=pagination.link}}{{=pagination.next}}" class="next{{if !pagination.next}} disabled{{/if}}">&rsaquo;</a>
<a href="{{=pagination.link}}{{=pagination.end}}" class="start{{if !pagination.next}} disabled{{/if}}">&raquo;</a>
</nav>
{{/if}}

View File

@ -1,18 +1,27 @@
<nav class="navbar navbar-expand-lg"> <nav class="navbar navbar-expand-lg">
<a class="navbar-brand" href="/"> <a class="navbar-brand" href="/">
<img src="./s/img/f0ck_logo.png" width="112" height="28"> <span id="f0ck" width="" height="">F0CK</span>
</a> </a>
<div class="collapse navbar-collapse" id="navbarNavDropdown"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<ul class="navbar-nav"> <span class="navbar-toggler-icon"></span>
<li class="nav-item active"> </button>
<a class="nav-link" id="random" href="/random"><span class="rndtext">Random</span></a>
<div class="collapse navbar-collapse show" id="navbarSupportedContent">
<div class="navigation-links">
<ul class="navbar-nav ">
<li class="nav-item">
<a class="nav-link" href="/random"><span class="nav-link-identifier">Random</span></a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="/how"><span class="hlptext">Help</span></a> <a class="nav-link" href="/about"><span class="nav-link-identifier">About</span></a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="/contact"><span class="cnttext">Contact</span></a> <a class="nav-link" href="/contact"><span class="nav-link-identifier">Contact</span></a>
</li> </li>
</ul> </ul>
</div>
<div class="pagination-container-fluid">
{{include partials/pagination}}
</div>
</div> </div>
</nav> </nav>

16
views/test.html Normal file
View File

@ -0,0 +1,16 @@
{{include main/header}}
<div class="container-fluid">
{{include partials/pagination}}
<ul id="posts">
{{each items as item}}
<li class="post">
<a href="/{{=item.id}}" title="{{=item.mime}}">
<img class="thumb" src="/t/{{=item.id}}.png" />
<span class="item-mime">{{=item.mime}}</span>
</a>
</li>
{{/each}}
</ul>
{{include partials/pagination}}
</div>
{{include main/footer}}