egoist / hack

⛷ Dead simple CSS framework.
https://hackcss.egoist.dev
MIT License
2.6k stars 140 forks source link

Blockquotes #49

Closed Fastidious closed 7 years ago

Fastidious commented 7 years ago

I think the way <blockquotes> are currently handled isn’t pretty. Could they be made like so?

> This is the beginning of the blockquote.
> This is the next line, and,
> This is the last.
ghost commented 7 years ago

@Fastidious Looking at the hack.css docs that's exactly how they're handled. If there's a nested p tag they'll also receive an extra > at the top and bottom, like:

screen shot 2017-02-19 at 4 15 05 pm

Aside, if you're looking for more powerful way to display blockquotes in Hugo try this custom shortcode:

<blockquote {{ with .Get "class" }}class="{{ . }}"{{ end }} {{ with .Get "citelink" }}cite="{{ . }}"{{ end }}>
  {{ .Inner }}
  {{ with .Get "citelink" }}
    <cite><a href="{{ . }}">{{ $.Get "cite" }}</a></cite>
  {{ else }}
    <cite>{{ .Get "cite" }}</cite>
  {{ end }}
</blockquote>

And use it like this:

{{< blockquote cite="BeCandid.com/faq" citelink="https://becandid.com/faq" >}}
  <p>Candid’s AI is improving all the time, and your reports help keep the service safe.</p>
{{< /blockquote >}}

@egoist I believe this can be closed.

Fastidious commented 7 years ago

@jhabdas I ended up overwriting element to remove the greater than signs. It was a less convoluted approach.