termynal.css 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /**
  2. * termynal.js
  3. *
  4. * @author Ines Montani <ines@ines.io>
  5. * @version 0.0.1
  6. * @license MIT
  7. */
  8. :root {
  9. --color-bg: #eee8d5;
  10. --color-text: #073642;
  11. --color-text-subtle: #cb4b16;
  12. background: linear-gradient(to right, #3a1c71, #d76d77, #ffaf7b);
  13. }
  14. [data-termynal] {
  15. width: 750px;
  16. max-width: 100%;
  17. background: var(--color-bg);
  18. color: var(--color-text);
  19. font-size: 18px;
  20. /* font-family: 'Fira Mono', Consolas, Menlo, Monaco, 'Courier New', Courier, monospace; */
  21. font-family: 'Roboto Mono', 'Fira Mono', Consolas, Menlo, Monaco, 'Courier New', Courier, monospace;
  22. border-radius: 4px;
  23. padding: 75px 45px 35px;
  24. position: relative;
  25. -webkit-box-sizing: border-box;
  26. box-sizing: border-box;
  27. }
  28. [data-termynal]:before {
  29. content: '';
  30. position: absolute;
  31. top: 15px;
  32. left: 15px;
  33. display: inline-block;
  34. width: 15px;
  35. height: 15px;
  36. border-radius: 50%;
  37. /* A little hack to display the window buttons in one pseudo element. */
  38. background: #d9515d;
  39. -webkit-box-shadow: 25px 0 0 #f4c025, 50px 0 0 #3ec930;
  40. box-shadow: 25px 0 0 #f4c025, 50px 0 0 #3ec930;
  41. }
  42. [data-termynal]:after {
  43. content: 'bash';
  44. position: absolute;
  45. color: var(--color-text-subtle);
  46. top: 5px;
  47. left: 0;
  48. width: 100%;
  49. text-align: center;
  50. }
  51. a[data-terminal-control] {
  52. text-align: right;
  53. display: block;
  54. color: #aebbff;
  55. }
  56. [data-ty] {
  57. display: block;
  58. line-height: 2;
  59. }
  60. [data-ty]:before {
  61. /* Set up defaults and ensure empty lines are displayed. */
  62. content: '';
  63. display: inline-block;
  64. vertical-align: middle;
  65. }
  66. [data-ty="input"]:before,
  67. [data-ty-prompt]:before {
  68. margin-right: 0.75em;
  69. color: var(--color-text-subtle);
  70. }
  71. [data-ty="input"]:before {
  72. content: '$';
  73. }
  74. [data-ty][data-ty-prompt]:before {
  75. content: attr(data-ty-prompt);
  76. }
  77. [data-ty-cursor]:after {
  78. content: attr(data-ty-cursor);
  79. font-family: monospace;
  80. margin-left: 0.5em;
  81. -webkit-animation: blink 1s infinite;
  82. animation: blink 1s infinite;
  83. }
  84. /* Cursor animation */
  85. @-webkit-keyframes blink {
  86. 50% {
  87. opacity: 0;
  88. }
  89. }
  90. @keyframes blink {
  91. 50% {
  92. opacity: 0;
  93. }
  94. }