瀏覽代碼

Add `hl` shortcode for highlighting key phrases

To use: `{{< hl >}}highlighted quote{{< /hl >}}`
George Cushen 7 年之前
父節點
當前提交
e6b2f1d285
共有 2 個文件被更改,包括 10 次插入0 次删除
  1. 9 0
      layouts/partials/css/academic.css
  2. 1 0
      layouts/shortcodes/hl.html

+ 9 - 0
layouts/partials/css/academic.css

@@ -207,6 +207,11 @@ blockquote p:last-child {
   }
 }
 
+.markup-quote {
+  background-color: transparent;
+  background-image: linear-gradient(to bottom, rgba(233, 231, 245, 1), rgba(233, 231, 245, 1));
+}
+
 .space-below {
   margin-bottom: 50px;
 }
@@ -1464,6 +1469,10 @@ body.dark {
   border-color: rgb(68, 71, 90);
 }
 
+.dark .markup-quote {
+  background-image: linear-gradient(to bottom, rgba(233, 231, 245, 0.2), rgba(233, 231, 245, 0.2));
+}
+
 .dark #MathJax_Zoom {
   background-color: rgb(68, 71, 90) !important;
 }

+ 1 - 0
layouts/shortcodes/hl.html

@@ -0,0 +1 @@
+<span class="markup-quote">{{ .Inner }}</span>