parent
5a1334f7fb
commit
c055e94b85
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Padding And Margin | tait.tech</title>
|
||||
<link rel="stylesheet" href="/assets/css/style.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="author" content="Tait Hoyem">
|
||||
<meta name="keywords" content="">
|
||||
<meta name="description" content="">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>tait.tech</h1>
|
||||
|
||||
<nav>
|
||||
|
||||
<a href="/" class="nav-link" >Home</a>
|
||||
|
||||
<a href="/blog/" class="nav-link" >Blog</a>
|
||||
|
||||
<a href="/ideas/" class="nav-link" >Ideas</a>
|
||||
|
||||
<a href="/links/" class="nav-link" >Links</a>
|
||||
|
||||
<a href="https://github.com/TTWNO/" class="nav-link" target="_blank" rel="noopener noreferrer" >Github</a>
|
||||
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
<main>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="post-title">Padding And Margin</h1>
|
||||
<time datetime="20-01-22" class="post-date">Wednesday, January 22 2020</time>
|
||||
</header>
|
||||
<hr>
|
||||
|
||||
<p>Many people have expressed confusion over how padding and margins work in HTML/CSS. I have been one of those people. In this short article I will explain what the differences are between the two, and how it may affect the functionality of your site.</p>
|
||||
|
||||
<p>Here is an image from the World Wide Web Consortium (W3C) who sets the standards for the web.</p>
|
||||
|
||||
<p><img src="/assets/img/w3c-padding-margin.png" alt="The W3C standard for padding, margin, borders and width. Width encompases the inner element + padding; the border then encompases it. The margin is the space beyond the border and in between other elements." title="W3C border, padding, margin standard." /></p>
|
||||
|
||||
<p>Now although this image shows all the different types of spacing as equal, the majority of the time these will mostly be padding (inner) and margin (outer). Padding is the inner space between the element and its border; margin is the outer space between two different elements.</p>
|
||||
|
||||
<p>Within the margin the user is unable to press any links or execute any javascript code. It is <em>empty</em> space. If each <code class="language-plaintext highlighter-rouge"><link></code> on your navigation bar has 10 pixels of margin, then there would be 20 pixels in between each <code class="language-plaintext highlighter-rouge"><link></code> that would <em>not</em> be clickable by the user.</p>
|
||||
|
||||
<p>If you have <code class="language-plaintext highlighter-rouge"><link></code>s on your navigation bar with <em>padding</em> set to 20 pixels, however, then there will be 20 pixels on each side of the <code class="language-plaintext highlighter-rouge"><link></code> text where the user <em>is</em> able to click.</p>
|
||||
|
||||
<p>If that part is confusing, try thinking about it in terms of whether <code class="language-plaintext highlighter-rouge">background-color</code> would apply.</p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Attribute</th>
|
||||
<th><strong>Padding</strong></th>
|
||||
<th><strong>Margin</strong></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Spacing</td>
|
||||
<td>within element</td>
|
||||
<td>between elements</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code class="language-plaintext highlighter-rouge">background-color</code> applies</td>
|
||||
<td>Yes</td>
|
||||
<td>No</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>In summary:</p>
|
||||
<ul>
|
||||
<li><strong>Padding</strong>: the space within a tag which is still part of the same tag. <code class="language-plaintext highlighter-rouge">background-color</code> applies.</li>
|
||||
<li><strong>Margin</strong>: the space in between two seperate tags. <code class="language-plaintext highlighter-rouge">background-color</code> does not apply; it is empty space.</li>
|
||||
<li><strong>Border</strong>: the space in between the two; it surrounds the padding, but is not the margin. It looks nice somtimes, but it has no non-visual function. <code class="language-plaintext highlighter-rouge">background-color</code> does not apply.</li>
|
||||
</ul>
|
||||
|
||||
<p>I hope this covers the basics of margin and padding! Happy coding!</p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</main>
|
||||
<hr>
|
||||
<footer>
|
||||
This page will be mirrored on <a href="https://beta.tait.tech/2020/01/22/padding-and-margin/">beta.tait.tech</a>.
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,68 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>rfi: A Simple Linux utility to get a random file from a directory | tait.tech</title>
|
||||
<link rel="stylesheet" href="/assets/css/style.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="author" content="Tait Hoyem">
|
||||
<meta name="keywords" content="">
|
||||
<meta name="description" content="">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>tait.tech</h1>
|
||||
|
||||
<nav>
|
||||
|
||||
<a href="/" class="nav-link" >Home</a>
|
||||
|
||||
<a href="/blog/" class="nav-link" >Blog</a>
|
||||
|
||||
<a href="/ideas/" class="nav-link" >Ideas</a>
|
||||
|
||||
<a href="/links/" class="nav-link" >Links</a>
|
||||
|
||||
<a href="https://github.com/TTWNO/" class="nav-link" target="_blank" rel="noopener noreferrer" >Github</a>
|
||||
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
<main>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="post-title">rfi: A Simple Linux utility to get a random file from a directory</h1>
|
||||
<time datetime="20-04-21" class="post-date">Tuesday, April 21 2020</time>
|
||||
</header>
|
||||
<hr>
|
||||
|
||||
<p>I made a <a href="https://lbry.tv/@tait:7/rfi:5">little video</a> about this script I wrote:</p>
|
||||
|
||||
<pre class="terminal">
|
||||
$ rfi
|
||||
</pre>
|
||||
|
||||
<p>This program gets a random file from your current directory
|
||||
if you do not specify one;
|
||||
it gets a random file from the specified directory if you give it one like so:</p>
|
||||
|
||||
<pre class="terminal">
|
||||
# rfi /etc/wireguard
|
||||
</pre>
|
||||
|
||||
<p>Which is very useful if you want to start a random VPN configuration :)</p>
|
||||
|
||||
<p>The code, comments, etc. are on the <a href="https://github.com/TTWNO/scripts">Github</a>.</p>
|
||||
|
||||
</article>
|
||||
|
||||
</main>
|
||||
<hr>
|
||||
<footer>
|
||||
This page will be mirrored on <a href="https://beta.tait.tech/2020/04/21/rfi/">beta.tait.tech</a>.
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Site Update | tait.tech</title>
|
||||
<link rel="stylesheet" href="/assets/css/style.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="author" content="Tait Hoyem">
|
||||
<meta name="keywords" content="">
|
||||
<meta name="description" content="">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>tait.tech</h1>
|
||||
|
||||
<nav>
|
||||
|
||||
<a href="/" class="nav-link" >Home</a>
|
||||
|
||||
<a href="/blog/" class="nav-link" >Blog</a>
|
||||
|
||||
<a href="/ideas/" class="nav-link" >Ideas</a>
|
||||
|
||||
<a href="/links/" class="nav-link" >Links</a>
|
||||
|
||||
<a href="https://github.com/TTWNO/" class="nav-link" target="_blank" rel="noopener noreferrer" >Github</a>
|
||||
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
<main>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="post-title">Site Update</h1>
|
||||
<time datetime="20-06-04" class="post-date">Thursday, June 04 2020</time>
|
||||
</header>
|
||||
<hr>
|
||||
|
||||
<p>I updated the site with some easier to identify information about me and my projects :)</p>
|
||||
|
||||
<p>Also, Clue has been delayed due to my partner in crime on the project wokring too many hours.</p>
|
||||
|
||||
<p>I also posted a new project called <em><a href="https://github.com/TTWNO/caesar-cipher">Caesar Cipher</a></em> in C. It will be an intermediate example of how to use build systems like <code class="language-plaintext highlighter-rouge">make</code>.</p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</main>
|
||||
<hr>
|
||||
<footer>
|
||||
This page will be mirrored on <a href="https://beta.tait.tech/2020/06/04/site-update/">beta.tait.tech</a>.
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
@ -1,3 +1,23 @@
|
||||
# site
|
||||
# tait.tech
|
||||
The uncompiled version of my website. Compiled files in _site
|
||||
|
||||
Files to serve to NGINX (original code contained in tait.tech repository).
|
||||
### To compile
|
||||
|
||||
To compile the files, simply use the bundle Ruby gem.
|
||||
|
||||
```
|
||||
bundle exec jekyll build
|
||||
```
|
||||
|
||||
to compile once. If you decide you want to actually have changes appear instantly, use the following
|
||||
|
||||
```
|
||||
bundle exec jekyll watch
|
||||
```
|
||||
|
||||
To run a local web server to view the changes on:
|
||||
```
|
||||
bundle exec jekyll server -w
|
||||
```
|
||||
|
||||
This will watch for the latest changes, compile them, and make them available on localhost:4000
|
||||
|
@ -0,0 +1,45 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>About | tait.tech</title>
|
||||
<link rel="stylesheet" href="/assets/css/style.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="author" content="Tait Hoyem">
|
||||
<meta name="keywords" content="">
|
||||
<meta name="description" content="">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
<h1>tait.tech</h1>
|
||||
|
||||
<nav>
|
||||
|
||||
<a href="/" class="nav-link" >Home</a>
|
||||
|
||||
<a href="/blog/" class="nav-link" >Blog</a>
|
||||
|
||||
<a href="/ideas/" class="nav-link" >Ideas</a>
|
||||
|
||||
<a href="/links/" class="nav-link" >Links</a>
|
||||
|
||||
<a href="https://github.com/TTWNO/" class="nav-link" target="_blank" rel="noopener noreferrer" >Github</a>
|
||||
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
<main>
|
||||
<h1 id="tait-hoyem">Tait Hoyem</h1>
|
||||
|
||||
<p>I believe in three fundamentals</p>
|
||||
|
||||
</main>
|
||||
<hr>
|
||||
<footer>
|
||||
This page will be mirrored on <a href="https://beta.tait.tech/about/">beta.tait.tech</a>.
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,9 @@
|
||||
body { background-color: #222222; color: #ffffff; font-family: -apple-system, helvetica, arial, sans-serif; line-height: 1.5em; padding: .25em; }
|
||||
|
||||
a { color: #7ad; }
|
||||
|
||||
a:visited { color: #ff3492; }
|
||||
|
||||
h1, h2 { text-align: center; }
|
||||
|
||||
/*# sourceMappingURL=book.css.map */
|
@ -0,0 +1,16 @@
|
||||
{
|
||||
"version": 3,
|
||||
"file": "book.css",
|
||||
"sources": [
|
||||
"book.scss",
|
||||
"_sass/book.scss",
|
||||
"_sass/vars.scss"
|
||||
],
|
||||
"sourcesContent": [
|
||||
"@import \"book\";\n",
|
||||
"@import \"vars\";\n\nbody {\n background-color: $background-color;\n color: $normal-text-color;\n font-family: -apple-system, helvetica, arial, sans-serif;\n line-height: $line-height;\n padding: .25em;\n}\na {\n color: $link-color;\n}\na:visited {\n color: $visited-link-color;\n}\nh1, h2 {\n text-align: center;\n}\n",
|
||||
"$normal-text-color: #ffffff;\n$background-color: #222222;\n$lighter-color: #ffffff;\n$nav-link-color: #ffffff;\n$nav-link-hover-color: black;\n$link-color: #7ad;\n$visited-link-color: #ff3492;\n$last-p-padd: 1.5em;\n$nav-padd: 1em;\n$line-under: 1px solid #aaa; \n$line-height: 1.5em;\n$term-line-height: 1em;\n$file-line-height: 1.2em;\n$terminal-bg: #000000;\n$terminal-fg: #00FF00;\n$file-bg: #444444;\n$file-fg: #ffffff;\n"
|
||||
],
|
||||
"names": [],
|
||||
"mappings": "ACEA,AAAA,IAAI,CAAC,EACH,gBAAgB,ECFC,OAAO,EDGxB,KAAK,ECJa,OAAO,EDKzB,WAAW,EAAE,2CAA2C,EACxD,WAAW,ECIC,KAAK,EDHjB,OAAO,EAAE,KAAK,GACf;;AACD,AAAA,CAAC,CAAC,EACA,KAAK,ECLM,IAAI,GDMhB;;AACD,AAAA,CAAC,CAAC,OAAO,CAAC,EACR,KAAK,ECPc,OAAO,GDQ3B;;AACD,AAAA,EAAE,EAAE,EAAE,CAAC,EACL,UAAU,EAAE,MAAM,GACnB"
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,80 @@
|
||||
/* code highlghting */
|
||||
.highlight .hll { background-color: #ffffcc }
|
||||
.highlight { background: #f0f0f0; }
|
||||
.highlight .c { color: #60a0b0; font-style: italic } /* Comment */
|
||||
.highlight .err { border: 1px solid #FF0000 } /* Error */
|
||||
.highlight .k { color: #007020; font-weight: bold } /* Keyword */
|
||||
.highlight .o { color: #666666 } /* Operator */
|
||||
.highlight .ch { color: #60a0b0; font-style: italic } /* Comment.Hashbang */
|
||||
.highlight .cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */
|
||||
.highlight .cp { color: #007020 } /* Comment.Preproc */
|
||||
.highlight .cpf { color: #60a0b0; font-style: italic } /* Comment.PreprocFile */
|
||||
.highlight .c1 { color: #60a0b0; font-style: italic } /* Comment.Single */
|
||||
.highlight .cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */
|
||||
.highlight .gd { color: #A00000 } /* Generic.Deleted */
|
||||
.highlight .ge { font-style: italic } /* Generic.Emph */
|
||||
.highlight .gr { color: #FF0000 } /* Generic.Error */
|
||||
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
|
||||
.highlight .gi { color: #00A000 } /* Generic.Inserted */
|
||||
.highlight .go { color: #888888 } /* Generic.Output */
|
||||
.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
|
||||
.highlight .gs { font-weight: bold } /* Generic.Strong */
|
||||
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
|
||||
.highlight .gt { color: #0044DD } /* Generic.Traceback */
|
||||
.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
|
||||
.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
|
||||
.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
|
||||
.highlight .kp { color: #007020 } /* Keyword.Pseudo */
|
||||
.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
|
||||
.highlight .kt { color: #902000 } /* Keyword.Type */
|
||||
.highlight .m { color: #40a070 } /* Literal.Number */
|
||||
.highlight .s { color: #4070a0 } /* Literal.String */
|
||||
.highlight .na { color: #4070a0 } /* Name.Attribute */
|
||||
.highlight .nb { color: #007020 } /* Name.Builtin */
|
||||
.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
|
||||
.highlight .no { color: #60add5 } /* Name.Constant */
|
||||
.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
|
||||
.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
|
||||
.highlight .ne { color: #007020 } /* Name.Exception */
|
||||
.highlight .nf { color: #06287e } /* Name.Function */
|
||||
.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
|
||||
.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
|
||||
.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
|
||||
.highlight .nv { color: #bb60d5 } /* Name.Variable */
|
||||
.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
|
||||
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
|
||||
.highlight .mb { color: #40a070 } /* Literal.Number.Bin */
|
||||
.highlight .mf { color: #40a070 } /* Literal.Number.Float */
|
||||
.highlight .mh { color: #40a070 } /* Literal.Number.Hex */
|
||||
.highlight .mi { color: #40a070 } /* Literal.Number.Integer */
|
||||
.highlight .mo { color: #40a070 } /* Literal.Number.Oct */
|
||||
.highlight .sa { color: #4070a0 } /* Literal.String.Affix */
|
||||
.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
|
||||
.highlight .sc { color: #4070a0 } /* Literal.String.Char */
|
||||
.highlight .dl { color: #4070a0 } /* Literal.String.Delimiter */
|
||||
.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
|
||||
.highlight .s2 { color: #4070a0 } /* Literal.String.Double */
|
||||
.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
|
||||
.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
|
||||
.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
|
||||
.highlight .sx { color: #c65d09 } /* Literal.String.Other */
|
||||
.highlight .sr { color: #235388 } /* Literal.String.Regex */
|
||||
.highlight .s1 { color: #4070a0 } /* Literal.String.Single */
|
||||
.highlight .ss { color: #517918 } /* Literal.String.Symbol */
|
||||
.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
|
||||
.highlight .fm { color: #06287e } /* Name.Function.Magic */
|
||||
.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
|
||||
.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
|
||||
.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
|
||||
.highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */
|
||||
.highlight .il { color: #40a070 } /* Literal.Number.Integer.Long */
|
||||
|
||||
/* ADDED CUSTOM */
|
||||
.highlight .n { color: #000; } /* General name */
|
||||
|
||||
div.highlight {
|
||||
padding: 0px 12px;
|
||||
width: 85%;
|
||||
margin: auto;
|
||||
overflow-x: scroll;
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,3 @@
|
||||
textarea { width: 100%; height: 300px; overflow-y: scroll; }
|
||||
|
||||
/*# sourceMappingURL=markdown.css.map */
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue