Skip to content

Instantly share code, notes, and snippets.

View abteilung's full-sized avatar

Abteilung für Gestaltung GmbH abteilung

View GitHub Profile
@abteilung
abteilung / +layout.svelte
Created January 24, 2025 16:25
Sveltekit execute Item transitions when navigating
<script lang="ts">
// These lines let the page transition animations come alive!
import { onNavigate } from '$app/navigation';
onNavigate((navigation) => {
if (!document.startViewTransition) return;
return new Promise<void>((resolve) => {
document.startViewTransition(async () => {
resolve();
await navigation.complete;
@abteilung
abteilung / +page.ts
Last active January 24, 2025 17:23
Sveltekit Redirect in a +page.ts
import { redirect } from "@sveltejs/kit";
/** @type {import('./$types').PageLoad} */
export function load() {
redirect(302, "/academy/"); // needs `throw` in v1
}
@abteilung
abteilung / Favicons.fusion
Last active June 20, 2024 17:13
Render Favicons with Neos CMS
prototype(Abte.Site:Component.Favicon) < prototype(Neos.Fusion:Component) {
thirtytwo = Carbon.Image:ImageUri {
asset = ${ q(site).property('logo') }
width = '32'
height = '32'
maximumWidth = '32'
maximumHeight = '32'
allowCropping = TRUE
}
@abteilung
abteilung / navigations.ts
Created January 28, 2014 17:12
TypoScript breadcrumb navigation
lib.breadCrumb = HMENU
lib.breadCrumb {
special = rootline
# zeige komplette rootline an
special.range = 1|-1
# Variation: Link nur auf die uebergeordnete Seite
#special.range = -2|-2
@abteilung
abteilung / noScrollingMouseWheel.js
Created May 20, 2013 19:12
No Scrolling with MouseWheel. JavaScript
window.onmousewheel = document.onmousewheel = function(e) {
e = e || window.event;
if (e.preventDefault)
e.preventDefault();
e.returnValue = false;
};
@abteilung
abteilung / eyesFollowingMouse
Created May 20, 2013 18:47
Eyes following Mouse Pointer. Augen folgen der Maus
// JS-Code für die Augen
function jseyesmove(e, t, n) {
var r, i, s, o = $("#" + n),
u = $("#" + n + "_pupille"),
a = o.position();
i = e - a.left - 10;
s = t - a.top - 10;
r = i * i / 90 + s * s / 110 < 1 ? 1 : Math.sqrt(9900 / (i * i * 110 + s * s * 90));
u.css("left", r * i + 10 + "px");
u.css("top", r * s + 10 + "px")
@abteilung
abteilung / localconf.php
Created April 25, 2013 15:29
ImageMagick: dunkle Bilder, dark images, colorspace. Korrigieren -> in localconf.php
$TYPO3_CONF_VARS['GFX']['im_stripProfileCommand'] = '+profile \'*\' -colorspace CMYK';
@abteilung
abteilung / chmod_w_o_find.sh
Created April 25, 2013 13:14
chmod -r und chown-r für CYON-Server
#!/bin/bash
#
# @author "cyon GmbH" <[email protected]>
# @version 0.1
## PATH Setzen nicht vergessen!
Path='/home/[BENUTZERNAME]/[PFAD]/'
function setChmod {
ls -1 $1 | while read file
do
file=${1}/${file}
@abteilung
abteilung / disable_html_comments.ts
Created April 19, 2013 22:55
TYPO3 Kommentare im HTML entfernen
# entfernt die HTML-Kommentare der entsprechenden Objekte ###
page.config.disablePrefixComment = true
@abteilung
abteilung / TYPO3: Mehrere Domains mit RealURL
Created April 7, 2013 15:52
TYPO3: Mehrere Domains mit RealURL
Mehrere Domains mit RealURL