first commit

This commit is contained in:
Sam Dalfuss 2025-02-10 17:43:23 +01:00
commit eefe0543a9
23 changed files with 1926 additions and 0 deletions

47
css/custom.css Normal file
View File

@ -0,0 +1,47 @@
body {
background-color: #161618;
color: #f2f5f4;
}
a {
color: #f5a9b8;
}
a:visited {
color: #5BCEFA;
}
a.lightbox {
margin: 10px;
}
/* Container to hold the images */
.image-container {
display: flex;
justify-content: space-around;
flex-wrap: wrap;
gap: 2px;
margin: 20px;
}
/* Each image inside the container */
.image-container img {
width: 100%;
max-width: 300px; /* Max width of each image */
height: auto; /* Ensure aspect ratio is maintained */
object-fit: contain; /* Ensure images fit within the container */
}
:root {
--parvus-background-color: #161618;
--parvus-color: #f2f5f4;
--parvus-caption-color: #f2f5f4;
--parvus-btn-background-color: #F5A9B8;
--parvus-btn-color: #ffffff;
--parvus-btn-disabled-background-color: #5BCEFA;
--parvus-btn-disabled-color: #161618;
}
.parvus-trigger:has(img) .parvus-zoom__indicator {
display: none;
}

228
css/parvus.css Normal file
View File

