Sha256: 4856087f886b6969dde614ae91587418068b2e9a422b20a106529bb06f601130
Contents?: true
Size: 1.39 KB
Versions: 18
Compression:
Stored size: 1.39 KB
Contents
<% example_html = ERB.new(example).result %> <%= pb_rails("card", props: { classname: "pb--doc", padding: "none", dark: dark }) do %> <div class="pb--kit-example"> <%= pb_rails("caption", props: { text: example_title, dark: dark }) %> <br /> <%= example %> <br> </div> <% if show_code %> <div class="markdown pb--kit-example-markdown <%= dark ? "dark" : "" %>"> <%= render_markdown(description) %> </div> <div id="code-wrapper"> <div class="pb--codeControls"> <ul> <% if type == "rails" %> <li> <a href="#" id="copy-<%= example_key %>-trigger" onclick="copyOnClick(`<%= example_html %>`, `copy-<%= example_key %>`)"> Copy HTML </a> </li> <% end %> <li> <a href="#" id="toggle-open" data-toggle="code_example">Code Example</a> </li> </ul> </div> <div class="pb--codeCopy" data-action="toggle" data-togglable="code_example" style="display: none" > <%= pb_rails("section_separator", props: { dark: dark })%> <a href="#" id="toggle-close" data-toggle="false" class="pb--close-toggle">Close</a> <pre class="highlight"><%= raw rouge(source, highlighter) %></pre> </div> </div> <% end %> <% end %> <script> function copyOnClick(content, elementID) { copyContent(content) } </script>
Version data entries
18 entries across 18 versions & 1 rubygems