Add assets.

This commit is contained in:
daniel 2024-08-05 19:55:02 +02:00
parent fbf00cd154
commit 94771a2aa7
3 changed files with 197 additions and 0 deletions

75
assets/images/favicon.svg Normal file
View File

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="83mm"
height="83mm"
viewBox="0 0 82.999996 82.999991"
version="1.1"
id="svg8"
inkscape:version="1.0 (1.0+r73+1)"
sodipodi:docname="Gänseliesel-Logo rund.svg"
inkscape:export-filename="/home/daniel/cloud/Photos/Hintergrundbilder/Gänseliesel-Logo rund.png"
inkscape:export-xdpi="162.82001"
inkscape:export-ydpi="162.82001">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.4684"
inkscape:cx="108.33847"
inkscape:cy="178.35599"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="false"
fit-margin-top="3"
fit-margin-left="3"
fit-margin-right="3"
fit-margin-bottom="3"
lock-margins="true" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:rights>
<cc:Agent>
<dc:title>(c) Daniel Kraus &lt;www.bovender.de&gt;</dc:title>
</cc:Agent>
</dc:rights>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-56.138771,-86.109581)">
<circle
r="39"
cy="128.10957"
cx="97.609604"
id="path857"
style="color:black;overflow:visible;fill:#696969;fill-opacity:1;stroke:none;stroke-width:2.00001;stroke-opacity:1" />
<path
sodipodi:nodetypes="cscsssccscccsscsssccccscccssscsscsssscsccccccccccssccccssscsscssssscscccccsccsccccccccc"
style="fill:navy;stroke:white;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke-linejoin:bevel"
d="m 73.66954,156.68256 c -0.0257,-0.0212 -0.04676,-1.16622 -0.04676,-2.54442 v -2.50582 l -0.622191,-0.38414 c -1.041429,-0.64296 -1.426937,-2.10829 -1.070799,-4.07019 0.185083,-1.01962 0.168352,-1.20734 -0.157396,-1.76658 -0.703944,-1.2085 -0.948192,-4.22473 -0.610203,-7.5353 0.109691,-1.07467 0.224045,-1.39705 0.642726,-1.81227 0.438724,-0.43508 0.509281,-0.65636 0.509281,-1.5972 0,-0.89228 0.136876,-1.37491 0.747939,-2.63718 1.591474,-3.28755 3.650313,-5.74902 5.158472,-6.16732 0.401471,-0.11129 1.546325,-0.20294 2.544116,-0.20351 2.028793,-0.001 3.643675,-0.45634 5.034194,-1.41896 1.09234,-0.75621 3.697965,-3.58834 4.44801,-4.83468 l 0.640805,-1.06481 -0.350243,-0.64968 c -0.192622,-0.35731 -0.668559,-0.90152 -1.057631,-1.20935 -1.214761,-0.96111 -1.402229,-2.68752 -0.442115,-4.07152 0.261205,-0.37652 0.474599,-0.84815 0.474215,-1.04805 -7.42e-4,-0.40984 -0.565068,-1.40157 -1.144496,-2.01146 -0.333922,-0.3515 -0.374963,-0.58219 -0.304777,-1.7134 0.0934,-1.5051 0.471711,-2.36391 1.241469,-2.81815 0.307214,-0.18128 0.711892,-0.69671 0.936083,-1.19225 0.504605,-1.11535 3.143032,-3.706003 4.442274,-4.361847 0.595113,-0.300396 1.406641,-0.523321 2.121739,-0.58282 1.085968,-0.09039 1.224711,-0.158 2.229284,-1.087097 1.278124,-1.182077 2.812644,-2.223967 4.230694,-2.872493 2.74258,-1.25428 8.56759,-0.434746 11.85918,1.668514 1.45844,0.931903 4.02461,3.493836 4.20038,4.193423 0.0692,0.27543 0.33015,0.70489 0.57988,0.95437 0.24974,0.24945 0.45406,0.61947 0.45406,0.82223 0,0.20277 0.28544,0.96864 0.63432,1.70193 0.89526,1.88167 1.1891,2.79911 1.4438,4.50792 0.32272,2.16504 0.2756,3.01135 -0.25124,4.51229 -0.47937,1.3657 -1.00207,2.09536 -3.25909,4.54957 -1.73736,1.88914 -1.93271,2.37824 -1.93271,4.83888 0,1.96414 -0.0203,2.0706 -0.44756,2.35027 -0.26617,0.17422 -0.62899,0.24744 -0.89525,0.18069 -0.63539,-0.15931 -1.43808,0.19667 -1.64004,0.72732 -0.22403,0.58862 -0.51601,0.75501 -1.23952,0.70633 -0.85373,-0.0574 -1.59229,0.26091 -1.45207,0.6259 0.1529,0.39806 -0.57173,1.1417 -1.24329,1.27587 -0.37802,0.0756 -0.62843,0.30247 -0.85117,0.77139 -0.48801,1.0273 -1.18448,1.42249 -2.51826,1.42886 -1.32822,0.007 -1.42602,-0.0484 -3.50099,-1.96244 -0.84898,-0.7831 -1.6061,-1.42254 -1.68248,-1.42098 -0.32474,0.007 -0.57603,0.3556 -1.20847,1.67785 -1.555805,3.25282 -1.657654,3.5644 -1.769822,5.41463 l -0.107571,1.77504 1.099652,0.74367 c 1.280911,0.86625 2.842061,2.13904 3.834611,3.12634 0.54014,0.53728 0.72766,0.89812 0.8249,1.58734 0.0693,0.49058 0.33931,1.26394 0.60021,1.71855 l 0.47434,0.82657 0.36743,-0.77988 c 0.20208,-0.42894 0.44653,-0.77989 0.54317,-0.77989 0.0967,0 0.29875,-0.29412 0.4491,-0.6536 0.15034,-0.35949 0.36134,-0.65361 0.46883,-0.65361 0.10757,0 0.14348,-0.084 0.0799,-0.18675 -0.0636,-0.10269 0.0156,-0.18674 0.1759,-0.18674 0.1603,0 0.29144,-0.083 0.29144,-0.18455 0,-0.1015 0.33649,-0.23828 0.74776,-0.30398 0.41126,-0.0656 0.74776,-0.18317 0.74776,-0.26105 0,-0.0778 0.2734,-0.26955 0.60755,-0.42593 1.04677,-0.48989 4.87233,-0.18305 5.95124,0.47733 0.61483,0.37632 1.42997,1.87491 1.76605,3.24673 0.35754,1.45941 0.66483,2.03534 1.40645,2.63593 0.28695,0.23237 0.58092,0.69177 0.65328,1.02089 0.0723,0.32911 0.36623,0.89531 0.65304,1.25821 0.71105,0.89969 0.92402,1.82361 0.9269,4.02122 0.001,1.02709 0.0901,2.40659 0.19706,3.06554 0.16565,1.01985 0.15054,1.24214 -0.10161,1.49396 -17.98696,11.95593 -33.854294,9.38426 -47.53174,0.0543 z M 90.631571,114.6264 c 0.104392,0 0.189694,-0.093 0.189694,-0.20673 0,-0.11368 -0.13049,-0.15667 -0.290125,-0.0956 -0.159555,0.0611 -0.242313,0.0339 -0.183891,-0.0605 0.175174,-0.28313 -0.269127,-0.43381 -0.562339,-0.19072 -0.284613,0.23596 -0.355038,0.86752 -0.154852,1.38867 0.09485,0.24697 0.183931,0.19621 0.464597,-0.26485 0.190979,-0.31371 0.432591,-0.57038 0.536916,-0.57038 z m -0.917191,0.0778 c 0.0093,-0.21755 0.05326,-0.2618 0.113003,-0.11288 0.05405,0.13481 0.04743,0.29587 -0.01471,0.35794 -0.06213,0.0621 -0.106247,-0.0483 -0.09817,-0.24511 z"
id="path935" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@ -0,0 +1,68 @@
// I got the key, I got the secret…
let key = 'mastodon-instance';
let instance = localStorage.getItem(key);
// get the link from the DOM
const button = document.querySelector('.mastodon-share');
// refresh the link with the instance name
const refreshlink = (instance) => {
button.href = `https://${instance}/share?text=${encodeURIComponent(document.title)}%0A${encodeURIComponent(location.href)}`;
}
// got it? Let's go!
if (button) {
// labels and texts from the link
let prompt = button.dataset.prompt || 'Please tell me your Mastodon instance';
let editlabel = button.dataset.editlabel || 'Edit your Mastodon instance';
let edittext = button.dataset.edittext || '✏️';
// Ask the user for the instance name and set it…
const setinstance = _ => {
instance = window.prompt(prompt, instance);
if(instance) {
localStorage.setItem(key, instance);
createeditbutton();
refreshlink(instance);
button.click();
}
}
// create and insert the edit link
const createeditbutton = _ => {
if (document.querySelector('button.mastodon-edit')) return;
let editlink = document.createElement('button');
editlink.innerText = edittext;
editlink.classList.add('mastodon-edit');
editlink.title = editlabel;
editlink.ariaLabel = editlabel;
editlink.addEventListener('click', (e) => {
e.preventDefault();
localStorage.removeItem(key);
setinstance();
});
button.insertAdjacentElement('afterend', editlink);
}
// if there is a value in localstorage, create the edit link
if(localStorage.getItem(key)) {
createeditbutton();
}
// When a user clicks the link
button.addEventListener('click', (e) => {
// If the user has already entered their instance
// and it is in localstorage write out the link href
// with the instance and the current page title and URL
if(localStorage.getItem(key)) {
refreshlink(localStorage.getItem(key));
// otherwise, prompt the user for their instance and save it to localstorage
} else {
e.preventDefault();
setinstance();
}
});
}

