You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

web.adoc 860B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. +++
  2. +++
  3. :source-highlighter: pygments
  4. == Web development
  5. === Quick reference
  6. Text area resizing::
  7. `resize: vertical`, `resize: horizontal`, `resize: none`
  8. === Webp support
  9. To convert images to WebP:
  10. [source,console]
  11. ----
  12. $ cwebp -m 6 -mt -o "$file.webp" -- "$file"
  13. ----
  14. To make nginx serve `.webp` files if the relevant accept header is sent:
  15. [source,nginx]
  16. ----
  17. http {
  18. map $http_accept $webp_suffix {
  19. "~*webp" ".webp";
  20. }
  21. server {
  22. location ~ \.(png|jpe?g)$ {
  23. try_files $uri$webp_suffix $uri =404;
  24. expires 1y;
  25. }
  26. }
  27. }
  28. ----
  29. === Useful links
  30. - https://simpleicons.org/ - SVG icons for brands, including social media sites and programming languages
  31. - https://css-tricks.com/snippets/css/a-guide-to-flexbox/ - Great flexbox reference
  32. - https://easings.net/en - Easing functions cheat sheet