lovasoa / SQLpage

SQL-only webapp builder, empowering data analysts to build websites and applications quickly
https://sql.datapage.app
MIT License
1.29k stars 69 forks source link

Align table column right or centre #115

Closed lukavia closed 10 months ago

lukavia commented 10 months ago

I have an application that deals with currency amounts in table. It would be nice if I can select certain columns (usually that deals with fractional numbers) to align right instead of left.
May be something like markdown:

SELECT 'table' as component, 'Amount' as right;
lovasoa commented 10 months ago

That would indeed be a useful feature to have ! Would you be interested to make a small pull request ? The file to change is:

https://github.com/lovasoa/SQLpage/blob/5fc00bda0cd84337475c526116e63f0cce2304ca/sqlpage/templates/table.handlebars#L30-L36

and the documentation to update is here

https://github.com/lovasoa/SQLpage/blob/5fc00bda0cd84337475c526116e63f0cce2304ca/examples/official-site/sqlpage/migrations/01_documentation.sql#L350-L366

lovasoa commented 10 months ago

I implemented it, it'll be in v0.15

lukavia commented 10 months ago

It's perfect! Thank you very much!

This is great work. I've been thinking of writing something similar for years, but I just didn't have the time. Now that I've found SQLPage It would make things happend. Keep up with this great work and I hope I can contribute very soon. Cheers