feat: format

This commit is contained in:
Barrett Ruth 2025-04-15 12:59:54 -04:00
parent d4bc054293
commit 8d320b8c1c
10 changed files with 20039 additions and 28 deletions

View file

@ -43,6 +43,7 @@
</div>
</main>
<footer>
<span class="greek-delta">&Delta;</span>
<div class="footer-links">
<a target="_blank" href="https://github.com/barrett-ruth/">GitHub</a>
<a target="_blank" href="https://www.linkedin.com/in/barrett-ruth/"

View file

@ -55,7 +55,9 @@
thinking about troublesome aspects of the problem that I
<i>know</i> I'll have to face later. Going into problems with a
plan makes things much easier when coding but much harder up
front. It is easy (for me) to get lost in the black-boxing four layers deep. Write it out, visualize it, and practice practice practice.
front. It is easy (for me) to get lost in the black-boxing four
layers deep. Write it out, visualize it, and practice practice
practice.
<blockquote>
Considering my solution would've led to me uncover my core
misinterpretation of the problem:

18508
public/d3.js vendored

File diff suppressed because one or more lines are too long

View file

@ -9,7 +9,7 @@ code[class*="language-"] {
color: #24292f;
font-size: 13px;
text-shadow: none;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
direction: ltr;
text-align: left;
white-space: pre;
@ -39,13 +39,13 @@ code[class*="language-"]::mozselection {
}
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
margin: 0.5em 0;
overflow: auto;
background: #f4f4f4;
}
:not(pre) > code[class*="language-"] {
padding: .1em .3em;
border-radius: .3em;
padding: 0.1em 0.3em;
border-radius: 0.3em;
color: #24292f;
background: #eff1f3;
}
@ -72,7 +72,7 @@ pre[class*="language-"] > code[class*="language-"] {
}
/* Tokens */
.namespace {
opacity: .7;
opacity: 0.7;
}
.token.comment,
.token.prolog,

View file