View File

@ -0,0 +1,54 @@
// Colors
$theme: hsl(172, 99%, 26%);
$text: hsl(204, 28%, 93%);
$light-grey: #292e32; // #494f5c;
$dark-grey: #3B3E48;
$highlight-grey: #7d828a;
$midnightblue: #2c3e50;
$typewriter: hsl(172, 100%, 36%);
// Fonts
$fonts: "IBM Plex Sans Light", "Trebuchet MS", Verdana, "Verdana Ref", "Segoe UI", Candara, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, sans-serif;
$code-fonts: Consolas, "Andale Mono WT", "Andale Mono", Menlo, Monaco, "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, "YaHei Consolas Hybrid", monospace, "Segoe UI Emoji", "PingFang SC", "Microsoft YaHei";
//Admonition
$admonition-background: (
'note': rgba(68, 138, 255, 0.1),
'info': rgba(0, 184, 212, 0.1),
'tip': rgba(0, 191, 165, 0.1),
'success': rgba(0, 200, 83, 0.1),
'warning': rgba(255, 145, 0, 0.1),
'failure': rgba(255, 82, 82, 0.1),
'danger': rgba(255, 23, 68, 0.1),
'bug': rgba(245, 0, 87, 0.1),
) !default;
$admonition-color: (
'note': #448aff,
'info': #00b8d4,
'tip': #00bfa5,
'success': #00c853,
'warning': #ff9100,
'failure': #ff5252,
'danger': #ff1744,
'bug': #f50057,
) !default;
// Mixins
@mixin dimmed {
opacity: .6;
}
@mixin aTag {
a {
word-wrap: break-word;
border: none;
box-shadow: inset 0 -4px 0 $theme;
transition-property: box-shadow;
transition-duration: .1s;
&:hover {
box-shadow: inset 0 -1em 0 $theme;
}
}
}