Tuns out this Branch was a development Branch :) #1
36
content/posts/ArticleEncryptionTest/index.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
title: "Article Encryption Test"
|
||||
date: 2022-04-09T02:49:13+02:00
|
||||
slug: hugo-encrypt
|
||||
summary: "This is a test article for encryption"
|
||||
tags:
|
||||
- "Hugo"
|
||||
---
|
||||
|
||||
## Hugo Encrypt
|
||||
|
||||
> password: **2022**
|
||||
|
||||
````markdown
|
||||
{{%/* hugo-encrypt 2022 */%}}
|
||||

|
||||
{{%/* /hugo-encrypt */%}}
|
||||
````
|
||||
|
||||
{{% hugo-encrypt 2022 %}}
|
||||

|
||||
{{% /hugo-encrypt %}}
|
||||
|
||||
***
|
||||
|
||||
## Multi-block encryption
|
||||
|
||||
> Default password: **123456**
|
||||
|
||||
```markdown
|
||||
{{%/* hugo-encrypt */%}}`Here is the test content `{{%/* /hugo-encrypt */%}}
|
||||
```
|
||||
|
||||
{{% hugo-encrypt %}}`Here is the test content `{{%/ hugo-encrypt %}}
|
||||
|
||||
End...
|
BIN
content/posts/FlowersGallery/1.jpg
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
content/posts/FlowersGallery/2.jpg
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
content/posts/FlowersGallery/3.jpg
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
content/posts/FlowersGallery/4.jpg
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
content/posts/FlowersGallery/5.jpg
Normal file
After Width: | Height: | Size: 126 KiB |
BIN
content/posts/FlowersGallery/6.jpg
Normal file
After Width: | Height: | Size: 92 KiB |
BIN
content/posts/FlowersGallery/7.jpg
Normal file
After Width: | Height: | Size: 113 KiB |
BIN
content/posts/FlowersGallery/cover.jpg
Normal file
After Width: | Height: | Size: 91 KiB |
35
content/posts/FlowersGallery/index.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
title: Flower Gallery
|
||||
date: 2022-04-15T02:49:13+02:00
|
||||
slug: flower-gallery
|
||||
featured_image: cover.jpg
|
||||
summary: Some photos of flowers
|
||||
layout: gallery
|
||||
tags:
|
||||
- Flower
|
||||
categories:
|
||||
- Gallery
|
||||
---
|
||||
|
||||
{{< gallery >}}
|
||||

|
||||

|
||||

|
||||
|
||||

|
||||

|
||||

|
||||
{{< /gallery >}}
|
||||
|
||||
## Grid Gallery
|
||||
|
||||
> Spring, the sweet spring, is the year's pleasant king.
|
||||
|
||||
{{< gallery-grid >}}
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
{{< /gallery-grid >}}
|
BIN
content/posts/Shortcodes/1.jpg
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
content/posts/Shortcodes/2.jpg
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
content/posts/Shortcodes/3.jpg
Normal file
After Width: | Height: | Size: 113 KiB |
378
content/posts/Shortcodes/index.md
Normal file
|
@ -0,0 +1,378 @@
|
|||
---
|
||||
title: "Shortcodes"
|
||||
date: 2022-05-02T13:12:47+02:00
|
||||
slug: shortcodes
|
||||
draft: false
|
||||
toc: true
|
||||
summary: Some shortcode examples
|
||||
tags:
|
||||
- Shortcodes
|
||||
- Hugo
|
||||
categories:
|
||||
- Luna
|
||||
---
|
||||
|
||||
## Abbr
|
||||
|
||||
```markdown
|
||||
{{</* abbr "MIT" "Massachusetts Institute of Technology" */>}}
|
||||
```
|
||||
|
||||
{{< abbr "MIT" "Massachusetts Institute of Technology" >}}
|
||||
|
||||
## Color text
|
||||
|
||||
```markdown
|
||||
{{</* color "red" "red text" */>}}
|
||||
{{</* color "green" "green text" */>}}
|
||||
{{</* color "blue" "blue text" */>}}
|
||||
{{</* color "orange" "orange text" */>}}
|
||||
{{</* color "theme" "theme text" */>}}
|
||||
{{</* color "#a811ff" "custom color text" */>}}
|
||||
```
|
||||
|
||||
{{< color "red" "red text" >}}
|
||||
{{< color "green" "green text" >}}
|
||||
{{< color "blue" "blue text" >}}
|
||||
{{< color "orange" "orange text" >}}
|
||||
{{< color "theme" "theme text" >}}
|
||||
{{< color "#a811ff" "custom color text" >}}
|
||||
|
||||
## Button
|
||||
|
||||
```markdown
|
||||
{{</* button content="Small" size="small" */>}}
|
||||
{{</* button content="Normal" size="normal" */>}}
|
||||
{{</* button content="Large" size="large" */>}}
|
||||
|
||||
{{</* button color="theme" icon="eva eva-heart" content="Theme Button" link="https://google.com" */>}}
|
||||
{{</* button color="red" icon="eva eva-home" content="Red Button" link="https://google.com" */>}}
|
||||
{{</* button color="green" icon="eva eva-twitter" content="Green Button" link="https://google.com" */>}}
|
||||
{{</* button color="blue" icon="eva eva-github" content="Blue Button" link="https://google.com" */>}}
|
||||
{{</* button color="orange" icon="eva eva-search" content="Orange Button" link="https://google.com" */>}}
|
||||
|
||||
{{</* button-outline color="theme" icon="eva eva-heart" content="Theme button" link="https://google.com" */>}}
|
||||
{{</* button-outline color="red" icon="eva eva-home" content="Red Button" link="https://google.com" */>}}
|
||||
{{</* button-outline color="green" icon="eva eva-twitter" content="Green Button" link="https://google.com" */>}}
|
||||
{{</* button-outline color="blue" icon="eva eva-github" content="Blue Button" link="https://google.com" */>}}
|
||||
{{</* button-outline color="orange" icon="eva eva-search" content="Orange Button" link="https://google.com" */>}}
|
||||
```
|
||||
|
||||
<div style="font-size: 0;">
|
||||
{{< button content="Small" size="small" >}}
|
||||
{{< button content="Normal" size="normal" >}}
|
||||
{{< button content="Large" size="large" >}}
|
||||
|
||||
{{< button color="theme" icon="eva eva-heart" content="Theme Button" link="https://google.com" >}}
|
||||
{{< button color="red" icon="eva eva-home" content="Red Button" link="https://google.com" >}}
|
||||
{{< button color="green" icon="eva eva-twitter" content="Green Button" link="https://google.com" >}}
|
||||
{{< button color="blue" icon="eva eva-github" content="Blue Button" link="https://google.com" >}}
|
||||
{{< button color="orange" icon="eva eva-search" content="Orange Button" link="https://google.com" >}}
|
||||
|
||||
{{< button-outline color="theme" icon="eva eva-heart" content="Theme Button" link="https://google.com" >}}
|
||||
{{< button-outline color="red" icon="eva eva-home" content="Red Button" link="https://google.com" >}}
|
||||
{{< button-outline color="green" icon="eva eva-twitter" content="Green Button" link="https://google.com" >}}
|
||||
{{< button-outline color="blue" icon="eva eva-github" content="Blue Button" link="https://google.com" >}}
|
||||
{{< button-outline color="orange" icon="eva eva-search" content="Orange Button" link="https://google.com" >}}
|
||||
</div>
|
||||
|
||||
## Text layout
|
||||
|
||||
```markdown
|
||||
{{</* align left "Text left" */>}}
|
||||
|
||||
{{</* align center "Text center" */>}}
|
||||
|
||||
{{</* align right "Text right" */>}}
|
||||
```
|
||||
|
||||
{{< align left "Text left" >}}
|
||||
|
||||
{{< align center "Text center" >}}
|
||||
|
||||
{{< align right "Text right" >}}
|
||||
|
||||
## GitHub
|
||||
|
||||
```markdown
|
||||
{{</* github name="gohugoio/hugo" link="https://github.com/gohugoio/hugo" description="The world’s fastest framework for building websites." color="#00ADD8" language="Go" */>}}
|
||||
```
|
||||
|
||||
{{< github name="gohugoio/hugo" link="https://github.com/gohugoio/hugo" description="The world’s fastest framework for building websites." color="#00ADD8" language="Go" >}}
|
||||
|
||||
## GitHub Auto
|
||||
|
||||
```markdown
|
||||
{{</* github-auto name="Ice-Hazymoon/hugo-theme-luna" */>}}
|
||||
```
|
||||
|
||||
{{< github-auto name="Ice-Hazymoon/hugo-theme-luna" >}}
|
||||
|
||||
## Notice
|
||||
|
||||
```markdown
|
||||
{{</* notice warn */>}}
|
||||
Let life be beautiful like summer flowers and death like autumn leaves.
|
||||
{{</* /notice */>}}
|
||||
|
||||
{{</* notice error */>}}
|
||||
Let life be beautiful like summer flowers and death like autumn leaves.
|
||||
{{</* /notice */>}}
|
||||
|
||||
{{</* notice info */>}}
|
||||
Let life be beautiful like summer flowers and death like autumn leaves.
|
||||
{{</* /notice */>}}
|
||||
|
||||
{{</* notice success */>}}
|
||||
Let life be beautiful like summer flowers and death like autumn leaves.
|
||||
{{</* /notice */>}}
|
||||
```
|
||||
|
||||
{{< notice warn >}}
|
||||
Let life be beautiful like summer flowers and death like autumn leaves.
|
||||
{{< /notice >}}
|
||||
|
||||
{{< notice error >}}
|
||||
Let life be beautiful like summer flowers and death like autumn leaves.
|
||||
{{< /notice >}}
|
||||
|
||||
{{< notice info >}}
|
||||
Let life be beautiful like summer flowers and death like autumn leaves.
|
||||
{{< /notice >}}
|
||||
|
||||
{{< notice success >}}
|
||||
Let life be beautiful like summer flowers and death like autumn leaves.
|
||||
{{< /notice >}}
|
||||
|
||||
## Quote
|
||||
|
||||
```markdown
|
||||
{{</* quote */>}}
|
||||
Let life be beautiful like summer flowers and death like autumn leaves.
|
||||
{{</* /quote */>}}
|
||||
```
|
||||
|
||||
{{< quote >}}
|
||||
Let life be beautiful like summer flowers and death like autumn leaves.
|
||||
{{< /quote >}}
|
||||
|
||||
## Quote Center
|
||||
|
||||
```markdown
|
||||
{{</* quote-center */>}}
|
||||
The curfew tolls the knell of parting day,
|
||||
The lowing herd wind slowly o'er the lea
|
||||
The ploughman homeward plods his weary way,
|
||||
And leaves the world to darkness and to me.
|
||||
{{</* /quote-center */>}}
|
||||
```
|
||||
|
||||
{{< quote-center >}}
|
||||
The curfew tolls the knell of parting day,
|
||||
The lowing herd wind slowly o'er the lea
|
||||
The ploughman homeward plods his weary way,
|
||||
And leaves the world to darkness and to me.
|
||||
{{< /quote-center >}}
|
||||
|
||||
## Tags
|
||||
|
||||
```markdown
|
||||
This is a {{</* tag theme "theme tag" */>}}
|
||||
This is a {{</* tag red "red tag" */>}}
|
||||
This is a {{</* tag green "green tag" */>}}
|
||||
This is a {{</* tag blue "blue tag" */>}}
|
||||
This is a {{</* tag orange "orange tag" */>}}
|
||||
|
||||
This is a {{</* tag-outlined theme "theme tag" */>}}
|
||||
This is a {{</* tag-outlined red "red tag" */>}}
|
||||
This is a {{</* tag-outlined green "green tag" */>}}
|
||||
This is a {{</* tag-outlined blue "blue tag" */>}}
|
||||
This is a {{</* tag-outlined orange "orange tag" */>}}
|
||||
```
|
||||
|
||||
This is a {{< tag theme "theme tag" >}}
|
||||
This is a {{< tag red "red tag" >}}
|
||||
This is a {{< tag green "green tag" >}}
|
||||
This is a {{< tag blue "blue tag" >}}
|
||||
This is a {{< tag orange "orange tag" >}}
|
||||
|
||||
This is a {{< tag-outlined theme "theme tag" >}}
|
||||
This is a {{< tag-outlined red "red tag" >}}
|
||||
This is a {{< tag-outlined green "green tag" >}}
|
||||
This is a {{< tag-outlined blue "blue tag" >}}
|
||||
This is a {{< tag-outlined orange "orange tag" >}}
|
||||
|
||||
## Progress bar
|
||||
|
||||
```markdown
|
||||
{{</* progress 999.99 theme "Name of progress bar" */>}}
|
||||
{{</* progress 80 green "Name of progress bar" */>}}
|
||||
{{</* progress 77.54 red "Name of progress bar" */>}}
|
||||
{{</* progress 123.45 blue "Name of progress bar" */>}}
|
||||
{{</* progress 11.11 orange "Name of progress bar" */>}}
|
||||
```
|
||||
|
||||
{{< progress 999.99 theme "Name of progress bar" >}}
|
||||
{{< progress 80 green "Name of progress bar" >}}
|
||||
{{< progress 77.54 red "Name of progress bar" >}}
|
||||
{{< progress 123.45 blue "Name of progress bar" >}}
|
||||
{{< progress 11.11 orange "Name of progress bar" >}}
|
||||
|
||||
## Accordion
|
||||
|
||||
```markdown
|
||||
{{</* accordion "Foods" open */>}}
|
||||
* Vegetables
|
||||
* Fruits
|
||||
* Fish
|
||||
{{</* /accordion */>}}
|
||||
```
|
||||
|
||||
{{< accordion "Foods" open >}}
|
||||
* Vegetables
|
||||
* Fruits
|
||||
* Fish
|
||||
{{< /accordion >}}
|
||||
|
||||
## Divided Line
|
||||
|
||||
```markdown
|
||||
{{</* hr "some text" */>}}
|
||||
```
|
||||
|
||||
{{< hr "some text" >}}
|
||||
|
||||
## Hidden Text
|
||||
|
||||
```markdown
|
||||
This is a {{</* hidden-text "Hide text" blur */>}}
|
||||
|
||||
This is a {{</* hidden-text "Hide text" */>}}
|
||||
```
|
||||
|
||||
This is a {{< hidden-text "Hide text" blur >}}
|
||||
|
||||
This is a {{< hidden-text "Hide text" >}}
|
||||
|
||||
|
||||
```markdown
|
||||
{{</* hidden blur */>}}
|
||||
> This is a hidden block
|
||||
{{</* /hidden */>}}
|
||||
|
||||
{{</* hidden */>}}
|
||||
* Vegetables
|
||||
* Fruits
|
||||
* Fish
|
||||
{{</* /hidden */>}}
|
||||
```
|
||||
|
||||
{{< hidden blur >}}
|
||||
> This is a hidden block
|
||||
{{< /hidden >}}
|
||||
|
||||
{{< hidden >}}
|
||||
* Vegetables
|
||||
* Fruits
|
||||
* Fish
|
||||
{{< /hidden >}}
|
||||
|
||||
## Rating
|
||||
|
||||
```markdown
|
||||
The paella dish I rate {{</* rating 10 6*/>}}
|
||||
```
|
||||
|
||||
The paella dish I rate {{< rating 10 6 >}}
|
||||
|
||||
## Links Card
|
||||
|
||||
```markdown
|
||||
{{</* link-card name="hugo-theme-luna" desc="A simple, performance-first, SEO-friendly Hugo theme" link="https://github.com/Ice-Hazymoon/hugo-theme-luna" img="https://repository-images.githubusercontent.com/486781027/dc31a9ab-66d1-49b8-a225-4f85f2329f2e" */>}}
|
||||
|
||||
{{</* link-card name="hugo-theme-luna" desc="A simple, performance-first, SEO-friendly Hugo theme" link="https://github.com/Ice-Hazymoon/hugo-theme-luna" */>}}
|
||||
```
|
||||
|
||||
{{< link-card name="hugo-theme-luna" desc="A simple, performance-first, SEO-friendly Hugo theme" link="https://github.com/Ice-Hazymoon/hugo-theme-luna" img="https://repository-images.githubusercontent.com/486781027/dc31a9ab-66d1-49b8-a225-4f85f2329f2e" >}}
|
||||
|
||||
{{< link-card name="hugo-theme-luna" desc="A simple, performance-first, SEO-friendly Hugo theme" link="https://github.com/Ice-Hazymoon/hugo-theme-luna" >}}
|
||||
|
||||
## Carousel
|
||||
|
||||
```markdown
|
||||
{{</* carousel "https://unsplash.it/1920/1080/?random=1" "https://unsplash.it/1920/1080/?random=2" "https://unsplash.it/1920/1080/?random=3" "https://unsplash.it/1920/1080/?random=4" */>}}
|
||||
|
||||
{{</* carousel "4.jpg" "7.jpg" "9.jpg" */>}}
|
||||
```
|
||||
|
||||
{{< carousel "https://unsplash.it/1920/1080/?random=1" "https://unsplash.it/1920/1080/?random=2" "https://unsplash.it/1920/1080/?random=3" "https://unsplash.it/1920/1080/?random=4" >}}
|
||||
|
||||
{{< carousel "1.jpg" "2.jpg" "3.jpg" >}}
|
||||
|
||||
## Timeline
|
||||
|
||||
```markdown
|
||||
{{</* timeline "2018-01-01 Eat salada today" "2018-01-02 Eat paella today" "2018-01-03 Eat pizza today" */>}}
|
||||
```
|
||||
|
||||
{{< timeline "2018-01-01 Eat salada today" "2018-01-02 Eat paella today" "2018-01-03 Eat pizza today" >}}
|
||||
|
||||
## Gallery
|
||||
|
||||
```markdown
|
||||
{{</* gallery */>}}
|
||||

|
||||

|
||||

|
||||
|
||||

|
||||

|
||||

|
||||
{{</* /gallery */>}}
|
||||
```
|
||||
|
||||
{{< gallery >}}
|
||||

