Squar3's Netshack

Custom blog theme

I played around with my (very limited) CSS skills and created a mashup of the terminal and docs themes. It's kinda hacky and one day I'll try to refine it, but for now it's good enough. I'm posting it here for the eventual viewer who wants to use it.

/* Font */
@import url("https://api.fontshare.com/v2/css?f[]=satoshi@700,701,401,400&display=swap");
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;700&display=swap');
/* Settings */
:root {
  --color-dark: #222129;
  --color-light: #FFA86A;
  --color-primary: #1a8fe3;
  --spacing: 1.5rem;
  --font-stack: 'Fira Code', monospace;
  --max-width: 1600px;
  --link-color: #FFA86A;
}

/* Dark mode settings */
@media (prefers-color-scheme: dark) {
  :root {
    --color-dark: #FFA86A;
    --color-light: #222129;
  }
}

/* Basic styles */
body {
  background: var(--color-light);
  color: var(--color-dark);
  padding: 20px;
  font-family: var(--font-stack);
  font-size: 1rem;
  line-height: 1.7;
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing) * 2);
  min-height: 100vh;
  max-width: var(--max-width);
  margin: 0 auto;
}

* {
  box-sizing: border-box;
}

header,
main,
footer {
  max-width: 80%;
  margin-inline: auto;
  width: 100%;
}

/* Header styles */
header {

  padding-bottom: var(--spacing);
  flex-basis: 12rem;
  flex-grow: 1;
}

/* Main content styles */
main {
  flex-basis: 0;
  flex-grow: 999;
  padding: 30px;
  flex-basis: 40rem;
  border: 1px solid var(--link-color);
}

/* Footer styles */
footer {
  min-width: 10%;
  flex-basis: 0;
  flex-grow: 1;
  padding-top: var(--spacing);
}

/* Link styles */
a {
  color: currentColor;
  text-decoration-color: var(--color-primary);
  text-decoration-thickness: 0.2ex;
  text-underline-offset: 0.3ex;
}

a:hover {
  text-decoration-thickness: 0.3ex;
}

/* Image styles */
img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Heading styles */
h1,
h2,
h3,
h4,
h5 {
  font-weight: 700;
  line-height: 1.3;
  text-wrap: balance;


}

/* Adjustments for different heading levels */
h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.5rem;
}
h4 {
  font-size: 1.25rem;
}
h5 {
  font-size: 13rem;
}

/* List styles */
ul,
ol {
  padding-inline-start: var(--spacing);
}
li {
  margin-block-start: var(--spacing);
}

/* Blockquote styles */
blockquote {
  padding-inline-start: var(--spacing);
  border-inline-start: 0.3em solid;
  font-style: italic;
  font-size: 1.5rem;
}

/* Flow and rhythm */
:is(h1, h2, h3, h4, h5, blockquote) {
  margin-block-end: calc(var(--spacing) / 2);
}
:is(h1, h2, h3, h4, h5) + * {
  margin-block-start: calc(var(--spacing) / 3);
}
:is(h1, h2, h3, h4, h5) + :where(h2, h3, h4, h5) {
  margin-block-start: calc(var(--spacing) * 2);
}

/* Line lengths */
blockquote {
  max-width: 50ch;
}
h1 {
  max-width: 24ch;
}
h2,
h3 {
  max-width: 32ch;
}

/* Bear Content */
.title {

  text-decoration: none;
}
.title  h1{
  position: sticky;
  top: 35px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--spacing);
  row-gap: 0;
/*  font-size: 2rem;*/
  margin-top: calc(var(--spacing) / 2);
}
nav {
  position: sticky;
  top: 200px;
}
nav p {
  position: sticky;
  top: 75px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--spacing);
  row-gap: 0;
}

@media screen and (min-width: 1000px) {
  nav p {
    flex-direction: column;
  }
}

ul.blog-posts {
  list-style-type: none;
  padding: unset;
}
ul.blog-posts li {
  display: flex;
  flex-direction: column;
}
@media screen and (min-width: 600px) {
  ul.blog-posts li {
    flex-direction: row;
    gap: calc(var(--spacing) / 2);
  }
}
ul.blog-posts li span {
  min-width: 11ch;
}
time {
  opacity: 0.5;
  font-style: normal;
}
.highlight,
.code {
  padding: 1px var(--spacing);
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
  overflow-x: auto;
  line-height: 1.2;
}
table {
  width: 100%;
}
th {
  text-align: left;
}

hr {
  border-color: rgba(0, 0, 0, 0.1);
}


iframe{
	height: 400px;
    border: 1px solid var(--link-color);
  
}

#cusdis_thread{
    border: 1px solid var(--link-color);

}

Leave a comment! (Or don't, your choice).

#tech