Markdownã§ã¹ã©ã¤ããä½ããã¼ã«ã®Fusumaã®v2ããªãªã¼ã¹ããã¾ãã
ä»åã®å¤æ´ã§ã¯ãé¢åäºãæ¸ããã¹ã©ã¤ãä½æã«éä¸ã§ããããã«ãããã¨ãç®æ¨ã«ãã¦ãã¾ããã
Fusumaã¨ã¯ï¼
#0CJS
- MDX(Markdown + JSX(optional)) ã使ãã¹ã©ã¤ããä½ãã
- ãã¬ã¼ã³ã¿ã¼ã¢ã¼ãã®æä¾(ãªããTwitteræµããããè½æ¸ããã§ãã)
- é³å£°é²é³ã¨ã¹ã©ã¤ãã®æä½è¨é²ãä¿åã§ãã
- github pagesã¸ã®ãããã¤ãã¡ã¤ã³ã§ãpdfã§ãåºåå¯è½
大ããªå¤æ´
og:imageãèªåçæ/è¨å®ããããã«ãã¾ãã
ogpç¨ã«ç»åãè¨å®ããã®ãããã©ãããã¨ããæè¦ããããèªåçã«çæããããã«è¿½å ãã¾ãããç¾å¨ã¯ã¹ã©ã¤ãã®1ãã¼ã¸ç®ãç»ååãã¦ãã¾ãã
ã¦ã¼ã¶ã¼å´ã¸CSS Variablesãæä¾ãã¾ãã
v1ã§ã¯ãpublicã§å¤ã«åºããã«èªç±ã«cssãæ¸ãã¦ãããããã«ãã¦ãã¾ãããã0ããæ¸ãã®ã¯ããã©ãããé¨åãããã®ã§ãããç¨åº¦ã®è¨å®ã¯å¤æ°ã«æ¸ãããå¤ãå¤æ´ããã°ããããã«ãã¾ãããããã§ããå¤æ´ãå¿ è¦ãªå ´åã¯cssã§ç´åç §ãããã¨ãå¯è½ã§ãã
ç¾å¨ã¯ã以ä¸ã®å¤ãå¤æ´ããã°ãããå¤ãã®å ´åãcssã0ããæ¸ãå¿ è¦ã¯ãªãã¨æã£ã¦ãã¾ãã
:root { --base-font-family: 'Roboto', 'San Francisco', helvetica, arial, sans-serif; --base-font-size: 2.4rem; --base-font-weight: 300; --base-align: center; --base-max-width: 1280px; --base-outer-margin: 24px; --base-image-height: auto; --base-image-width: 100%; --base-image-border: none; --base-image-border-radius: 0; --color-title: #464646; --color-base: #545454; --color-background: #f5f5f5; --color-link: #3498db; --h1-font-size: 5.6rem; --h1-font-weight: 300; --h2-font-size: 4rem; --h2-font-weight: 300; --h3-font-size: 3.6rem; --h3-font-weight: 300; --h4-font-size: 3rem; --h4-font-weight: 300; --h5-font-size: 2.4rem; --h5-font-weight: 600; --h6-font-size: 2rem; --h6-font-weight: 600; --code-font-size: 1.8rem; --qr-code-image-size: 320px; }
Webslidesã¨ããã¹ã©ã¤ãã©ã¤ãã©ãªãããã¾ãã
Webslidesã¯ç¾å¨ã¡ã³ããã³ã¹ããã¦ããªããããSwiperã«ç§»è¡ããå¿ è¦ãªcssã¯fusumaæ¬ä½ã§ç®¡çããããã«ãã¾ãããããã«ããç¡é§ãªcssãæ¸ãå ¨ä½çãªæé©åãè¡ãããããªãã¾ããã
ãã¼ãã®è¿½å ãã¾ãã
ããªã»ããã®ãã¼ããè¤æ°ç¨æãã¾ããã(ã¨ãã£ã¦ãã大åã¯èªåãæå±ããOSSã®è²ãåèã«ãã¾ããã)
ããã¯ãä¸è¨ã®css variablesçµç±ã§ã«ã¹ã¿ãã¤ãºå¯è½ã§ãã
ãã¡ãã®ã¹ã©ã¤ããåèã«ãã¦ãã ããã
ã¬ã³ããªã³ã°æ¹å¼ãå¤æ´ãã¾ãã
og:imageãä½æããã«ãããbrowserãå¿
è¦ã¨ãªã£ããããrenderToString
ã使ãã®ãããbrowserå´ã§HTMLãçæããããã«ãªãã¾ãããããã«ããHTMLã®åºåå¤ãå°ãå¤ããã¾ããã大ããªåé¡ã¯ããã¾ããã
a11y(Accessibility)ã®æ¤è¨¼ãèªåã§è¡ãããã«ãªãã¾ãã
browserãåãããã¨ã«ãªã£ãã®ã§ãã®ãããªãã¨ãç°¡åã«è¡ããããã«ãªãå°å ¥ãã¾ãããåé¡ã¯Markdownã¨HTMLã®éã®sourcemapã®ãããªãã®ããªãã¨htmlã®çµæãã¾ãã¾ã¨ã©ã¼ã¨ãã¦åºããã¨ã«ãªãããã¾ãè¯ããªããªã¨æã£ã¦ããã®ã§ã¨ããããå®é¨çãã§ã¼ãºã§ããå°å ¥ããã¾ããã
ã¹ã©ã¤ãã³ã¡ã³ããå¢ããã¾ãã
fusumaã§ã¯ãhtmlã®ã³ã¡ã³ãã·ã³ã¿ãã¯ã¹(<!-- -->
)ã使ããã¹ã©ã¤ãã®ã«ã¹ã¿ãã¤ãºãæ¯æ´ãã¾ãã
v2ã§ã¯ã以ä¸ã®ããããã£ã追å ããã¾ããã
background
- v1ã§æ¶ãããæ»ã£ã¦ãã¾ãã
block-start
,block-end
- divã¿ã°ããã®åºéã§çæãã¾ã
executable-code
- ã¹ã©ã¤ãä¸ã§jsã³ã¼ããå®è¡ã§ããããã«ãªãã¾ãã
ãã¡ãã®ã¹ã©ã¤ããåèã«ãã¦ãã ããã
éçºç°å¢ã®ã¨ãã«ãªãã¡ã¬ã³ã¹ãåºãããã«ãªãã¾ãã
èªåã§ããã·ã³ã¿ãã¯ã¹ã¨ãã¯ã©ã¹åãå¿ããã®ã§ãããã«è¦ã¤ãããããã«ãã
è²ã ã¨å¤ãã£ã¦æéãæ¸ããã«ã¹ã©ã¤ããä½ãããã«ãªã£ãã¯ããªã®ã§ããã²è©¦ãã¦ã¿ã¦ãã ãã :)
ãªãªã¼ã¹è©³ç´°: github.com