|
||||

|
||||

|
||||
|
||||

|
||||

|
||||

|
||||
{{< /gallery >}}
|
||||
|
||||
## Tabs
|
||||
|
||||
```markdown
|
||||
{{</* tab-view */>}}
|
||||
|
||||
{{</* tab-panel name="中文" checked=true */>}}
|
||||
百合花(学名:Lilium)通称百合花,是百合目百合科的一属,为多年生草本球根植物,属内物种繁多,经常作为观赏植物。主要分布在亚洲东部、欧洲、北美洲等北半球温带地区,全球已发现有至少96个品种,其中5种产于台湾。近年更有不少经过人工杂交而产生的新品种,如OT百合、东方型百合、玫瑰百合等。百合属对猫来说有剧毒。
|
||||
{{</* /tab-panel */>}}
|
||||
|
||||
{{</* tab-panel name="English" */>}}
|
||||
Lilium is a genus of herbaceous flowering plants growing from bulbs, all with large prominent flowers. They are the true lilies. Lilies are a group of flowering plants which are important in culture and literature in much of the world. Most species are native to the northern hemisphere and their range is temperate climates and extends into the subtropics. Many other plants have "lily" in their common names, but do not belong to the same genus and are therefore not true lilies.
|
||||
{{</* /tab-panel */>}}
|
||||
|
||||
{{</* tab-panel name="Español" */>}}
|
||||
Las especies de Lilium, comúnmente llamadas azucenas o lirios, constituyen un género con alrededor de 110 integrantes que se incluye dentro de la familia de las liliáceas. Los lirios son herbáceas perennes de tallos erectos con numerosas hojas alternas, lineares a lance balas. Crecen a partir de bulbos formados por capas de escamas carnosas sin túnica.
|
||||
{{</* /tab-panel */>}}
|
||||
|
||||
{{</* /tab-view */>}}
|
||||
```
|
||||
|
||||
{{< tab-view >}}
|
||||
|
||||
{{< tab-panel name="中文" checked=true >}}
|
||||
百合花(学名:Lilium)通称百合花,是百合目百合科的一属,为多年生草本球根植物,属内物种繁多,经常作为观赏植物。主要分布在亚洲东部、欧洲、北美洲等北半球温带地区,全球已发现有至少96个品种,其中5种产于台湾。近年更有不少经过人工杂交而产生的新品种,如OT百合、东方型百合、玫瑰百合等。百合属对猫来说有剧毒。
|
||||
{{< /tab-panel >}}
|
||||
|
||||
{{< tab-panel name="English" >}}
|
||||
Lilium is a genus of herbaceous flowering plants growing from bulbs, all with large prominent flowers. They are the true lilies. Lilies are a group of flowering plants which are important in culture and literature in much of the world. Most species are native to the northern hemisphere and their range is temperate climates and extends into the subtropics. Many other plants have "lily" in their common names, but do not belong to the same genus and are therefore not true lilies.
|
||||
{{< /tab-panel >}}
|
||||
|
||||
{{< tab-panel name="Español" >}}
|
||||
Las especies de Lilium, comúnmente llamadas azucenas o lirios, constituyen un género con alrededor de 110 integrantes que se incluye dentro de la familia de las liliáceas. Los lirios son herbáceas perennes de tallos erectos con numerosas hojas alternas, lineares a lance balas. Crecen a partir de bulbos formados por capas de escamas carnosas sin túnica.
|
||||
{{< /tab-panel >}}
|
||||
|
||||
{{< /tab-view >}}
|
BIN
content/posts/Typography/cover.jpg
Normal file
After Width: | Height: | Size: 12 KiB |
229
content/posts/Typography/index.md
Normal file
|
@ -0,0 +1,229 @@
|
|||
---
|
||||
title: "Typography"
|
||||
date: 2022-04-15T02:49:13+02:00
|
||||
slug: typography
|
||||
featured_image: cover.jpg
|
||||
tags:
|
||||
- English
|
||||
refs:
|
||||
- link: https://play.tailwindcss.com/uj1vGACRJA?layout=preview
|
||||
---
|
||||
|
||||
Until now, trying to style an article, document, or blog post with Tailwind has been a tedious task that required a keen eye for typography and a lot of complex custom CSS.
|
||||
|
||||
<!--more-->
|
||||
|
||||
By default, Tailwind removes all of the default browser styling from paragraphs, headings, lists and more. This ends up being really useful for building application UIs because you spend less time undoing user-agent styles, but when you _really are_ just trying to style some content that came from a rich-text editor in a CMS or a markdown file, it can be surprising and unintuitive.
|
||||
|
||||
We get lots of complaints about it actually, with people regularly asking us things like:
|
||||
|
||||
> Why is Tailwind removing the default styles on my `h1` elements? How do I disable this? What do you mean I lose all the other base styles too?
|
||||
|
||||
We hear you, but we're not convinced that simply disabling our base styles is what you really want. You don't want to have to remove annoying margins every time you use a `p` element in a piece of your dashboard UI. And I doubt you really want your blog posts to use the user-agent styles either — you want them to look _awesome_, not awful.
|
||||
|
||||
The `@tailwindcss/typography` plugin is our attempt to give you what you _actually_ want, without any of the downsides of doing something stupid like disabling our base styles.
|
||||
|
||||
It adds a new `prose` class that you can slap on any block of vanilla HTML content and turn it into a beautiful, well-formatted document:
|
||||
|
||||
```html {linenos=table,hl_lines=[8,"4-6"],linenostart=199,title="index.html"}
|
||||
<article class="prose">
|
||||
<h1>Garlic bread with cheese: What the science tells us</h1>
|
||||
<p>
|
||||
For years parents have espoused the health benefits of eating garlic bread with cheese to their
|
||||
children, with the food earning such an iconic status in our culture that kids will often dress
|
||||
up as warm, cheesy loaf for Halloween.
|
||||
</p>
|
||||
<p>
|
||||
But a recent study shows that the celebrated appetizer may be linked to a series of rabies cases
|
||||
springing up around the country.
|
||||
</p>
|
||||
<!-- ... -->
|
||||
</article>
|
||||
```
|
||||
|
||||
For more information about how to use the plugin and the features it includes, [read the documentation](https://github.com/tailwindcss/typography/blob/master/README.md).
|
||||
|
||||
---
|
||||
|
||||
## What to expect from here on out
|
||||
|
||||
What follows from here is just a bunch of absolute nonsense I've written to dogfood the plugin itself. It includes every sensible typographic element I could think of, like **bold text**, unordered lists, ordered lists, code blocks, block quotes, _and even italics_.
|
||||
|
||||
It's important to cover all of these use cases for a few reasons:
|
||||
|
||||
1. We want everything to look good out of the box.
|
||||
2. Really just the first reason, that's the whole point of the plugin.
|
||||
3. Here's a third pretend reason though a list with three items looks more realistic than a list with two items.
|
||||
|
||||
Now we're going to try out another header style.
|
||||
|
||||
### Typography should be easy
|
||||
|
||||
So that's a header for you — with any luck if we've done our job correctly that will look pretty reasonable.
|
||||
|
||||
Something a wise person once told me about typography is:
|
||||
|
||||
> Typography is pretty important if you don't want your stuff to look like trash. Make it good then it won't be bad.
|
||||
|
||||
It's probably important that images look okay here by default as well:
|
||||
|
||||

|
||||
|
||||
Now I'm going to show you an example of an unordered list to make sure that looks good, too:
|
||||
|
||||
- So here is the first item in this list.
|
||||
- In this example we're keeping the items short.
|
||||
- Later, we'll use longer, more complex list items.
|
||||
|
||||
And that's the end of this section.
|
||||
|
||||
## What if we stack headings?
|
||||
|
||||
### We should make sure that looks good, too.
|
||||
|
||||
Sometimes you have headings directly underneath each other. In those cases you often have to undo the top margin on the second heading because it usually looks better for the headings to be closer together than a paragraph followed by a heading should be.
|
||||
|
||||
### When a heading comes after a paragraph …
|
||||
|
||||
When a heading comes after a paragraph, we need a bit more space, like I already mentioned above. Now let's see what a more complex list would look like.
|
||||
|
||||
- **I often do this thing where list items have headings.**
|
||||
|
||||
For some reason I think this looks cool which is unfortunate because it's pretty annoying to get the styles right.
|
||||
|
||||
I often have two or three paragraphs in these list items, too, so the hard part is getting the spacing between the paragraphs, list item heading, and separate list items to all make sense. Pretty tough honestly, you could make a strong argument that you just shouldn't write this way.
|
||||
|
||||
- **Since this is a list, I need at least two items.**
|
||||
|
||||
I explained what I'm doing already in the previous list item, but a list wouldn't be a list if it only had one item, and we really want this to look realistic. That's why I've added this second list item so I actually have something to look at when writing the styles.
|
||||
|
||||
- **It's not a bad idea to add a third item either.**
|
||||
|
||||
I think it probably would've been fine to just use two items but three is definitely not worse, and since I seem to be having no trouble making up arbitrary things to type, I might as well include it.
|
||||
|
||||
After this sort of list I usually have a closing statement or paragraph, because it kinda looks weird jumping right to a heading.
|
||||
|
||||
## Code should look okay by default.
|
||||
|
||||
I think most people are going to use [highlight.js](https://highlightjs.org/) or [Prism](https://prismjs.com/) or something if they want to style their code blocks but it wouldn't hurt to make them look _okay_ out of the box, even with no syntax highlighting.
|
||||
|
||||
Here's what a default `tailwind.config.js` file looks like at the time of writing:
|
||||
|
||||
```js {title="tailwind.config.js"}
|
||||
module.exports = {
|
||||
purge: [],
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
variants: {},
|
||||
plugins: [],
|
||||
}
|
||||
```
|
||||
|
||||
Hopefully that looks good enough to you.
|
||||
|
||||
### What about nested lists?
|
||||
|
||||
Nested lists basically always look bad which is why editors like Medium don't even let you do it, but I guess since some of you goofballs are going to do it we have to carry the burden of at least making it work.
|
||||
|
||||
1. **Nested lists are rarely a good idea.**
|
||||
- You might feel like you are being really "organized" or something but you are just creating a gross shape on the screen that is hard to read.
|
||||
- Nested navigation in UIs is a bad idea too, keep things as flat as possible.
|
||||
- Nesting tons of folders in your source code is also not helpful.
|
||||
2. **Since we need to have more items, here's another one.**
|
||||
- I'm not sure if we'll bother styling more than two levels deep.
|
||||
- Two is already too much, three is guaranteed to be a bad idea.
|
||||
- If you nest four levels deep you belong in prison.
|
||||
3. **Two items isn't really a list, three is good though.**
|
||||
- Again please don't nest lists if you want people to actually read your content.
|
||||
- Nobody wants to look at this.
|
||||
- I'm upset that we even have to bother styling this.
|
||||
|
||||
The most annoying thing about lists in Markdown is that `<li>` elements aren't given a child `<p>` tag unless there are multiple paragraphs in the list item. That means I have to worry about styling that annoying situation too.
|
||||
|
||||
- **For example, here's another nested list.**
|
||||
|
||||
But this time with a second paragraph.
|
||||
|
||||
- These list items won't have `<p>` tags
|
||||
- Because they are only one line each
|
||||
|
||||
- **But in this second top-level list item, they will.**
|
||||
|
||||
This is especially annoying because of the spacing on this paragraph.
|
||||
|
||||
- As you can see here, because I've added a second line, this list item now has a `<p>` tag.
|
||||
|
||||
This is the second line I'm talking about by the way.
|
||||
|
||||
- Finally here's another list item so it's more like a list.
|
||||
|
||||
- A closing list item, but with no nested list, because why not?
|
||||
|
||||
And finally a sentence to close off this section.
|
||||
|
||||
## There are other elements we need to style
|
||||
|
||||
I almost forgot to mention links, like [this link to the Tailwind CSS website](https://tailwindcss.com). We almost made them blue but that's so yesterday, so we went with dark gray, feels edgier.
|
||||
|
||||
We even included table styles, check it out:
|
||||
|
||||
| Wrestler | Origin | Finisher |
|
||||
| ----------------------- | ------------ | ------------------ |
|
||||
| Bret "The Hitman" Hart | Calgary, AB | Sharpshooter |
|
||||
| Stone Cold Steve Austin | Austin, TX | Stone Cold Stunner |
|
||||
| Randy Savage | Sarasota, FL | Elbow Drop |
|
||||
| Vader | Boulder, CO | Vader Bomb |
|
||||
| Razor Ramon | Chuluota, FL | Razor's Edge |
|
||||
|
||||
We also need to make sure inline code looks good, like if I wanted to talk about `<span>` elements or tell you the good news about `@tailwindcss/typography`.
|
||||
|
||||
### Sometimes I even use `code` in headings
|
||||
|
||||
Even though it's probably a bad idea, and historically I've had a hard time making it look good. This _"wrap the code blocks in backticks"_ trick works pretty well though really.
|
||||
|
||||
Another thing I've done in the past is put a `code` tag inside of a link, like if I wanted to tell you about the [`tailwindcss/docs`](https://github.com/tailwindcss/docs) repository. I don't love that there is an underline below the backticks but it is absolutely not worth the madness it would require to avoid it.
|
||||
|
||||
#### We haven't used an `h4` yet
|
||||
|
||||
But now we have. Please don't use `h5` or `h6` in your content, Medium only supports two heading levels for a reason, you animals. I honestly considered using a `before` pseudo-element to scream at you if you use an `h5` or `h6`.
|
||||
|
||||
We don't style them at all out of the box because `h4` elements are already so small that they are the same size as the body copy. What are we supposed to do with an `h5`, make it _smaller_ than the body copy? No thanks.
|
||||
|
||||
### We still need to think about stacked headings though.
|
||||
|
||||
#### Let's make sure we don't screw that up with `h4` elements, either.
|
||||
|
||||
Phew, with any luck we have styled the headings above this text and they look pretty good.
|
||||
|
||||
Let's add a closing paragraph here so things end with a decently sized block of text. I can't explain why I want things to end that way but I have to assume it's because I think things will look weird or unbalanced if there is a heading too close to the end of the document.
|
||||
|
||||
What I've written here is probably long enough, but adding this final sentence can't hurt.
|
||||
|
||||
## LaTeX
|
||||
|
||||
```TeX
|
||||
this is a inline katex: $ E={\sqrt {p^{2}c^{2}+m^{2}c^{4}}}=\gamma mc^{2} $
|
||||
|
||||
$ E={\sqrt {p^{2}c^{2}+m^{2}c^{4}}}=\gamma mc^{2} $
|
||||
|
||||
$$ E_{0}=mc^{2} $$
|
||||
|
||||
\\[3 < 4\\]
|
||||
|
||||
\begin{align}
|
||||
p(v_i=1|\mathbf{h}) & = \sigma\left(\sum_j w_{ij}h_j + b_i\right) \\
|
||||
p(h_j=1|\mathbf{v}) & = \sigma\left(\sum_i w_{ij}v_i + c_j\right)
|
||||
\end{align}
|
||||
```
|
||||
|
||||
this is a inline katex: $ E={\sqrt {p^{2}c^{2}+m^{2}c^{4}}}=\gamma mc^{2} $
|
||||
|
||||
$$ E_{0}=mc^{2} $$
|
||||
|
||||
\\[3 < 4\\]
|
||||
|
||||
\begin{align}
|
||||
\nonumber p(v_i=1|\mathbf{h}) & = \sigma\left(\sum_j w_{ij}h_j + b_i\right) \\
|
||||
p(h_j=1|\mathbf{v}) & = \sigma\left(\sum_i w_{ij}v_i + c_j\right)
|
||||
\end{align}
|