@ -1,4 +1,136 @@
/* PrismJS 1.29.0
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+bash+c+cpp+css-extras+python&plugins=highlight-keywords+inline-color */
code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:#b3d4fc}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.token.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}
span.inline-color-wrapper{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyIDIiPjxwYXRoIGZpbGw9ImdyYXkiIGQ9Ik0wIDBoMnYySDB6Ii8+PHBhdGggZmlsbD0id2hpdGUiIGQ9Ik0wIDBoMXYxSDB6TTEgMWgxdjFIMXoiLz48L3N2Zz4=);background-position:center;background-size:110%;display:inline-block;height:1.333ch;width:1.333ch;margin:0 .333ch;box-sizing:border-box;border:1px solid #fff;outline:1px solid rgba(0,0,0,.5);overflow:hidden}span.inline-color{display:block;height:120%;width:120%}
code[class*="language-"],
pre[class*="language-"] {
color: #000;
background: 0 0;
text-shadow: 0 1px #fff;
font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
font-size: 1em;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
code[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection,
pre[class*="language-"] ::-moz-selection,
pre[class*="language-"]::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}
code[class*="language-"] ::selection,
code[class*="language-"]::selection,
pre[class*="language-"] ::selection,
pre[class*="language-"]::selection {
text-shadow: none;
background: #b3d4fc;
}
@media print {
code[class*="language-"],
pre[class*="language-"] {
text-shadow: none;
}
}
pre[class*="language-"] {
padding: 1em;
margin: 0.5em 0;
overflow: auto;
}
:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background: #f5f2f0;
}
:not(pre) > code[class*="language-"] {
padding: 0.1em;
border-radius: 0.3em;
white-space: normal;
}
.token.cdata,
.token.comment,
.token.doctype,
.token.prolog {
color: #708090;
}
.token.punctuation {
color: #999;
}
.token.namespace {
opacity: 0.7;
}
.token.boolean,
.token.constant,
.token.deleted,
.token.number,
.token.property,
.token.symbol,
.token.tag {
color: #905;
}
.token.attr-name,
.token.builtin,
.token.char,
.token.inserted,
.token.selector,
.token.string {
color: #690;
}
.language-css .token.string,
.style .token.string,
.token.entity,
.token.operator,
.token.url {
color: #9a6e3a;
background: hsla(0, 0%, 100%, 0.5);
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}
.token.class-name,
.token.function {
color: #dd4a68;
}
.token.important,
.token.regex,
.token.variable {
color: #e90;
}
.token.bold,
.token.important {
font-weight: 700;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
span.inline-color-wrapper {
background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyIDIiPjxwYXRoIGZpbGw9ImdyYXkiIGQ9Ik0wIDBoMnYySDB6Ii8+PHBhdGggZmlsbD0id2hpdGUiIGQ9Ik0wIDBoMXYxSDB6TTEgMWgxdjFIMXoiLz48L3N2Zz4=);
background-position: center;
background-size: 110%;
display: inline-block;
height: 1.333ch;
width: 1.333ch;
margin: 0 0.333ch;
box-sizing: border-box;
border: 1px solid #fff;
outline: 1px solid rgba(0, 0, 0, 0.5);
overflow: hidden;
}
span.inline-color {
display: block;
height: 120%;
width: 120%;
}

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,100 @@
const TERMINAL_PROMPT = "barrett@ruth:~$ ";
let clearing = false;
document.addEventListener("DOMContentLoaded", function () {
const header = document.querySelector("header");
if (header) {
let headerLinks = header.querySelector(".header-links");
if (!headerLinks) {
headerLinks = document.createElement("div");
headerLinks.className = "header-links";
header.appendChild(headerLinks);
}
headerLinks.innerHTML = "";
const resumeLink = document.createElement("a");
resumeLink.href = "/public/resume.pdf";
resumeLink.target = "_blank";
resumeLink.textContent = "Resume";
headerLinks.appendChild(resumeLink);
const transcriptLink = document.createElement("a");
transcriptLink.href = "/public/transcript.pdf";
transcriptLink.target = "_blank";
transcriptLink.textContent = "Transcript";
headerLinks.appendChild(transcriptLink);
const aboutLink = document.createElement("a");
aboutLink.href = "/about.html";
aboutLink.textContent = "About";
headerLinks.appendChild(aboutLink);
}
const existingFooter = document.querySelector("footer");
if (existingFooter) {
existingFooter.remove();
}
const footer = document.createElement("footer");
const deltaSpan = document.createElement("span");
deltaSpan.className = "greek-delta";
deltaSpan.innerHTML = "&Delta;";
const footerLinks = document.createElement("div");
footerLinks.className = "footer-links";
const githubLink = document.createElement("a");
githubLink.href = "https://github.com/barrett-ruth/";
githubLink.target = "_blank";
githubLink.textContent = "GitHub";
footerLinks.appendChild(githubLink);
const linkedinLink = document.createElement("a");
linkedinLink.href = "https://www.linkedin.com/in/barrett-ruth/";
linkedinLink.target = "_blank";
linkedinLink.textContent = "LinkedIn";
footerLinks.appendChild(linkedinLink);
const emailLink = document.createElement("a");
emailLink.href = "mailto:br.barrettruth@gmail.com";
emailLink.target = "_blank";
emailLink.textContent = "Email";
footerLinks.appendChild(emailLink);
footer.appendChild(deltaSpan);
footer.appendChild(footerLinks);
document.body.appendChild(footer);
if (!document.querySelector("style#dynamic-styles")) {
const style = document.createElement("style");
style.id = "dynamic-styles";
style.innerHTML = `
footer {
padding: 20px;
font-size: 1.5em;
display: flex;
align-items: center;
justify-content: space-between;
}
.greek-delta {
font-family: "Times New Roman", Times, serif;
font-size: 1.5em;
}
.header-links a,
.footer-links a {
margin-left: 25px;
text-decoration: none;
}
`;
document.head.appendChild(style);
}
});
function clearPrompt(delay, callback) {
if (clearing) return;
clearing = true;

View file

@ -18,7 +18,10 @@ const postMapping = new Map([
[
"Algorithms",
[
{ name: "competitive programming log", link: "competitive-programming-log" },
{
name: "competitive programming log",
link: "competitive-programming-log",
},
{ name: "leetcode daily", link: "leetcode-daily" },
{ name: "practice makes perfect", link: "practice-makes-perfect" },
],

View file

@ -49,11 +49,8 @@ li {
}
.graph-background {
background-image: linear-gradient(
to right,
rgba(200, 200, 200, 0.4) 1px,
transparent 1px
),
background-image:
linear-gradient(to right, rgba(200, 200, 200, 0.4) 1px, transparent 1px),
linear-gradient(to bottom, rgba(200, 200, 200, 0.4) 1px, transparent 1px);
background-size: 3vw 3vw;
}

View file

@ -15,7 +15,7 @@ header {
justify-content: space-between;
}
footer {
justify-content: flex-end;
justify-content: space-between;
}
.main {
@ -28,6 +28,11 @@ footer {
margin-left: 25px;
}
.greek-delta {
font-family: "Times New Roman", Times, serif;
font-size: 1.5em;
}
ul {
list-style: none;
margin: 0;