package bonsai

  1. Overview
  2. Docs
A library for building dynamic webapps, using Js_of_ocaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.17.0.tar.gz
sha256=c78c4476ee6b856846e2d0941e5965009d5e1b853e564b2b1bee61202f0b1ebb

doc/bonsai.web_ui_favicon_svg/Favicon_svg/index.html

Module Favicon_svgSource

Sourcetype t
Sourceval of_unicode : font_size:Core.Percent.t -> ?background_color:Css_gen.Color.t -> ?font_color:Css_gen.Color.t -> ?pos_x:Core.Percent.t -> ?pos_y:Core.Percent.t -> string -> t

SVG favicon displaying given unicode string, scaled to fit the space.

For best effects, use a single character (there is plenty to choose from in unicode, e.g. emojis!) or a short string.

font_size is relative to the size of the icon. 0.9 is a reasonable starting point, but you might need to tune it.

font_color only makes sense for text or b&w emojis / symbols.

Sourceval to_svg_file_content : t -> string

Use to_svg_file_content to save to file, or as ~contents argument to Cohttp_static_handler.What_to_serve.Embedded

Sourceval to_embedded_url : t -> Uri.t

Use to_embedded_url to get a data URL containing the svg. It can be used e.g. with Cohttp_static_handler.External