diff --git a/docs/marca/simbolo-naranja.svg b/docs/marca/simbolo-naranja.svg index e043689..5cae2b1 100644 --- a/docs/marca/simbolo-naranja.svg +++ b/docs/marca/simbolo-naranja.svg @@ -1,9 +1 @@ - - - - - - - - - + diff --git a/docs/marca/simbolo-negativo.svg b/docs/marca/simbolo-negativo.svg index dda1b73..0f7d933 100644 --- a/docs/marca/simbolo-negativo.svg +++ b/docs/marca/simbolo-negativo.svg @@ -1,8 +1 @@ - - - - - - - - + diff --git a/docs/marca/simbolo.svg b/docs/marca/simbolo.svg index cc365aa..07941ee 100644 --- a/docs/marca/simbolo.svg +++ b/docs/marca/simbolo.svg @@ -1,8 +1 @@ - - - - - - - - + diff --git a/sites/takethestreet/favicon.svg b/sites/takethestreet/favicon.svg index cc365aa..07941ee 100644 --- a/sites/takethestreet/favicon.svg +++ b/sites/takethestreet/favicon.svg @@ -1,8 +1 @@ - - - - - - - - + diff --git a/sites/takethestreet/img/simbolo-negativo.svg b/sites/takethestreet/img/simbolo-negativo.svg index dda1b73..0f7d933 100644 --- a/sites/takethestreet/img/simbolo-negativo.svg +++ b/sites/takethestreet/img/simbolo-negativo.svg @@ -1,8 +1 @@ - - - - - - - - + diff --git a/sites/takethestreet/img/simbolo.svg b/sites/takethestreet/img/simbolo.svg index cc365aa..07941ee 100644 --- a/sites/takethestreet/img/simbolo.svg +++ b/sites/takethestreet/img/simbolo.svg @@ -1,8 +1 @@ - - - - - - - - + diff --git a/sites/tomalacalle/favicon.svg b/sites/tomalacalle/favicon.svg index cc365aa..07941ee 100644 --- a/sites/tomalacalle/favicon.svg +++ b/sites/tomalacalle/favicon.svg @@ -1,8 +1 @@ - - - - - - - - + diff --git a/sites/tomalacalle/img/simbolo-negativo.svg b/sites/tomalacalle/img/simbolo-negativo.svg index dda1b73..0f7d933 100644 --- a/sites/tomalacalle/img/simbolo-negativo.svg +++ b/sites/tomalacalle/img/simbolo-negativo.svg @@ -1,8 +1 @@ - - - - - - - - + diff --git a/sites/tomalacalle/img/simbolo.svg b/sites/tomalacalle/img/simbolo.svg index cc365aa..07941ee 100644 --- a/sites/tomalacalle/img/simbolo.svg +++ b/sites/tomalacalle/img/simbolo.svg @@ -1,8 +1 @@ - - - - - - - - + diff --git a/tools/farola.py b/tools/farola.py new file mode 100644 index 0000000..a47c0b1 --- /dev/null +++ b/tools/farola.py @@ -0,0 +1,41 @@ +import math, sys +NAR, AMA = "#f04e23", "#f2b705" + +def bordes(signo, t0, t1, n=24): + izq, der = [], [] + for k in range(n + 1): + t = t0 + (t1 - t0) * k / n + y = 18 + 79 * t + a = 5 + 9 * t + cx = 72 + signo * a * math.cos(2 * math.pi * t) + w = 3 + 6 * t + izq.append((cx - w, y)); der.append((cx + w, y)) + return izq, der + +def linea(pts): + return "M" + " L".join(f"{x:.1f},{y:.1f}" for x, y in pts) + +def cinta(signo, t0, t1): + izq, der = bordes(signo, t0, t1) + return linea(izq + der[::-1]) + " Z" + +def farola(ink="#111", fondo=None, nar=NAR, ama=AMA): + bg = f'' if fondo else "" + corte = fondo or "#fff" + def pieza(col, signo, t0, t1, arriba): + out = f'' + if arriba: + izq, der = bordes(signo, t0, t1) + out += "".join(f'' for e in (izq, der)) + return out + luz = (pieza(ama, 1, 0, .5, False) + pieza(nar, -1, 0, .5, True) + + pieza(nar, -1, .5, 1, False) + pieza(ama, 1, .5, 1, True)) + poste = f'' + cabeza = f'' + return f'{bg}{luz}{poste}{cabeza}\n' + +if __name__ == "__main__": + d = sys.argv[1] + open(f"{d}/simbolo.svg", "w").write(farola()) + open(f"{d}/simbolo-negativo.svg", "w").write(farola("#fff", "#111")) + open(f"{d}/simbolo-naranja.svg", "w").write(farola("#111", NAR, nar="#fff"))