@ -0,0 +1,228 @@
:root {
--parvus-transition-duration: 300ms;
--parvus-transition-timing-function: cubic-bezier(0.62, 0.16, 0.13, 1.01);
--parvus-background-color: hsl(23deg 44% 96%);
--parvus-color: hsl(228deg 24% 23%);
--parvus-btn-background-color: hsl(228deg 24% 23%);
--parvus-btn-color: hsl(0deg 0% 100%);
--parvus-btn-hover-background-color: hsl(229deg 24% 33%);
--parvus-btn-hover-color: hsl(0deg 0% 100%);
--parvus-btn-disabled-background-color: hsla(229deg 24% 33% / 60%);
--parvus-btn-disabled-color: hsl(0deg 0% 100%);
--parvus-caption-background-color: transparent;
--parvus-caption-color: hsl(228deg 24% 23%);
--parvus-loading-error-background-color: hsl(0deg 0% 100%);
--parvus-loading-error-color: hsl(228deg 24% 23%);
--parvus-loader-background-color: hsl(23deg 40% 96%);
--parvus-loader-color: hsl(228deg 24% 23%);
}
body:has(.parvus[aria-hidden=false]) {
touch-action: none;
}
/**
* Parvus trigger
*
*/
.parvus-trigger:has(img) {
display: block;
position: relative;
}
.parvus-trigger:has(img) .parvus-zoom__indicator {
align-items: center;
background-color: var(--parvus-btn-background-color);
color: var(--parvus-btn-color);
display: flex;
justify-content: center;
padding: 0.5rem;
position: absolute;
inset-inline-end: 0.5rem;
inset-block-start: 0.5rem;
}
.parvus-trigger:has(img) img {
display: block;
}
/**
* Parvus
*
*/
.parvus {
box-sizing: border-box;
contain: strict;
inset: 0;
overflow: hidden;
overscroll-behavior: contain;
position: fixed;
z-index: 1337;
}
.parvus *, .parvus *::before, .parvus *::after {
box-sizing: border-box;
}
.parvus[aria-hidden=true] {
display: none;
}
.parvus__overlay {
background-color: var(--parvus-background-color);
color: var(--parvus-color);
inset: 0;
position: absolute;
}
.parvus__slider {
inset: 0;
position: absolute;
}
.parvus__slider[aria-hidden=true] {
display: none;
}
@media screen and (prefers-reduced-motion: no-preference) {
.parvus__slider--animate:not(.parvus__slider--is-dragging) {
transition: transform var(--parvus-transition-duration) var(--parvus-transition-timing-function);
will-change: transform;
}
}
.parvus__slider--is-draggable {
cursor: grab;
}
.parvus__slider--is-dragging {
cursor: grabbing;
}
.parvus__slide {
block-size: 100%;
display: grid;
inline-size: 100%;
padding-block: 3.75rem 1rem;
padding-inline: 1rem;
place-items: center;
}
.parvus__slide img {
block-size: auto;
display: block;
inline-size: auto;
margin-inline: auto;
transform-origin: left top;
}
.parvus__content--error {
background-color: var(--parvus-loading-error-background-color);
color: var(--parvus-loading-error-color);
padding-block: 0.5rem;
padding-inline: 1rem;
}
.parvus__caption {
background-color: var(--parvus-caption-background-color);
color: var(--parvus-caption-color);
padding-block-start: 0.5rem;
text-align: start;
}
.parvus__loader {
display: inline-block;
block-size: 6.25rem;
inset-inline-start: 50%;
position: absolute;
inset-block-start: 50%;
transform: translate(-50%, -50%);
inline-size: 6.25rem;
}
.parvus__loader::before {
animation: spin 1s infinite;
border-radius: 100%;
border: 0.25rem solid var(--parvus-loader-background-color);
border-block-start-color: var(--parvus-loader-color);
content: "";
inset: 0;
position: absolute;
z-index: 1;
}
.parvus__toolbar {
align-items: center;
display: flex;
inset-block-start: 1rem;
inset-inline: 1rem;
justify-content: space-between;
position: absolute;
}
.parvus__controls {
display: flex;
gap: 0.5rem;
}
.parvus__btn {
appearance: none;
background-color: var(--parvus-btn-background-color);
background-image: none;
border-radius: 0;
border: 0.0625rem solid transparent;
color: var(--parvus-btn-color);
cursor: pointer;
display: flex;
font: inherit;
padding: 0.3125rem;
position: relative;
touch-action: manipulation;
will-change: transform, opacity;
z-index: 7;
}
.parvus__btn:hover, .parvus__btn:focus-visible {
background-color: var(--parvus-btn-hover-background-color);
color: var(--parvus-btn-hover-color);
}
.parvus__btn--previous {
inset-inline-start: 0;
position: absolute;
inset-block-start: calc(50svh - 1rem);
transform: translateY(-50%);
}
.parvus__btn--next {
position: absolute;
inset-inline-end: 0;
inset-block-start: calc(50svh - 1rem);
transform: translateY(-50%);
}
.parvus__btn svg {
pointer-events: none;
}
.parvus__btn[aria-hidden=true] {
display: none;
}
.parvus__btn[aria-disabled=true] {
background-color: var(--parvus-btn-disabled-background-color);
color: var(--parvus-btn-disabled-color);
}
.parvus__counter {
position: relative;
z-index: 7;
}
.parvus__counter[aria-hidden=true] {
display: none;
}
@media screen and (prefers-reduced-motion: no-preference) {
.parvus__overlay, .parvus__counter, .parvus__btn--close, .parvus__btn--previous, .parvus__btn--next, .parvus__caption {
transition: transform var(--parvus-transition-duration) var(--parvus-transition-timing-function), opacity var(--parvus-transition-duration) var(--parvus-transition-timing-function);
will-change: transform, opacity;
}
.parvus--is-opening .parvus__overlay, .parvus--is-opening .parvus__counter, .parvus--is-opening .parvus__btn--close, .parvus--is-opening .parvus__btn--previous, .parvus--is-opening .parvus__btn--next, .parvus--is-opening .parvus__caption, .parvus--is-closing .parvus__overlay, .parvus--is-closing .parvus__counter, .parvus--is-closing .parvus__btn--close, .parvus--is-closing .parvus__btn--previous, .parvus--is-closing .parvus__btn--next, .parvus--is-closing .parvus__caption {
opacity: 0;
}
.parvus--is-vertical-closing .parvus__counter, .parvus--is-vertical-closing .parvus__btn--close {
transform: translateY(-100%);
opacity: 0;
}
.parvus--is-vertical-closing .parvus__btn--previous {
transform: translate(-100%, -50%);
opacity: 0;
}
.parvus--is-vertical-closing .parvus__btn--next {
transform: translate(100%, -50%);
opacity: 0;
}
.parvus--is-vertical-closing .parvus__caption {
transform: translateY(100%);
opacity: 0;
}
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}

BIN
hc/elftwinks.gay.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

1
hc/elftwinks.gay.txt Normal file
View File

@ -0,0 +1 @@
302

92
hc/elftwinks.php Normal file
View File

@ -0,0 +1,92 @@
<?php
// Define paths and filenames for the counter file and generated image output
$counterFile = "elftwinks.gay.txt";
$imageFile = "elftwinks.gay.png";
// Background image URL for the counter display
$backgroundImageUrl = "https://dalfuss.link/i/88x31_ElfTwinks_hit.png"; // Replace this with your actual background image URL
// Text settings to be displayed on the image
//$customText = "Hit Counter!"; // Main headline text
//$secondaryText = "Ya'll gay!"; // Secondary descriptive text
// Coordinates for positioning the text and number on the image
$textPositionX = 5; // X-coordinate for the main text
$textPositionY = 5; // Y-coordinate for the main text
$secondaryTextPositionX = 5; // X-coordinate for the secondary text
$secondaryTextPositionY = 15; // Y-coordinate for the secondary text
$numberPositionX = 8; // X-coordinate for the counter number
$numberPositionY =8; // Y-coordinate for the counter number
// RGB color definitions for text, secondary text, number, and optional frame
$textColorRGB = ['red' => 253, 'green' => 252, 'blue' => 1]; // Color for the main text
$secondaryTextColorRGB = ['red' => 0, 'green' => 255, 'blue' => 0]; // Color for the secondary text
$numberColorRGB = ['red' => 255, 'green' => 255, 'blue' => 255]; // Color for the counter number
$frameColorRGB = ['red' => 255, 'green' => 238, 'blue' => 0]; // Color for the frame
$drawFrame = false; // Boolean to toggle drawing a frame around the image
// Ensure the counter file exists, and initialize if not
if (!file_exists($counterFile)) {
file_put_contents($counterFile, "0"); // Create the file with an initial value of 0 if it doesn't exist
}
// Open the file for reading and writing (c+ creates the file if it does not exist)
$fp = fopen($counterFile, "c+");
if (flock($fp, LOCK_EX)) { // Lock to synchronize file access
// Read and increment the counter
$number = (int)fread($fp, filesize($counterFile));
$number++; // Increment the counter by 1
// Prepare the file for writing the updated counter
ftruncate($fp, 0); // Clear file content
rewind($fp); // Reset the file pointer to the start of the file
fwrite($fp, (string)$number); // Write the new counter value to the file
// Release the lock on the file
flock($fp, LOCK_UN);
}
fclose($fp); // Close the file
// Load the background image and determine its type (JPEG or PNG)
list($width, $height, $type) = getimagesize($backgroundImageUrl); // Get image dimensions and type
switch ($type) {
case IMAGETYPE_JPEG:
$backgroundImage = imagecreatefromjpeg($backgroundImageUrl); // Load JPEG image
break;
case IMAGETYPE_PNG:
$backgroundImage = imagecreatefrompng($backgroundImageUrl); // Load PNG image
break;
default:
die("Unsupported image format: " . $backgroundImageUrl); // Exit script if image format is not supported
}
// Allocate colors for the text and frame on the image
$frameColor = imagecolorallocate($backgroundImage, $frameColorRGB['red'], $frameColorRGB['green'], $frameColorRGB['blue']);
$textColor = imagecolorallocate($backgroundImage, $textColorRGB['red'], $textColorRGB['green'], $textColorRGB['blue']);
$secondaryTextColor = imagecolorallocate($backgroundImage, $secondaryTextColorRGB['red'], $secondaryTextColorRGB['green'], $secondaryTextColorRGB['blue']);
$numberColor = imagecolorallocate($backgroundImage, $numberColorRGB['red'], $numberColorRGB['green'], $numberColorRGB['blue']);
// Optionally draw a rectangular frame around the entire image
if ($drawFrame) {
imagerectangle($backgroundImage, 0, 0, $width - 1, $height - 1, $frameColor); // Draw the frame
}
// Add the main text, secondary text, and counter number to the image
imagestring($backgroundImage, 3, $textPositionX, $textPositionY, $customText, $textColor); // Draw main text
if (!empty($secondaryText)) {
imagestring($backgroundImage, 3, $secondaryTextPositionX, $secondaryTextPositionY, $secondaryText, $secondaryTextColor); // Draw secondary text if provided
}
imagestring($backgroundImage, 3, $numberPositionX, $numberPositionY, (string)$number, $numberColor); // Draw counter number
// Output the final image as a PNG file
imagepng($backgroundImage, $imageFile); // Save the image to a file
imagedestroy($backgroundImage); // Free up memory used by the image
// Set headers for the browser to interpret the output as an image
header('Content-Type: image/png'); // MIME type for PNG image
header('Content-Disposition: filename="' . $imageFile . '"'); // Suggested filename for download
readfile($imageFile); // Output the image file
// For more information, refer to the Git repository:
// https://git.cyberwa.re/revengeday/hit-counter/src/branch/main
?>

70
index.html Normal file
View File

@ -0,0 +1,70 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>elftwinks.gay!</title>
<link rel="stylesheet" href="https://cdn.simplecss.org/simple.min.css">
<link rel="stylesheet" href="./css/parvus.css">
<link rel="stylesheet" href="./css/custom.css">
</head>
<body>
<p> You want to display your Elf Twink on elftwinks.gay? Message me on Matrix <a href="https://matrix.to/#/@dalfuss:catgirl.cloud" target="_blank">@dalfuss:catgirl.cloud!</a></p>
<div class="image-container">
<a href="./static/jax_ori.jpg" class="lightbox" data-caption="OC Jax by: @dalfuss@corteximplant.com Art by: orifans.com" data-group="elftwinks">
<img src="./static/jax_ori_thumb.jpg">
</a>
<a href="./static/jax_river.jpg" class="lightbox" data-caption="OC Jax by: @dalfuss@corteximplant.com Art by: @river_stubs (Instagram)" data-group="elftwinks">
<img src="./static/jax_river_thumb.jpg">
</a>
<a href="./static/jax_yume.png" class="lightbox" data-caption="OC Jax by: @dalfuss@corteximplant.com Art by: Yume_ShiroKuro (Twitch)" data-group="elftwinks">
<img src="./static/jax_yume_thumb.png">
</a>
<a href="./static/moon_moon.png" class="lightbox" data-caption="OC Lateu by: @flatfuckfan@corteximplant.com Art by: @babyrage.art (Instagram)" data-group="elftwinks">
<img src="./static/moon_moon_thumb.png">
</a>
<a href="./static/endali1.png" class="lightbox" data-caption="OC Endali by: @endali@tech.lgbt" data-group="elftwinks">
<img src="./static/endali1_thumb.png">
</a>
<a href="./static/endali2.jpeg" class="lightbox" data-caption="OC Endali by: @endali@tech.lgbt Art by: artstation.com/cosmicspades" data-group="elftwinks">
<img src="./static/endali2_thumb.jpeg">
</a>
<a href="./static/Xantihr1.png" class="lightbox" data-caption="OC Xantihr and Art by: @obsidyian.art (Instagram)" data-group="elftwinks">
<img src="./static/Xantihr1.png">
</a>
<a href="./static/Xantihr2.png" class="lightbox" data-caption="OC Xantihr and Art by: @obsidyian.art (Instagram)" data-group="elftwinks">
<img src="./static/Xantihr2.png">
</a>
</div>
<footer>
<p>made by <a href="https://dalfuss.link" target="_blank">Sam Dalfuss</a> with ♥ for elf twinks.</p>
<div style="position:fixed; bottom:0; height:auto; margin-top:40px; width:100%">
<img src="./hc/elftwinks.php"></img>
<a href="https://elftwinks.gay/" rel="nofollow" target="_blank">
<img src="./static/88x31_ElfTwinks.png"></img>
</a>
<a href="https://dalfuss.net/" rel="nofollow" target="_blank">
<img src="./static/88x31_dalfuss.png"></img>
</a>
</div>
</footer>
<script src="./js/parvus.js"></script>
<script>
const prvs = new Parvus()
</script>
</body>
</html>
<!---TEST-->

1488
js/parvus.js Normal file

File diff suppressed because it is too large Load Diff

BIN
static/88x31_ElfTwinks.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

BIN
static/88x31_dalfuss.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

BIN
static/Xantihr1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

BIN
static/Xantihr2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

BIN
static/endali1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1009 KiB

BIN
static/endali1_thumb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

BIN
static/endali2.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 KiB

BIN
static/endali2_thumb.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
static/jax_ori.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 KiB

BIN
static/jax_ori_thumb.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
static/jax_river.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

BIN
static/jax_river_thumb.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
static/jax_yume.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
static/jax_yume_thumb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

BIN
static/moon_moon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

BIN
static/moon_moon_thumb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 KiB