Skip to content

Commit

Permalink
Merge pull request #458 from CodeYourFuture/feature/runkit
Browse files Browse the repository at this point in the history
Feature: Runkit -- I want executable runkits for Node
  • Loading branch information
SallyMcGrath authored Dec 21, 2023
2 parents 4c19f57 + 88150fe commit 878dc23
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions assets/styles/03-elements/table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ table {
border-image: var(--theme-border-image);
}

.highlight table {
width: 100%;
}

thead th {
font: var(--theme-font--system);
background-color: var(--theme-color--block);
Expand Down
7 changes: 7 additions & 0 deletions layouts/_default/_markup/render-codeblock-runkit.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{ $id := print "runkit-" (substr (md5 .Inner) 0 16) }}
<script src="https://embed.runkit.com" data-element-id="{{ $id }}"></script>
<div class="highlight">
<div style="background:var(--theme-color--paper);">
<div id="{{ $id }}" style="font-size:0;">{{ .Inner | safeHTML }}</div>
</div>
</div>

0 comments on commit 878dc23

Please sign in to comment.