menu sin JS, iconos propios en vez de emoji, chats y tribus mas usables, README al dia
La 1.3.5 manda script-src 'none': fuera mobile_menu.js y mobile_pub.js. La hoja del menu se abre con el ancla #oasis-menu y :target, y el gesto atras la cierra sin cambiar de pantalla. La barra del pub solo sale si hay algo que contar. - iconos de linea propios (images/mobile-ico-*.svg, con mask) en los avisos de version y de sugerencia, las fichas de visibilidad y Compartir, en vez de emoji - avisos de arriba en una linea cada uno - chats: Responder es un boton con su nombre y Enviar ocupa el ancho; lo mismo en la respuesta del foro - tribus: ancla en las pestañas, todas en mayusculas, etiquetas y votos del foro de 44px - comentarios abiertos con la opcion del dev (setCommentsOpen) - Publicar al primer sitio de escribir encendido - buscador con "mas opciones" de la 1.3.5 tambien en form.filter-box - zonas tactiles y letra que quedaban cortas en fichas, pager, hora de comentario - README con capturas nuevas: actividad y menu de serie, perfil Activista, tribu, blog y ajustes; portada con los colores de serie - guia: sin JS desde la 1.3.5, la hoja con :target y los iconos mobile-*.svg
|
Before Width: | Height: | Size: 305 KiB After Width: | Height: | Size: 141 KiB |
BIN
docs/capturas/01-actividad.png
Normal file
|
After Width: | Height: | Size: 146 KiB |
|
Before Width: | Height: | Size: 134 KiB |
BIN
docs/capturas/02-menu.png
Normal file
|
After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 160 KiB |
BIN
docs/capturas/03-menu-activista.png
Normal file
|
After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 133 KiB |
BIN
docs/capturas/04-tribu.png
Normal file
|
After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 110 KiB |
BIN
docs/capturas/05-blog.png
Normal file
|
After Width: | Height: | Size: 61 KiB |
BIN
docs/capturas/06-ajustes.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 78 KiB |
|
|
@ -1,9 +1,11 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Portada y esquemas del README, con la paleta del tema Acampada.
|
||||
"""Portada y esquemas del README.
|
||||
|
||||
Las capturas de movil (01..08) se hacen aparte, con la app arrancada en un nodo de
|
||||
pruebas a 412x915 y escala 2; este script compone 00-portada.png a partir de ellas y
|
||||
dibuja esquema-interfaz.png, esquema-rama.png y esquema-llamadas.png.
|
||||
Las capturas de movil (01..06) se hacen aparte, con la app arrancada en un nodo de
|
||||
pruebas a 412x915 y escala 2, en español y con lo que trae de serie (perfil Minimo y
|
||||
colores del dev; 03 a 06 con el perfil Activista). Este script compone 00-portada.png
|
||||
a partir de ellas, con los colores de serie, y dibuja esquema-interfaz.png,
|
||||
esquema-rama.png y esquema-llamadas.png (estos aun con la paleta de Acampada).
|
||||
El texto vive aqui: se cambia y se relanza, nunca se retocan los PNG a mano.
|
||||
|
||||
python3 docs/capturas/generar_portada.py
|
||||
|
|
@ -17,22 +19,25 @@ ANTON = HERE.parents[1] / "src/client/assets/fonts/Anton-Regular.ttf"
|
|||
SANS = "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"
|
||||
|
||||
BG, FG, NEON, MUTED = "#ffffff", "#000000", "#00e5ff", "#555555"
|
||||
# colores de serie del movil (los de la APK oficial del dev)
|
||||
DEV_BG, DEV_CARD, DEV_FG, DEV_ACCENT, DEV_MUTED = "#121212", "#1e1e1e", "#ffd700", "#ffa300", "#bbbbbb"
|
||||
SANS_BOLD = "/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf"
|
||||
|
||||
|
||||
def font(path, size):
|
||||
return ImageFont.truetype(str(path), size)
|
||||
|
||||
|
||||
def phone(shot, width):
|
||||
"""Una captura dentro de un marco negro grueso con la sombra cian de los botones."""
|
||||
def phone(shot, width, fg=FG, neon=NEON):
|
||||
"""Una captura dentro de un marco grueso con una sombra de color debajo."""
|
||||
im = Image.open(HERE / shot).convert("RGB")
|
||||
h = round(im.height * width / im.width)
|
||||
im = im.resize((width, h), Image.LANCZOS)
|
||||
pad, radius, shadow = 10, 34, 10
|
||||
frame = Image.new("RGBA", (width + 2 * pad, h + 2 * pad + shadow), (0, 0, 0, 0))
|
||||
d = ImageDraw.Draw(frame)
|
||||
d.rounded_rectangle((0, shadow, width + 2 * pad - 1, h + 2 * pad + shadow - 1), radius, fill=NEON)
|
||||
d.rounded_rectangle((0, 0, width + 2 * pad - 1, h + 2 * pad - 1), radius, fill=FG)
|
||||
d.rounded_rectangle((0, shadow, width + 2 * pad - 1, h + 2 * pad + shadow - 1), radius, fill=neon)
|
||||
d.rounded_rectangle((0, 0, width + 2 * pad - 1, h + 2 * pad - 1), radius, fill=fg)
|
||||
mask = Image.new("L", im.size, 0)
|
||||
ImageDraw.Draw(mask).rounded_rectangle((0, 0, width - 1, h - 1), radius - pad, fill=255)
|
||||
frame.paste(im, (pad, pad), mask)
|
||||
|
|
@ -41,23 +46,23 @@ def phone(shot, width):
|
|||
|
||||
def portada():
|
||||
W, H = 1600, 1100
|
||||
out = Image.new("RGB", (W, H), BG)
|
||||
out = Image.new("RGB", (W, H), DEV_BG)
|
||||
d = ImageDraw.Draw(out)
|
||||
d.text((80, 40), "OASIS MOBILE", font=font(ANTON, 92), fill=FG)
|
||||
bottom = d.textbbox((80, 40), "OASIS MOBILE", font=font(ANTON, 92))[3]
|
||||
d.rectangle((80, bottom + 12, 420, bottom + 20), fill=FG)
|
||||
d.text((80, 196), "Rama PRUEBAS del hacklab · base Oasis 1.3.3 · tema Acampada, pensado para el pulgar",
|
||||
font=font(SANS, 27), fill=MUTED)
|
||||
shots = [("01-portada.png", "Actividad al abrir"), ("02-tribus.png", "Tribus en filas"),
|
||||
("03-votacion.png", "Votar en semáforo"), ("07-oasismobile.png", "El menú, tema del dev")]
|
||||
pw, gap, top = 320, 50, 270
|
||||
d.text((80, 40), "OASIS MOBILE", font=font(SANS_BOLD, 84), fill=DEV_FG)
|
||||
bottom = d.textbbox((80, 40), "OASIS MOBILE", font=font(SANS_BOLD, 84))[3]
|
||||
d.rectangle((80, bottom + 12, 420, bottom + 18), fill=DEV_ACCENT)
|
||||
d.text((80, 186), "Rama PRUEBAS del hacklab · base Oasis 1.3.5 · lo que sale al instalarla",
|
||||
font=font(SANS, 27), fill=DEV_MUTED)
|
||||
shots = [("01-actividad.png", "Actividad al abrir"), ("02-menu.png", "Menú, perfil Mínimo"),
|
||||
("03-menu-activista.png", "Menú, perfil Activista"), ("04-tribu.png", "Una tribu")]
|
||||
pw, gap, top = 320, 50, 260
|
||||
x = (W - (4 * (pw + 20) + 3 * gap)) // 2
|
||||
cap = font(ANTON, 34)
|
||||
cap = font(SANS_BOLD, 26)
|
||||
for shot, label in shots:
|
||||
fr = phone(shot, pw)
|
||||
fr = phone(shot, pw, fg="#000000", neon=DEV_ACCENT)
|
||||
out.paste(fr, (x, top), fr)
|
||||
tw = d.textlength(label.upper(), font=cap)
|
||||
d.text((x + (fr.width - tw) / 2, top + fr.height + 18), label.upper(), font=cap, fill=FG)
|
||||
tw = d.textlength(label, font=cap)
|
||||
d.text((x + (fr.width - tw) / 2, top + fr.height + 18), label, font=cap, fill=DEV_FG)
|
||||
x += fr.width + gap
|
||||
out.save(HERE / "00-portada.png", optimize=True)
|
||||
|
||||
|
|
@ -202,7 +207,7 @@ def esquema_llamadas():
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
portada()
|
||||
esquema()
|
||||
esquema_rama()
|
||||
esquema_llamadas()
|
||||
import sys
|
||||
# sin argumentos, todo; con nombres, solo esos (p. ej. "portada")
|
||||
for name in sys.argv[1:] or ["portada", "esquema", "esquema_rama", "esquema_llamadas"]:
|
||||
globals()[name]()
|
||||
|
|
|
|||