404-crt.css 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. section#content {
  2. height:90%;
  3. }
  4. section#content > * {
  5. background-color: black;
  6. /* amber */
  7. background-image: radial-gradient(
  8. #50100E, #170708 80%
  9. );
  10. position: relative;
  11. /* amber bg */
  12. border: 0.1em solid rgba(80,16,14,0.5);
  13. border-radius: .3em;
  14. box-shadow: 0 0 8px 3px #170708;
  15. margin:.5rem;
  16. padding: .5rem;
  17. }
  18. /*
  19. Thanks to http://aleclownes.com/2017/02/01/crt-display.html for the CRT effects!
  20. */
  21. article.fullpage::before,article.fullpage::after {
  22. /* needs to be calculated from parent element border radius and thickness */
  23. border-radius:.2em;
  24. }
  25. article.fullpage > *::before {
  26. content:"$> ";
  27. }
  28. article.fullpage > *:last-child::after {
  29. content:"█";
  30. display: block;
  31. animation: cursor-blink 1s infinite;
  32. }
  33. article.fullpage *, article.fullpage * * {
  34. /* amber */
  35. color: #FFCD2F;
  36. font: 1rem monospace;
  37. /* amber */
  38. text-shadow: 0 0 .3em #FFCD2F, 0 0 .5em #FFCD2F, 0 0 .1em #FFCD2F;
  39. padding:0;
  40. }
  41. article.fullpage::after {
  42. content: " ";
  43. display: block;
  44. position: absolute;
  45. top: 0;
  46. left: 0;
  47. bottom: 0;
  48. right: 0;
  49. /* amber */
  50. background: rgba(255,205,47,0.1);
  51. opacity: 0;
  52. z-index: 2;
  53. pointer-events: none;
  54. animation: crt-flicker 0.5s infinite;
  55. }
  56. article.fullpage::before {
  57. content: " ";
  58. display: block;
  59. position: absolute;
  60. top: 0;
  61. left: 0;
  62. bottom: 0;
  63. right: 0;
  64. background: linear-gradient(rgba(0,0,0, 0.1) 50%, rgba(0, 0, 0,0.2) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.05), rgba(0, 255, 0, 0.05), rgba(0, 0, 255, 0.05));
  65. z-index: 2;
  66. background-size: 100% 2px, 3px 100%;
  67. pointer-events: none;
  68. }
  69. @media screen and (min-width: 768px) {
  70. section#content > * {
  71. border-radius: .5em;
  72. padding: 1rem;
  73. width:90%;
  74. height:90%;
  75. margin:5%;
  76. }
  77. article.fullpage::before,article.fullpage::after {
  78. /* needs to be calculated from parent element border radius and thickness */
  79. border-radius:.4em;
  80. }
  81. article.fullpage *, article.fullpage * * {
  82. font-size: 1.5rem;
  83. }
  84. }
  85. /* blinking cursor */
  86. @keyframes cursor-blink {
  87. 0% { opacity:1; }
  88. 50% { opacity:1; }
  89. 60% { opacity:0; }
  90. 80% { opacity:0; }
  91. }
  92. /*
  93. ORIGINAL
  94. @keyframes crt-flicker {
  95. 0% { opacity: 0.27861; }
  96. 5% { opacity: 0.34769; }
  97. 10% { opacity: 0.23604; }
  98. 15% { opacity: 0.90626; }
  99. 20% { opacity: 0.18128; }
  100. 25% { opacity: 0.83891; }
  101. 30% { opacity: 0.65583; }
  102. 35% { opacity: 0.67807; }
  103. 40% { opacity: 0.26559; }
  104. 45% { opacity: 0.84693; }
  105. 50% { opacity: 0.96019; }
  106. 55% { opacity: 0.08594; }
  107. 60% { opacity: 0.20313; }
  108. 65% { opacity: 0.71988; }
  109. 70% { opacity: 0.53455; }
  110. 75% { opacity: 0.37288; }
  111. 80% { opacity: 0.71428; }
  112. 85% { opacity: 0.70419; }
  113. 90% { opacity: 0.7003; }
  114. 95% { opacity: 0.36108; }
  115. 100% { opacity: 0.24387; }
  116. }
  117. */
  118. @keyframes crt-flicker {
  119. 0% { opacity: 0.2; }
  120. 5% { opacity: 0.4; }
  121. 15% { opacity: 0.3; }
  122. 20% { opacity: 0.2; }
  123. 25% { opacity: 0.4; }
  124. 35% { opacity: 0.3; }
  125. 40% { opacity: 0.2; }
  126. 45% { opacity: 0.4; }
  127. 55% { opacity: 0.3; }
  128. 60% { opacity: 0.2; }
  129. 65% { opacity: 0.4; }
  130. 75% { opacity: 0.3; }
  131. 80% { opacity: 0.2; }
  132. 85% { opacity: 0.4; }
  133. 95% { opacity: 0.3; }
  134. 100% { opacity: 0.2; }
  135. }