rename and prepare for self-hosting
This commit is contained in:
parent
0634273bee
commit
975aa00a66
7 changed files with 37 additions and 144 deletions
|
@ -1,16 +1,16 @@
|
||||||
#_kfrombi_columns_slider{display: inline-block; vertical-align: middle;}
|
#kf-trombi_columns_slider{display: inline-block; vertical-align: middle;}
|
||||||
|
|
||||||
#_kfrombi_trombi { display: grid; grid-row-gap: 2em; font-size: 1.2em; text-align: center; }
|
#kf-trombi_trombi { display: grid; grid-row-gap: 2em; font-size: 1.2em; text-align: center; }
|
||||||
|
|
||||||
._kfrombi_trombi_3 { grid-template-columns: repeat(3, 1fr); }
|
.kf-trombi_trombi_3 { grid-template-columns: repeat(3, 1fr); }
|
||||||
._kfrombi_trombi_4 { grid-template-columns: repeat(4, 1fr); }
|
.kf-trombi_trombi_4 { grid-template-columns: repeat(4, 1fr); }
|
||||||
._kfrombi_trombi_5 { grid-template-columns: repeat(5, 1fr); }
|
.kf-trombi_trombi_5 { grid-template-columns: repeat(5, 1fr); }
|
||||||
._kfrombi_trombi_6 { grid-template-columns: repeat(6, 1fr); }
|
.kf-trombi_trombi_6 { grid-template-columns: repeat(6, 1fr); }
|
||||||
._kfrombi_trombi_7 { grid-template-columns: repeat(7, 1fr); }
|
.kf-trombi_trombi_7 { grid-template-columns: repeat(7, 1fr); }
|
||||||
._kfrombi_trombi_8 { grid-template-columns: repeat(8, 1fr); }
|
.kf-trombi_trombi_8 { grid-template-columns: repeat(8, 1fr); }
|
||||||
|
|
||||||
.hidden { display: none; }
|
.hidden { display: none; }
|
||||||
._kfrombi_trombi_img {
|
.kf-trombi_trombi_img {
|
||||||
filter: grayscale(100%) contrast(150%);
|
filter: grayscale(100%) contrast(150%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
26
directory.js
26
directory.js
|
@ -5,7 +5,7 @@ const ordNrRegex = /.*pOrgNr=([0-9]+).*/gm;
|
||||||
const personalIDRegex = /.*pStPersonNr=([0-9]+).*/gm;
|
const personalIDRegex = /.*pStPersonNr=([0-9]+).*/gm;
|
||||||
|
|
||||||
function appendLink() {
|
function appendLink() {
|
||||||
if (document.getElementById("_kfrombi_row")) return;
|
if (document.getElementById("kf-trombi_row")) return;
|
||||||
|
|
||||||
var row_header = document.createElement("th");
|
var row_header = document.createElement("th");
|
||||||
row_header.textContent = "Trombi";
|
row_header.textContent = "Trombi";
|
||||||
|
@ -16,23 +16,23 @@ function appendLink() {
|
||||||
link.addEventListener("click", toggleTrombi);
|
link.addEventListener("click", toggleTrombi);
|
||||||
|
|
||||||
var slider = document.createElement("input");
|
var slider = document.createElement("input");
|
||||||
slider.id = "_kfrombi_columns_slider";
|
slider.id = "kf-trombi_columns_slider";
|
||||||
slider.type = "range";
|
slider.type = "range";
|
||||||
slider.value = 5;
|
slider.value = 5;
|
||||||
slider.min = 3;
|
slider.min = 3;
|
||||||
slider.max = 8;
|
slider.max = 8;
|
||||||
|
|
||||||
var column_nr = document.createElement("span");
|
var column_nr = document.createElement("span");
|
||||||
column_nr.id = "_kfrombi_column_nr";
|
column_nr.id = "kf-trombi_column_nr";
|
||||||
column_nr.textContent = slider.value;
|
column_nr.textContent = slider.value;
|
||||||
var column_label = document.createElement("span");
|
var column_label = document.createElement("span");
|
||||||
column_label.textContent = " columns";
|
column_label.textContent = " columns";
|
||||||
|
|
||||||
slider.addEventListener("input", (event) => {
|
slider.addEventListener("input", (event) => {
|
||||||
column_nr.textContent = slider.value;
|
column_nr.textContent = slider.value;
|
||||||
const trombi = document.getElementById("_kfrombi_trombi");
|
const trombi = document.getElementById("kf-trombi_trombi");
|
||||||
trombi.classList.remove( "_kfrombi_trombi_3", "_kfrombi_trombi_4", "_kfrombi_trombi_5", "_kfrombi_trombi_6", "_kfrombi_trombi_7", "_kfrombi_trombi_8" );
|
trombi.classList.remove( "kf-trombi_trombi_3", "kf-trombi_trombi_4", "kf-trombi_trombi_5", "kf-trombi_trombi_6", "kf-trombi_trombi_7", "kf-trombi_trombi_8" );
|
||||||
trombi.classList.add(`_kfrombi_trombi_${slider.value}`);
|
trombi.classList.add(`kf-trombi_trombi_${slider.value}`);
|
||||||
})
|
})
|
||||||
|
|
||||||
var row_links = document.createElement("td");
|
var row_links = document.createElement("td");
|
||||||
|
@ -41,7 +41,7 @@ function appendLink() {
|
||||||
var tr = document.createElement("tr");
|
var tr = document.createElement("tr");
|
||||||
tr.classList.add("coNavdocument.getElementByIdroup");
|
tr.classList.add("coNavdocument.getElementByIdroup");
|
||||||
tr.append(row_header, row_links);
|
tr.append(row_header, row_links);
|
||||||
tr.id = "_kfrombi_row";
|
tr.id = "kf-trombi_row";
|
||||||
|
|
||||||
const nav = document.getElementById("idPageNavi");
|
const nav = document.getElementById("idPageNavi");
|
||||||
nav.tBodies[0].append(tr);
|
nav.tBodies[0].append(tr);
|
||||||
|
@ -61,7 +61,7 @@ function generateCard(student, col) {
|
||||||
d.style.gridColumn = "auto";
|
d.style.gridColumn = "auto";
|
||||||
|
|
||||||
const img = document.createElement("img");
|
const img = document.createElement("img");
|
||||||
img.classList.add("_kfrombi_trombi_img");
|
img.classList.add("kf-trombi_trombi_img");
|
||||||
img.src = url;
|
img.src = url;
|
||||||
|
|
||||||
const name_div = document.createElement("div");
|
const name_div = document.createElement("div");
|
||||||
|
@ -72,20 +72,20 @@ function generateCard(student, col) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleTrombi() {
|
function toggleTrombi() {
|
||||||
const trombi = document.getElementById("_kfrombi_trombi");
|
const trombi = document.getElementById("kf-trombi_trombi");
|
||||||
const form = document.getElementById("idTNListe");
|
const form = document.getElementById("idTNListe");
|
||||||
trombi.classList.toggle("hidden");
|
trombi.classList.toggle("hidden");
|
||||||
form.classList.toggle("hidden");
|
form.classList.toggle("hidden");
|
||||||
}
|
}
|
||||||
|
|
||||||
function generateTrombi() {
|
function generateTrombi() {
|
||||||
var trombi = document.getElementById("_kfrombi_trombi");
|
var trombi = document.getElementById("kf-trombi_trombi");
|
||||||
if (trombi) { trombi.remove(); }
|
if (trombi) { trombi.remove(); }
|
||||||
const slider = document.getElementById("_kfrombi_columns_slider");
|
const slider = document.getElementById("kf-trombi_columns_slider");
|
||||||
trombi = document.createElement("div");
|
trombi = document.createElement("div");
|
||||||
trombi.id = "_kfrombi_trombi";
|
trombi.id = "kf-trombi_trombi";
|
||||||
trombi.classList.add("hidden");
|
trombi.classList.add("hidden");
|
||||||
trombi.classList.add(`_kfrombi_trombi_${slider.value}`);
|
trombi.classList.add(`kf-trombi_trombi_${slider.value}`);
|
||||||
const form = document.getElementById("idTNListe");
|
const form = document.getElementById("idTNListe");
|
||||||
|
|
||||||
const table_body = document.getElementById("idTNVWTable").tBodies[0];
|
const table_body = document.getElementById("idTNVWTable").tBodies[0];
|
||||||
|
|
BIN
icons/icon-128.png
Normal file
BIN
icons/icon-128.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.5 KiB |
119
icons/icon.svg
119
icons/icon.svg
|
@ -1,119 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
||||||
|
|
||||||
<svg
|
|
||||||
width="48"
|
|
||||||
height="48"
|
|
||||||
viewBox="0 0 12.7 12.7"
|
|
||||||
version="1.1"
|
|
||||||
id="svg1"
|
|
||||||
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
|
|
||||||
sodipodi:docname="border.svg"
|
|
||||||
inkscape:export-filename="icon-48.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="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg">
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="namedview1"
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#000000"
|
|
||||||
borderopacity="0.25"
|
|
||||||
inkscape:showpageshadow="2"
|
|
||||||
inkscape:pageopacity="0.0"
|
|
||||||
inkscape:pagecheckerboard="0"
|
|
||||||
inkscape:deskcolor="#d1d1d1"
|
|
||||||
inkscape:document-units="mm"
|
|
||||||
inkscape:zoom="1.0770412"
|
|
||||||
inkscape:cx="238.61667"
|
|
||||||
inkscape:cy="131.37844"
|
|
||||||
inkscape:window-width="2560"
|
|
||||||
inkscape:window-height="1413"
|
|
||||||
inkscape:window-x="0"
|
|
||||||
inkscape:window-y="27"
|
|
||||||
inkscape:window-maximized="1"
|
|
||||||
inkscape:current-layer="layer1" />
|
|
||||||
<defs
|
|
||||||
id="defs1">
|
|
||||||
<rect
|
|
||||||
x="0"
|
|
||||||
y="32.474262"
|
|
||||||
width="45.281854"
|
|
||||||
height="12.678828"
|
|
||||||
id="rect1" />
|
|
||||||
</defs>
|
|
||||||
<g
|
|
||||||
inkscape:label="Layer 1"
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer1">
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
transform="matrix(0.2907302,0,0,0.2907302,1.2586092,-0.4136854)"
|
|
||||||
id="text1"
|
|
||||||
style="font-size:8px;font-family:tex;-inkscape-font-specification:tex;white-space:pre;shape-inside:url(#rect1);display:inline;fill:#000000;stroke-width:0.755906;stroke-linecap:round;stroke-linejoin:round"><tspan
|
|
||||||
x="0"
|
|
||||||
y="39.753611"
|
|
||||||
id="tspan2">KFRombi</tspan></text>
|
|
||||||
<ellipse
|
|
||||||
style="fill:#000000;stroke-width:0.266185;stroke-linecap:round;stroke-linejoin:round"
|
|
||||||
id="path1"
|
|
||||||
cx="6.6160941"
|
|
||||||
cy="5.2686148"
|
|
||||||
rx="3.5493381"
|
|
||||||
ry="3.8652532" />
|
|
||||||
<path
|
|
||||||
sodipodi:type="star"
|
|
||||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.2;stroke-linecap:round;stroke-linejoin:round"
|
|
||||||
id="path2"
|
|
||||||
inkscape:flatsided="false"
|
|
||||||
sodipodi:sides="8"
|
|
||||||
sodipodi:cx="5.4926267"
|
|
||||||
sodipodi:cy="5.0868015"
|
|
||||||
sodipodi:r1="1.1985368"
|
|
||||||
sodipodi:r2="0.68863398"
|
|
||||||
sodipodi:arg1="-0.12226288"
|
|
||||||
sodipodi:arg2="0.36970345"
|
|
||||||
inkscape:rounded="0"
|
|
||||||
inkscape:randomized="0"
|
|
||||||
d="M 6.6822166,4.9406298 6.1347328,5.3356318 6.4371528,5.8246096 5.7707147,5.7167887 5.6387984,6.2763914 5.2437964,5.7289076 4.7548186,6.0313277 4.8626395,5.3648895 4.3030368,5.2329733 4.8505206,4.8379713 4.5481005,4.3489935 5.2145387,4.4568144 5.3464549,3.8972116 5.7414569,4.4446954 6.2304347,4.1422754 6.1226138,4.8087135 Z"
|
|
||||||
transform="translate(-0.61028141,-0.58743968)" />
|
|
||||||
<path
|
|
||||||
sodipodi:type="star"
|
|
||||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.2;stroke-linecap:round;stroke-linejoin:round"
|
|
||||||
id="path3"
|
|
||||||
inkscape:flatsided="false"
|
|
||||||
sodipodi:sides="8"
|
|
||||||
sodipodi:cx="5.4926267"
|
|
||||||
sodipodi:cy="5.0868015"
|
|
||||||
sodipodi:r1="1.1985368"
|
|
||||||
sodipodi:r2="0.68863398"
|
|
||||||
sodipodi:arg1="-0.12226288"
|
|
||||||
sodipodi:arg2="0.36970345"
|
|
||||||
inkscape:rounded="0"
|
|
||||||
inkscape:randomized="0"
|
|
||||||
d="M 6.6822166,4.9406298 6.1347328,5.3356318 6.4371528,5.8246096 5.7707147,5.7167887 5.6387984,6.2763914 5.2437964,5.7289076 4.7548186,6.0313277 4.8626395,5.3648895 4.3030368,5.2329733 4.8505206,4.8379713 4.5481005,4.3489935 5.2145387,4.4568144 5.3464549,3.8972116 5.7414569,4.4446954 6.2304347,4.1422754 6.1226138,4.8087135 Z"
|
|
||||||
transform="translate(2.6524998,-0.71195834)" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.2;stroke-linecap:round;stroke-linejoin:round"
|
|
||||||
id="path4"
|
|
||||||
sodipodi:type="arc"
|
|
||||||
sodipodi:cx="6.6160941"
|
|
||||||
sodipodi:cy="7.5143247"
|
|
||||||
sodipodi:rx="1.5538439"
|
|
||||||
sodipodi:ry="0.69132471"
|
|
||||||
sodipodi:start="0"
|
|
||||||
sodipodi:end="3.2134157"
|
|
||||||
sodipodi:arc-type="slice"
|
|
||||||
d="M 8.169938,7.5143247 A 1.5538439,0.69132471 0 0 1 7.3605798,8.1211326 1.5538439,0.69132471 0 0 1 5.7756539,8.0957985 1.5538439,0.69132471 0 0 1 5.0662563,7.4647143 l 1.5498378,0.04961 z" />
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;fill-opacity:1;stroke-width:0.2;stroke-linecap:round;stroke-linejoin:round"
|
|
||||||
id="rect4"
|
|
||||||
width="0.33944243"
|
|
||||||
height="0.55598503"
|
|
||||||
x="6.6160941"
|
|
||||||
y="5.9792342"
|
|
||||||
ry="0.14385796" />
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 4.5 KiB |
|
@ -1,11 +1,11 @@
|
||||||
{
|
{
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "KFRombi",
|
"name": "KF-Trombi",
|
||||||
"version": "0.1",
|
"version": "0.1",
|
||||||
|
|
||||||
"browser_specific_settings": {
|
"browser_specific_settings": {
|
||||||
"gecko": {
|
"gecko": {
|
||||||
"id": "kfrombi@math.janko.fr"
|
"id": "kf-trombi@math.janko.fr",
|
||||||
"update_url": "https://gaspard.janko.fr/s/firefox-add-ons/updates.json"
|
"update_url": "https://gaspard.janko.fr/s/firefox-add-ons/updates.json"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
"description": "Generates a directory of students with photos from online.uni-graz.at",
|
"description": "Generates a directory of students with photos from online.uni-graz.at",
|
||||||
|
|
||||||
"icons": {
|
"icons": {
|
||||||
"48": "icons/icon-48.png"
|
"128": "icons/icon-128.png"
|
||||||
},
|
},
|
||||||
|
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
|
|
12
updates.json
Normal file
12
updates.json
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"addons": {
|
||||||
|
"{kf-trombi@math.janko.fr}": {
|
||||||
|
"updates": [
|
||||||
|
{
|
||||||
|
"version": "0.1",
|
||||||
|
"update_link": "https://gaspard.janko.fr/s/firefox-add-ons/kf-trombi/kf-trombi-0.1.xpi"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue