commit 624756108e59a2b4c83708a2f84b675737a49a05 parent fc6cf2af67ec084be814d0f15d3762a18a038368 Author: Shimmy Xu <shimmy.xu@shimmy1996.com> Date: Sat, 15 Feb 2020 11:44:49 -0600 Unify figcaption formatting Diffstat:
6 files changed, 8 insertions(+), 18 deletions(-) diff --git a/content/posts/2014-07-16-google-noto-font.zh.md b/content/posts/2014-07-16-google-noto-font.zh.md @@ -18,10 +18,7 @@ tags: --- 之前看到了Adobe和Google合力推出<a title="来自Adobe Typekit Blog" href="http://blog.typekit.com/2014/07/15/introducing-source-han-sans/">Source Han Sans</a>的新闻,就去查了一下这个字体的来头。发现Google有个名为[Noto Fonts][1] 的项目,正在制作一种包括世界上的几乎所有语言所需字符的字体。也就是说,不论文本用哪一种语言写成,都可以使用Noto Sans来显示。而与Adobe合作的Source Han Sans,只是作为Noto Sans字体的CJK(Chinese,Japanese,Korean)部分存在。 -<figure> -{{< figure src="/wp-content/uploads/2014/07/multi-language-sample-v3.jpg" >}} -<figcaption>Sorce Han Sans 图例,图片来自Adobe Typekit Blog</figcaption> -</figure> +{{< figure src="/wp-content/uploads/2014/07/multi-language-sample-v3.jpg" caption="Sorce Han Sans 图例,图片来自Adobe Typekit Blog" >}} 比较赞的是,Noto Sans字体是完全免费且开源的XDD,下载可以在其项目主页找到。如果在这套字体开发完全后,Google将其运用到所有Android与Chrome OS,以及自家的网页上,那时Noto Sans这会成为世界上运用最多的字体吗?(目前运用最广泛的网页字体大概是Helvetica,由Eduard Hoffmann在1957年创作。) diff --git a/content/posts/2014-07-27-standard-keycap-families.zh.md b/content/posts/2014-07-27-standard-keycap-families.zh.md @@ -16,10 +16,7 @@ tags: - 键盘 --- -<figure> -{{< figure src="/wp-content/uploads/2014/07/P5220038.jpg" >}} -<figcaption>图片来自网络</figcaption> -</figure> +{{< figure src="/wp-content/uploads/2014/07/P5220038.jpg" caption="图片来自网络" >}} 键盘键帽虽然看起来大同小异,但其实有不少奇怪的键帽形状存在(笔记本电脑键盘不在讨论之列)。 diff --git a/content/posts/2014-09-30-dark-horse-the-star-wars.zh.md b/content/posts/2014-09-30-dark-horse-the-star-wars.zh.md @@ -57,10 +57,7 @@ Annikin的老爹,Kane Starkiller是个半机械人,这个设定估计后来 死星在这里感觉战斗力被大幅削弱…Luke用一只6架战机组成的编队就拖住了死星… -<figure> -{{< figure src="/wp-content/uploads/2014/09/solo3.png" >}} -<figcaption>Iä! Iä! Han Solo Fhtagn!</figcaption> -</figure> +{{< figure src="/wp-content/uploads/2014/09/solo3.png" caption="Iä! Iä! Han Solo Fhtagn!" >}} Han Solo在这个故事中是一个有名的星际走私犯,也是Luke好基友…比较惨的是,Han长得和克总差不多… diff --git a/content/posts/2015-03-04-keyboard-pixel-art.zh.md b/content/posts/2015-03-04-keyboard-pixel-art.zh.md @@ -53,10 +53,7 @@ RT,效仿GH众给自己目前几把键盘画的简易像素画~ 6. CTRL[ALT] 60 + GMK Hyper Fuse [筹备中] -<figure> -{{< figure src="/wp-content/uploads/2015/03/ctrlalt60L.png" >}} -<figcaption>Coming Not So Soon~</figcaption> -</figure> +{{< figure src="/wp-content/uploads/2015/03/ctrlalt60L.png" caption="Coming Not So Soon~" >}} 如果把键帽上的字画出来似乎会很丑… diff --git a/layouts/partials/css/custom.css b/layouts/partials/css/custom.css @@ -10,8 +10,10 @@ textarea { h1 { font-size: 180%; } -header nav, figcaption { +header nav { margin-top: -1.5em; +} +header nav, figcaption { font-size: 90%; } article article { diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html @@ -1,5 +1,5 @@ {{ if .Get "caption" }}<figure>{{ end }} <img alt="{{ (.Get "alt") }}" src="{{ .Get "src" }}"/> {{- with .Get "caption" -}} -<figcaption><p>{{ . | replaceRE "Figure [0-9]*: " "" | markdownify }}</p></figcaption></figure> +<figcaption>{{ . | replaceRE "Figure [0-9]*: " "" | markdownify }}</figcaption></figure> {{ end }}