~iany/ Menu
  • Series
  • Tags
  1. Home
  2. Tags
  3. Frontend

Frontend

A collection of 2 articles

Responsive SVG

SVG can use percentage as unit, but it is often more convenient to use px as unit. Framework such as d3 also uses px internally. However, it is still easy to scale an SVG using attributes viewBox and preserveAspectRatio even px is used as unit internally.

Updated Dec 11, 2025  •  3 min read

Rails Compound Input

When I implement time input feature for 19wu (an open source ticket sale system), I want to split the datetime into date and time parts, so JavaScript date picker and time picker can be used. This post introduces two methods I found. Compound datetime input composed_of utilizes assign_multiparameter_attributes trick like datetime_select, and fields_for mocks an association. The github repository doitian/rails-compound-input-demo contains demos for both methods.

Updated Nov 19, 2025  •  3 min read

© 2026  •  ~iany/  •  CC-BY-SA 4.0