Added MoreColorPride and fixed download color bug.

This commit is contained in:
Lena Schimmel 2019-06-29 11:25:35 +02:00
parent 58022e1036
commit f61f4c5c0f
6 changed files with 71 additions and 55 deletions

View file

@ -87,7 +87,7 @@ function flagList() {
} }
async function getPageOutput(page) { async function getPageOutput(page) {
const defaultLogo = "orig"; const defaultLogo = "orig2";
const content = fragment(page.name); const content = fragment(page.name);
const output = const output =
fragment('head') fragment('head')
@ -171,7 +171,8 @@ app.get('/design/download', async function (req, res) {
gradients.colorLetter(letter, color, false); gradients.colorLetter(letter, color, false);
}); });
} else { } else {
gradients.changeGradients(flags.allFlags[flag]); const colormap = flags.flagmap(flags.linesInDesign(layout), flags.allFlags[flag]);
gradients.changeGradients(colormap);
} }
gradients.setShadowMode(withshadow ? "on" : "off"); gradients.setShadowMode(withshadow ? "on" : "off");

View file

@ -109,9 +109,7 @@ window.queer.flagSelected = function () {
window.queer.layoutSelected = function () { window.queer.layoutSelected = function () {
layoutName = $("#layoutselect :selected").val(); layoutName = $("#layoutselect :selected").val();
if(layoutName.indexOf("1") > 0) lines = 1; lines = flags.linesInDesign(layoutName);
if(layoutName.indexOf("2") > 0) lines = 2;
if(layoutName.indexOf("3") > 0) lines = 3;
if(lastLayout != layoutName) { if(lastLayout != layoutName) {
lastLayout = layoutName; lastLayout = layoutName;

View file

@ -1,7 +1,7 @@
exports.flagmap = function(lines, c) { exports.flagmap = function (lines, c) {
if(lines == 1) { if (lines == 1) {
if(c.length == 3) { if (c.length == 3) {
return { "Q0": c[0], "U0": c[0], "E0": c[0], "E1": c[0], "R0": c[0], "A0": c[1], "L0": c[1], "L1": c[1], "Y0": c[2], "E2": c[2], "A1": c[2], "R1": c[2]}; return { "Q0": c[0], "U0": c[0], "E0": c[0], "E1": c[0], "R0": c[0], "A0": c[1], "L0": c[1], "L1": c[1], "Y0": c[2], "E2": c[2], "A1": c[2], "R1": c[2] };
} else { } else {
var ret = {}; var ret = {};
for (let i = 0; i < exports.letters.length; i++) { for (let i = 0; i < exports.letters.length; i++) {
@ -10,27 +10,42 @@ exports.flagmap = function(lines, c) {
} }
} }
return ret; return ret;
}
if(lines == 2) {
if(c.length == 3)
return { "Q0": c[0], "U0": c[0], "E0": c[1], "E1": c[1], "R0": c[2], "A0": c[0], "L0": c[0], "L1": c[0], "Y0": c[1], "E2": c[1], "A1": c[2], "R1": c[2]};
else if (c.length == 4)
return { "Q0": c[0], "U0": c[1], "E0": c[1], "E1": c[2], "R0": c[3], "A0": c[0], "L0": c[1], "L1": c[1], "Y0": c[2], "E2": c[2], "A1": c[3], "R1": c[3]};
else if (c.length == 5)
return { "Q0": c[0], "U0": c[1], "E0": c[2], "E1": c[3], "R0": c[4], "A0": c[0], "L0": c[1], "L1": c[1], "Y0": c[2], "E2": c[2], "A1": c[3], "R1": c[4]};
else if (c.length == 7)
return { "Q0": c[1], "U0": c[2], "E0": c[3], "E1": c[4], "R0": c[5], "A0": c[0], "L0": c[1], "L1": c[2], "Y0": c[3], "E2": c[4], "A1": c[5], "R1": c[6]};
}
if(lines == 3) {
if(c.length == 3)
return { "Q0": c[0], "U0": c[0], "E0": c[0], "E1": c[0], "R0": c[0], "A0": c[1], "L0": c[1], "L1": c[1], "Y0": c[2], "E2": c[2], "A1": c[2], "R1": c[2]};
else if (c.length == 4)
return { "Q0": c[0], "U0": c[1], "E0": c[1], "E1": c[2], "R0": c[3], "A0": c[0], "L0": c[1], "L1": c[1], "Y0": c[2], "E2": c[2], "A1": c[3], "R1": c[3]};
else if (c.length == 5)
return { "Q0": c[0], "U0": c[1], "E0": c[2], "E1": c[3], "R0": c[4], "A0": c[0], "L0": c[1], "L1": c[1], "Y0": c[2], "E2": c[2], "A1": c[3], "R1": c[4]};
else if (c.length == 7)
return { "Q0": c[1], "U0": c[2], "E0": c[3], "E1": c[4], "R0": c[5], "A0": c[0], "L0": c[1], "L1": c[2], "Y0": c[3], "E2": c[4], "A1": c[5], "R1": c[6]};
} }
if (lines == 2) {
if (c.length == 3)
return { "Q0": c[0], "U0": c[0], "E0": c[1], "E1": c[1], "R0": c[2], "A0": c[0], "L0": c[0], "L1": c[0], "Y0": c[1], "E2": c[1], "A1": c[2], "R1": c[2] };
else if (c.length == 4)
return { "Q0": c[0], "U0": c[1], "E0": c[1], "E1": c[2], "R0": c[3], "A0": c[0], "L0": c[1], "L1": c[1], "Y0": c[2], "E2": c[2], "A1": c[3], "R1": c[3] };
else if (c.length == 5)
return { "Q0": c[0], "U0": c[1], "E0": c[2], "E1": c[3], "R0": c[4], "A0": c[0], "L0": c[1], "L1": c[1], "Y0": c[2], "E2": c[2], "A1": c[3], "R1": c[4] };
else if (c.length == 7)
return { "Q0": c[1], "U0": c[2], "E0": c[3], "E1": c[4], "R0": c[5], "A0": c[0], "L0": c[1], "L1": c[2], "Y0": c[3], "E2": c[4], "A1": c[5], "R1": c[6] };
else if (c.length == 8)
return { "Q0": c[1], "U0": c[2], "E0": c[3], "E1": c[5], "R0": c[6], "A0": c[0], "L0": c[1], "L1": c[2], "Y0": c[4], "E2": c[5], "A1": c[6], "R1": c[7] };
}
if (lines == 3) {
if (c.length == 3)
return { "Q0": c[0], "U0": c[0], "E0": c[0], "E1": c[0], "R0": c[0], "A0": c[1], "L0": c[1], "L1": c[1], "Y0": c[2], "E2": c[2], "A1": c[2], "R1": c[2] };
else if (c.length == 4)
return { "Q0": c[0], "U0": c[1], "E0": c[1], "E1": c[2], "R0": c[3], "A0": c[0], "L0": c[1], "L1": c[1], "Y0": c[2], "E2": c[2], "A1": c[3], "R1": c[3] };
else if (c.length == 5)
return { "Q0": c[0], "U0": c[1], "E0": c[2], "E1": c[3], "R0": c[4], "A0": c[0], "L0": c[1], "L1": c[1], "Y0": c[2], "E2": c[2], "A1": c[3], "R1": c[4] };
else if (c.length == 7)
return { "Q0": c[1], "U0": c[2], "E0": c[3], "E1": c[4], "R0": c[5], "A0": c[0], "L0": c[1], "L1": c[2], "Y0": c[3], "E2": c[4], "A1": c[5], "R1": c[6] };
else if (c.length == 8)
return { "Q0": c[2], "U0": c[3], "E0": c[4], "E1": c[5], "R0": c[6], "A0": c[0], "L0": c[1], "L1": c[1], "Y0": c[4], "E2": c[5], "A1": c[6], "R1": c[7] };
}
}
exports.linesInDesign = function (layoutName) {
console.log("linesInDesign");
if (layoutName.indexOf("1") > 0) return 1;
if (layoutName.indexOf("2") > 0) return 2;
if (layoutName.indexOf("3") > 0) return 3;
console.log("Unknown number of lines in " + layoutName);
return 1;
} }
function flag5spezial(c) { function flag5spezial(c) {
@ -107,50 +122,52 @@ const gayPink = "#E4007D";
exports.allColors = [ exports.allColors = [
white, black, transBlue, transRose, biPink, biViolet, biBlue, aceGrey, aceViolet, panPink, panYellow, panBlue, white, black, transBlue, transRose, biPink, biViolet, biBlue, aceGrey, aceViolet, panPink, panYellow, panBlue,
romanticDarkGreen, romanticLightGreen, intersexYellow, nonbinaryYellow, nonbinaryViolet, genderqueerViolet, romanticDarkGreen, romanticLightGreen, intersexYellow, nonbinaryYellow, nonbinaryViolet, genderqueerViolet,
genderqueerGreen, phillyBrown, genderfluidPink, genderfluidViolet, genderfluidBlue, polysexualPink, polysexualGreen, genderqueerGreen, phillyBrown, genderfluidPink, genderfluidViolet, genderfluidBlue, polysexualPink, polysexualGreen,
polysexualBlue, lebsian1, lebsian2, lebsian3, lebsian4, lebsian5, lebsian6, lebsian7, polyamRed, polyamBlue, polysexualBlue, lebsian1, lebsian2, lebsian3, lebsian4, lebsian5, lebsian6, lebsian7, polyamRed, polyamBlue,
polyamYellow, agenderGrey, agenderGreen, kinkBlue, kinkRed, gayRed, gayOrange, gayYellow, gayGreen, gayBlue, gayViolet, gayPink polyamYellow, agenderGrey, agenderGreen, kinkBlue, kinkRed, gayRed, gayOrange, gayYellow, gayGreen, gayBlue, gayViolet, gayPink
]; ];
exports.gay = [gayRed, gayOrange, gayYellow, gayGreen, gayBlue, gayViolet, gayPink]; exports.gay = [gayRed, gayOrange, gayYellow, gayGreen, gayBlue, gayViolet, gayPink];
exports.philly = [black, phillyBrown, gayRed, gayOrange, gayYellow, gayGreen, gayBlue, gayPink];
exports.aro = [romanticDarkGreen, romanticLightGreen, white, aceGrey, black]; exports.aro = [romanticDarkGreen, romanticLightGreen, white, aceGrey, black];
exports.nonbinary = [nonbinaryYellow, white, nonbinaryViolet, black]; exports.nonbinary = [nonbinaryYellow, white, nonbinaryViolet, black];
exports.genderqueer = [genderqueerViolet, white, genderqueerGreen]; exports.genderqueer = [genderqueerViolet, white, genderqueerGreen];
exports.polysexual = [polysexualPink, polysexualGreen, polysexualBlue]; exports.polysexual = [polysexualPink, polysexualGreen, polysexualBlue];
exports.trans = [transBlue, transRose, white, transRose, transBlue]; exports.trans = [transBlue, transRose, white, transRose, transBlue];
exports.bi = [biPink, biPink, biViolet, biBlue, biBlue]; exports.bi = [biPink, biViolet, biBlue];
exports.pan = [panPink, panYellow, panBlue]; exports.pan = [panPink, panYellow, panBlue];
exports.ace = [black, aceGrey, white, aceViolet]; exports.ace = [black, aceGrey, white, aceViolet];
exports.genderfluid = [genderfluidPink, white, genderfluidViolet, black, genderfluidBlue]; exports.genderfluid = [genderfluidPink, white, genderfluidViolet, black, genderfluidBlue];
exports.rosa = [transRose, transRose, transRose]; exports.rosa = [transRose, transRose, transRose];
exports.agender = [black, agenderGrey, white, agenderGreen, white, agenderGrey, black]; exports.agender = [black, agenderGrey, white, agenderGreen, white, agenderGrey, black];
exports.lebsian = [lebsian1, lebsian2, lebsian3, lebsian4, lebsian5, lebsian6, lebsian7]; exports.lebsian = [lebsian1, lebsian2, lebsian3, lebsian4, lebsian5, lebsian6, lebsian7];
exports.polyam = /*spezial*/ [polyamBlue, polyamRed, polyamYellow, polyamRed, black]; exports.polyam = /*spezial*/[polyamBlue, polyamRed, polyamYellow, polyamRed, black];
exports.intersex = /*spezial*/ [intersexYellow, aceViolet, intersexYellow, aceViolet, intersexYellow]; exports.intersex = /*spezial*/[intersexYellow, aceViolet, intersexYellow, aceViolet, intersexYellow];
exports.kink = /*spezial*/ [kinkBlue, black, kinkBlue, white, kinkRed, black, kinkBlue]; exports.kink = /*spezial*/[kinkBlue, black, kinkBlue, white, kinkRed, black, kinkBlue];
exports.allFlags = { exports.allFlags = {
"Gay" : exports.gay, "Gay": exports.gay,
"Asexuell" : exports.ace, "MoreColorPride": exports.philly,
"Bisexuell" : exports.bi, "Asexuell": exports.ace,
"Pansexuell" : exports.pan, "Bisexuell": exports.bi,
"Trans" : exports.trans, "Pansexuell": exports.pan,
"Aromantisch" : exports.aro, "Trans": exports.trans,
"Nicht-Binär" : exports.nonbinary, "Aromantisch": exports.aro,
"Genderqueer" : exports.genderqueer, "Nicht-Binär": exports.nonbinary,
"Polyamor" : exports.polyam, "Genderqueer": exports.genderqueer,
"Polysexuell" : exports.polysexual, "Polyamor": exports.polyam,
"Inter" : exports.intersex, "Polysexuell": exports.polysexual,
"Genderfluid" : exports.genderfluid, "Inter": exports.intersex,
"Agender" : exports.agender, "Genderfluid": exports.genderfluid,
"Lesbisch" : exports.lebsian, "Agender": exports.agender,
"Kinky" : exports.kink "Lesbisch": exports.lebsian,
"Kinky": exports.kink
}; };
exports.letters = ["Q0", "U0", "E0", "E1", "R0", "A0", "L0", "L1", "Y0", "E2", "A1", "R1"]; exports.letters = ["Q0", "U0", "E0", "E1", "R0", "A0", "L0", "L1", "Y0", "E2", "A1", "R1"];
exports.layouts = ["block2", "block3", "orig", "orig3", "vert1", "vert2", "vert3"]; exports.layouts = ["block2", "block3", "orig2", "orig3", "vert1", "vert2", "vert3"];

View file

@ -9,7 +9,7 @@
<form action="/design/download" id="person" target="_download"> <form action="/design/download" id="person" target="_download">
<label for="layout">Layout</label> <label for="layout">Layout</label>
<select name="layout" id="layoutselect" onchange="queer.layoutSelected();"> <select name="layout" id="layoutselect" onchange="queer.layoutSelected();">
<option value="orig">2 Zeilen gewellt</option> <option value="orig2">2 Zeilen gewellt</option>
<option value="orig3">3 Zeilen gewellt</option> <option value="orig3">3 Zeilen gewellt</option>
<option value="vert1">1 Zeile gerade</option> <option value="vert1">1 Zeile gerade</option>
<option value="vert2">2 Zeilen gerade</option> <option value="vert2">2 Zeilen gerade</option>

View file

@ -1,5 +1,5 @@
<div class="screenbox"> <div class="screenbox">
<img id="shadow" src="img/shadow/orig.svg" alt="Queer all year"> <img id="shadow" src="img/shadow/orig2.svg" alt="Queer all year">
$MAINLOGO $MAINLOGO
<div id="identity">(Gay)</div> <div id="identity">(Gay)</div>
<div id="arrow"><a href="#" onclick="queer.scrollDown(); return false;">⇣</a></div> <div id="arrow"><a href="#" onclick="queer.scrollDown(); return false;">⇣</a></div>

View file

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB