From dcfb172704f3afb68a30425029ec834be2883274 Mon Sep 17 00:00:00 2001 From: bt Date: Sat, 8 Jun 2024 13:22:19 -0400 Subject: More content porting, on-going markdown changes for lowdown support --- build/soma-terminal-css/index.html | 109 +++++++++++++++++++++---------------- 1 file changed, 63 insertions(+), 46 deletions(-) (limited to 'build/soma-terminal-css/index.html') diff --git a/build/soma-terminal-css/index.html b/build/soma-terminal-css/index.html index aab9549..fa59d23 100644 --- a/build/soma-terminal-css/index.html +++ b/build/soma-terminal-css/index.html @@ -1,59 +1,73 @@ - + SOMA Inspired Terminal Display with CSS - - + + +
-

SOMA Inspired Terminal Display with CSS

+

SOMA Inspired Terminal Display with CSS

+

2021-05-29

+

A few years back I played (and loved) SOMA, a first-person sci-fi horror-adventure game. The story was intriguing and the developers nailed the overall atmosphere of Pathos-II. Though both those aspects were great, what I found the most enjoyable were the interactive computers and displays found sprinkled throughout the world.

-

Three years ago I wanted to see if I could recreate one of those terminal displays with HTML & CSS. And I did just that.

-

So, why am I writing about this three years later? Well, I never did a proper write-up explaining how I achieved it. I'm sure someone out there in the wild west of the web could get some value out of this tutorial, right? I hope so!

-

The Live Demo

+ +

Three years ago I wanted to see if I could recreate one of those terminal displays with HTML & CSS. And I did just that.

+ +

So, why am I writing about this three years later? Well, I never did a proper write-up explaining how I achieved it. I’m sure someone out there in the wild west of the web could get some value out of this tutorial, right? I hope so!

+ +

The Live Demo

+

Terminal based off the SOMA computers

+

Live CodePen Example

-

The HTML

+ +

The HTML

+

Nothing fancy going on here - just some simple div elements holding a few paragraphs and spans:

-
<div class="outer-frame">
-    <div class="screen">
-        <div class="screen-guts">
-            <h2>Key Control</h2>
-            <p><span>Panel Chip</span> (Connector)</p>
-            <p class="column">
-                Security Keys: 023-027<br>C819738-23
-                <br>
-                <span class="error">Error: Key Expired</span>
-                <br>
-                <em>Please update...</em>
-            </p>
-            <p>
-                <span>Permission</span>
-                <br>
+
+
<div class="outer-frame">
+    <div class="screen">
+        <div class="screen-guts">
+            <h2>Key Control</h2>
+            <p><span>Panel Chip</span> (Connector)</p>
+            <p class="column">
+                Security Keys: 023-027<br>C819738-23
+                <br>
+                <span class="error">Error: Key Expired</span>
+                <br>
+                <em>Please update...</em>
+            </p>
+            <p>
+                <span>Permission</span>
+                <br>
                 Standard ThetaCipher
-                <br>
-                <span>Secop-Jstrohweier</span>
-            </p>
-            <button class="update-button">Update Chip</button>
-        </div>
-        <div class="bottom-controls">
-            <button class="back-button">Back 背部</button>
-        </div>
-    </div>
-</div>
+                <br>
+                <span>Secop-Jstrohweier</span>
+            </p>
+            <button class="update-button">Update Chip</button>
+        </div>
+        <div class="bottom-controls">
+            <button class="back-button">Back 背部</button>
+        </div>
+    </div>
+</div>
 
-

The CSS

-

Let's just dump all the CSS right here (don't worry, it looks far more complicated than it really is):

-
@import url('https://opentype.netlify.com/sansation/index.css');
+
+

The CSS

+ +

Let’s just dump all the CSS right here (don’t worry, it looks far more complicated than it really is):

+ +
@import url('https://opentype.netlify.com/sansation/index.css');
 
 * {
     box-sizing: border-box;
@@ -61,7 +75,7 @@
 
 body {
     background: #333;
-    font-family: "Sansation", sans-serif;
+    font-family: "Sansation", sans-serif;
     padding: 3rem 0;
 }
 
@@ -69,7 +83,7 @@ button {
     appearance: none;
     border: 0;
     cursor: pointer;
-    font-family: "Inconsolata", "Consolas", mono;
+    font-family: "Inconsolata", "Consolas", mono;
     font-size: 18px;
     transition: 0.3s ease all;
 }
@@ -82,7 +96,7 @@ button {
 }
 
 .outer-frame {
-    background: #ccc url("https://preview.ibb.co/iS9nz7/screen_grunge.webp") no-repeat center;
+    background: #ccc url("https://preview.ibb.co/iS9nz7/screen_grunge.webp") no-repeat center;
     background-size: cover;
     border-radius: 5px;
     box-shadow: 0 5px 20px rgba(0,0,0,0.6);
@@ -93,7 +107,7 @@ button {
     background: rgba(0,0,0,0.3);
     border-radius: 5px;
     box-shadow: inset 5px 5px 10px rgba(0,0,0,0.4), 1px 1px 1px rgba(255,255,255,0.3);
-    content: '';
+    content: '';
     height: 538px;
     left: 15px;
     position: absolute;
@@ -102,7 +116,7 @@ button {
 }
 
 .screen {
-    background: #000 url("https://image.ibb.co/gOqSz7/screen_dust.webp") no-repeat center;
+    background: #000 url("https://image.ibb.co/gOqSz7/screen_dust.webp") no-repeat center;
     background-size: cover;
     border-radius: 5px;
     height: 450px;
@@ -113,11 +127,11 @@ button {
     width: 600px;
 }
 .screen:after {
-    background: url("https://s13.postimg.org/85ryuy1o7/dust.webp") no-repeat center;
+    background: url("https://s13.postimg.org/85ryuy1o7/dust.webp") no-repeat center;
     background-size: cover;
     border-radius: 5px;
     box-shadow: inset 0 0 20px rgba(0,0,0,0.5), inset 5px 5px 10px rgba(0,0,0,0.4), 1px 1px 1px rgba(255,255,255,0.3);
-    content: '';
+    content: '';
     height: 100%;
     left: 0;
     opacity: 0.8;
@@ -139,7 +153,7 @@ button {
 .screen-guts:after {
     border: 2px solid #8fc8c8;
     color: #8fc8c8;
-    content: '键';
+    content: '键';
     padding: 5px 8px;
     position: absolute;
     right: 0;
@@ -204,8 +218,11 @@ button {
     background: rgba(0,0,0,0.6);
 }
 
-

The overall styling is fairly simple (which is great for browser support) with only a couple pseudo elements. It's important to include the custom Sansation typeface, since this is what the game uses for most UI elements and terminals. (I'm loading in this font via my OpenType side project)

+ +

The overall styling is fairly simple (which is great for browser support) with only a couple pseudo elements. It’s important to include the custom Sansation typeface, since this is what the game uses for most UI elements and terminals. (I’m loading in this font via my OpenType side project)

+

The most important properties that truly bring this design together are those associated with the .outer-frame and .screen pseudo elements. Both of these elements use custom background-images that give a little more depth and life to the terminal - in this case fingerprints, dust and smudges.

+

Feel free to swap these image textures out with your own and alter the terminal as you see fit!