preview_html.mustache 4.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <div class="previewbox" style="border-color:#{{base00-hex}}">
  2. <h2 id="{{ scheme-slug }}">{{ scheme-name }}<a href="#" class="toc-nav"> #</a></h2>
  3. <p class="author">Scheme author: {{scheme-author}}</p>
  4. <div>
  5. <div class="block" style="background:#{{base00-hex}};color:#{{base07-hex}}">00</div>
  6. <div class="block" style="background:#{{base01-hex}};color:#{{base07-hex}}">01</div>
  7. <div class="block" style="background:#{{base02-hex}};color:#{{base07-hex}}">02</div>
  8. <div class="block" style="background:#{{base03-hex}};color:#{{base07-hex}}">03</div>
  9. <div class="block" style="background:#{{base04-hex}};color:#{{base00-hex}}">04</div>
  10. <div class="block" style="background:#{{base05-hex}};color:#{{base00-hex}}">05</div>
  11. <div class="block" style="background:#{{base06-hex}};color:#{{base00-hex}}">06</div>
  12. <div class="block" style="background:#{{base07-hex}};color:#{{base00-hex}}">07</div>
  13. <br />
  14. <div class="block" style="background:#{{base08-hex}};color:#{{base07-hex}}">08</div>
  15. <div class="block" style="background:#{{base09-hex}};color:#{{base07-hex}}">09</div>
  16. <div class="block" style="background:#{{base0A-hex}};color:#{{base07-hex}}">0A</div>
  17. <div class="block" style="background:#{{base0B-hex}};color:#{{base07-hex}}">0B</div>
  18. <div class="block" style="background:#{{base0C-hex}};color:#{{base07-hex}}">0C</div>
  19. <div class="block" style="background:#{{base0D-hex}};color:#{{base07-hex}}">0D</div>
  20. <div class="block" style="background:#{{base0E-hex}};color:#{{base07-hex}}">0E</div>
  21. <div class="block" style="background:#{{base0F-hex}};color:#{{base07-hex}}">0F</div>
  22. </div>
  23. <div>
  24. <pre style="background:#{{base00-hex}};color:#{{base05-hex}}">
  25. <span style="color:#{{base0E-hex}}">require</span> <span style="color:#{{base0B-hex}}">"gem"</span>
  26. <span style="color:#{{base08-hex}}">string</span> = <span style="color:#{{base0B-hex}}">"base16"</span>
  27. <span style="color:#{{base08-hex}}">symbol</span> = <span style="color:#{{base0B-hex}}">:base16</span>
  28. <span style="color:#{{base08-hex}}">fixnum</span> = <span style="color:#{{base09-hex}}">0</span>
  29. <span style="color:#{{base08-hex}}">float</span> = <span style="color:#{{base09-hex}}">0.00</span>
  30. <span style="color:#{{base08-hex}}">array</span> = <span style="color:#{{base0A-hex}}">Array</span>.<span style="color:#{{base0D-hex}}">new</span>
  31. <span style="color:#{{base08-hex}}">array</span> = [<span style="color:#{{base0B-hex}}">'chris'</span>, <span style="color:#{{base09-hex}}">85</span>]
  32. <span style="color:#{{base08-hex}}">hash</span> = {<span style="color:#{{base0B-hex}}">"test"</span> => <span style="color:#{{base0B-hex}}">"test"</span>}
  33. <span style="color:#{{base08-hex}}">regexp</span> = <span style="color:#{{base0C-hex}}">/[abc]/</span>
  34. <span style="color:#{{base0E-hex}}">class</span> <span style="color:#{{base0A-hex}}">Person</span> <span style="color:#{{base03-hex}}"># This is a comment</span>
  35. <span style="color:#{{base0D-hex}}">attr_accessor</span> <span style="color:#{{base0B-hex}}">:name</span>
  36. <span style="color:#{{base0E-hex}}">def</span> <span style="color:#{{base0D-hex}}">initialize</span>(<span style="color:#{{base08-hex}}">attributes</span> = {})
  37. <span style="color:#{{base08-hex}}">@name</span> = <span style="color:#{{base08-hex}}">attributes</span>[<span style="color:#{{base0B-hex}}">:name</span>]
  38. <span style="color:#{{base0E-hex}}">end</span>
  39. <span style="color:#{{base0E-hex}}">def</span> <span style="color:#{{base0E-hex}}">self</span>.<span style="color:#{{base0D-hex}}">greet</span>
  40. <span class="base02-background"><span style="color:#{{base0B-hex}}">"hello"</span></span>
  41. <span style="color:#{{base0E-hex}}">end</span>
  42. <span style="color:#{{base0E-hex}}">end</span>
  43. <span style="color:#{{base08-hex}}">person1</span> = <span style="color:#{{base0A-hex}}">Person</span>.<span style="color:#{{base0D-hex}}">new</span>(<span style="color:#{{base0B-hex}}">:name</span> => <span style="color:#{{base0B-hex}}">"Chris"</span>)
  44. <span style="color:#{{base0D-hex}}">print</span> <span style="color:#{{base0A-hex}}">Person</span>::<span style="color:#{{base0D-hex}}">greet</span>, <span style="color:#{{base08-hex}}">person1</span>.<span style="color:#{{base0D-hex}}">name</span>, <span style="color:#{{base0B-hex}}">"<span style="color:#{{base09-hex}}">\n</span>"</span>
  45. <span style="color:#{{base0D-hex}}">puts</span> <span style="color:#{{base0B-hex}}">"say </span><span style="color:#{{base0F-hex}}">#{</span><span style="color:#{{base0A-hex}}">Person</span>::<span style="color:#{{base0D-hex}}">greet</span><span style="color:#{{base0F-hex}}">}</span> <span style="color:#{{base0F-hex}}">#{</span><span style="color:#{{base08-hex}}">person1</span>.<span style="color:#{{base0D-hex}}">name</span><span style="color:#{{base0F-hex}}">}</span><span style="color:#{{base0B-hex}}">"</span>
  46. </pre>
  47. </div>
  48. </div>