fix code snippet styling
This commit is contained in:
parent
5d46ef3a58
commit
6424c85b98
2 changed files with 20 additions and 3 deletions
|
@ -1,8 +1,10 @@
|
|||
<. let gist_id = data.get_gist_id(src); .>
|
||||
<. let (_, gist)= gists.as_ref().unwrap().iter().find(|(id, _)| id == gist_id).as_ref().unwrap(); .>
|
||||
<div class="gist_container">
|
||||
<. for file in &gist.files {.>
|
||||
<code> <.= file.get_html_content() .> </code>
|
||||
<code class="code-block"> <.= file.get_html_content() .> </code>
|
||||
<.}.>
|
||||
<a href="<.= &gist.html_url .>" target="_blank"
|
||||
<a class="gist_link" href="<.= &gist.html_url .>" target="_blank"
|
||||
>See gist on GitHub</a
|
||||
>
|
||||
</div>
|
||||
|
|
|
@ -63,9 +63,15 @@ code {
|
|||
font-family: monospace;
|
||||
font-size: 15px;
|
||||
white-space: pre-wrap;
|
||||
display: block;
|
||||
font-weight: 600;
|
||||
line-height: 1rem;
|
||||
padding: 5px;
|
||||
border-radius: 6px;
|
||||
background-color: rgba(175, 184, 193, 0.2);
|
||||
}
|
||||
|
||||
.code-block {
|
||||
display: block;
|
||||
}
|
||||
|
||||
iframe {
|
||||
|
@ -118,3 +124,12 @@ iframe {
|
|||
.meta {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.gist_contianer {
|
||||
border-radius: 6px;
|
||||
border: 1px solid rgb(211, 211, 211);
|
||||
}
|
||||
|
||||
.gist_link {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue