aboutsummaryrefslogtreecommitdiff
path: root/build/soma-terminal-css
diff options
context:
space:
mode:
Diffstat (limited to 'build/soma-terminal-css')
-rw-r--r--build/soma-terminal-css/index.html109
1 files changed, 63 insertions, 46 deletions
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 @@
<!doctype html>
-<html lang="en" id="top">
+<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="data:,">
<title>SOMA Inspired Terminal Display with CSS</title>
- <link href="https://bt.ht/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" />
- <style>*{box-sizing:border-box;}body{font-family:sans-serif;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{overflow:auto;}table{text-align:left;width:100%;}</style>
+ <link href="/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" />
+ <link href="/rss.xml" type="application/rss+xml" rel="alternate" title="RSS feed for blog posts" />
+<style>*{box-sizing:border-box;}body{font-family:sans-serif;line-height:1.33;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{border:1px solid;overflow:auto;padding:5px;}table{text-align:left;width:100%;}.footnotes{font-size:90%;}</style>
</head>
<nav>
- <a href="#menu">Menu &darr;</a>
+ <a href="#menu">Menu &darr;</a>
</nav>
<main>
-<h1>SOMA Inspired Terminal Display with CSS</h1>
+<h1 id="soma-inspired-terminal-display-with-css">SOMA Inspired Terminal Display with CSS</h1>
+
<p>2021-05-29</p>
+
<p>A few years back I played (and loved) <a href="https://store.steampowered.com/app/282140/SOMA/">SOMA</a>, 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.</p>
-<p>Three years ago I wanted to see if I could recreate one of those terminal displays with HTML &amp; CSS. And I did just that.</p>
-<p>So, why am I writing about this <em>three years later</em>? 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!</p>
-<h2>The Live Demo</h2>
+
+<p>Three years ago I wanted to see if I could recreate one of those terminal displays with HTML &#38; CSS. And I did just that.</p>
+
+<p>So, why am I writing about this <em>three years later</em>? Well, I never did a proper write-up explaining how I achieved it. I&#8217;m sure someone out there in the wild west of the web could get some value out of this tutorial, right? I hope so!</p>
+
+<h2 id="the-live-demo">The Live Demo</h2>
+
<p><img src="/public/images/soma-terminal.png" alt="Terminal based off the SOMA computers" /></p>
+
<p><a href="https://codepen.io/bradleytaunt/pen/ZEeLgmz">Live CodePen Example</a></p>
-<h2>The HTML</h2>
+
+<h2 id="the-html">The HTML</h2>
+
<p>Nothing fancy going on here - just some simple <code>div</code> elements holding a few paragraphs and spans:</p>
-<pre><code>&lt;div class=&quot;outer-frame&quot;&gt;
- &lt;div class=&quot;screen&quot;&gt;
- &lt;div class=&quot;screen-guts&quot;&gt;
- &lt;h2&gt;Key Control&lt;/h2&gt;
- &lt;p&gt;&lt;span&gt;Panel Chip&lt;/span&gt; (Connector)&lt;/p&gt;
- &lt;p class=&quot;column&quot;&gt;
- Security Keys: 023-027&lt;br&gt;C819738-23
- &lt;br&gt;
- &lt;span class=&quot;error&quot;&gt;Error: Key Expired&lt;/span&gt;
- &lt;br&gt;
- &lt;em&gt;Please update...&lt;/em&gt;
- &lt;/p&gt;
- &lt;p&gt;
- &lt;span&gt;Permission&lt;/span&gt;
- &lt;br&gt;
+
+<pre><code>&#60;div class="outer-frame"&#62;
+ &#60;div class="screen"&#62;
+ &#60;div class="screen-guts"&#62;
+ &#60;h2&#62;Key Control&#60;&#47;h2&#62;
+ &#60;p&#62;&#60;span&#62;Panel Chip&#60;&#47;span&#62; (Connector)&#60;&#47;p&#62;
+ &#60;p class="column"&#62;
+ Security Keys: 023-027&#60;br&#62;C819738-23
+ &#60;br&#62;
+ &#60;span class="error"&#62;Error: Key Expired&#60;&#47;span&#62;
+ &#60;br&#62;
+ &#60;em&#62;Please update...&#60;&#47;em&#62;
+ &#60;&#47;p&#62;
+ &#60;p&#62;
+ &#60;span&#62;Permission&#60;&#47;span&#62;
+ &#60;br&#62;
Standard ThetaCipher
- &lt;br&gt;
- &lt;span&gt;Secop-Jstrohweier&lt;/span&gt;
- &lt;/p&gt;
- &lt;button class=&quot;update-button&quot;&gt;Update Chip&lt;/button&gt;
- &lt;/div&gt;
- &lt;div class=&quot;bottom-controls&quot;&gt;
- &lt;button class=&quot;back-button&quot;&gt;Back 背部&lt;/button&gt;
- &lt;/div&gt;
- &lt;/div&gt;
-&lt;/div&gt;
+ &#60;br&#62;
+ &#60;span&#62;Secop-Jstrohweier&#60;&#47;span&#62;
+ &#60;&#47;p&#62;
+ &#60;button class="update-button"&#62;Update Chip&#60;&#47;button&#62;
+ &#60;&#47;div&#62;
+ &#60;div class="bottom-controls"&#62;
+ &#60;button class="back-button"&#62;Back 背部&#60;&#47;button&#62;
+ &#60;&#47;div&#62;
+ &#60;&#47;div&#62;
+&#60;&#47;div&#62;
</code></pre>
-<h2>The CSS</h2>
-<p>Let's just dump all the CSS right here (don't worry, it looks far more complicated than it really is):</p>
-<pre><code>@import url('https://opentype.netlify.com/sansation/index.css');
+
+<h2 id="the-css">The CSS</h2>
+
+<p>Let&#8217;s just dump all the CSS right here (don&#8217;t worry, it looks far more complicated than it really is):</p>
+
+<pre><code>@import url(&#39;https:&#47;&#47;opentype.netlify.com&#47;sansation&#47;index.css&#39;);
* {
box-sizing: border-box;
@@ -61,7 +75,7 @@
body {
background: #333;
- font-family: &quot;Sansation&quot;, sans-serif;
+ font-family: "Sansation", sans-serif;
padding: 3rem 0;
}
@@ -69,7 +83,7 @@ button {
appearance: none;
border: 0;
cursor: pointer;
- font-family: &quot;Inconsolata&quot;, &quot;Consolas&quot;, mono;
+ font-family: "Inconsolata", "Consolas", mono;
font-size: 18px;
transition: 0.3s ease all;
}
@@ -82,7 +96,7 @@ button {
}
.outer-frame {
- background: #ccc url(&quot;https://preview.ibb.co/iS9nz7/screen_grunge.webp&quot;) no-repeat center;
+ background: #ccc url("https:&#47;&#47;preview.ibb.co&#47;iS9nz7&#47;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: &#39;&#39;;
height: 538px;
left: 15px;
position: absolute;
@@ -102,7 +116,7 @@ button {
}
.screen {
- background: #000 url(&quot;https://image.ibb.co/gOqSz7/screen_dust.webp&quot;) no-repeat center;
+ background: #000 url("https:&#47;&#47;image.ibb.co&#47;gOqSz7&#47;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(&quot;https://s13.postimg.org/85ryuy1o7/dust.webp&quot;) no-repeat center;
+ background: url("https:&#47;&#47;s13.postimg.org&#47;85ryuy1o7&#47;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: &#39;&#39;;
height: 100%;
left: 0;
opacity: 0.8;
@@ -139,7 +153,7 @@ button {
.screen-guts:after {
border: 2px solid #8fc8c8;
color: #8fc8c8;
- content: '键';
+ content: &#39;键&#39;;
padding: 5px 8px;
position: absolute;
right: 0;
@@ -204,8 +218,11 @@ button {
background: rgba(0,0,0,0.6);
}
</code></pre>
-<p>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 <code>Sansation</code> typeface, since this is what the game uses for most UI elements and terminals. (I'm loading in this font via my <a href="https://opentype.netlify.app">OpenType side project</a>)</p>
+
+<p>The overall styling is fairly simple (which is great for browser support) with only a couple pseudo elements. It&#8217;s important to include the custom <code>Sansation</code> typeface, since this is what the game uses for most UI elements and terminals. (I&#8217;m loading in this font via my <a href="https://opentype.netlify.app">OpenType side project</a>)</p>
+
<p>The most important properties that truly bring this design together are those associated with the <code>.outer-frame</code> and <code>.screen</code> pseudo elements. Both of these elements use custom <code>background-images</code> that give a little more depth and life to the terminal - in this case fingerprints, dust and smudges.</p>
+
<p>Feel free to swap these image textures out with your own and alter the terminal as you see fit!</p>
<footer role="contentinfo">
<h2>Menu Navigation</h2>