<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>css &amp;mdash; Attach to Process</title>
    <link>https://devblog.dinobansigan.com/tag:css</link>
    <description>Thoughts and Notes on Software Development</description>
    <pubDate>Tue, 21 Apr 2026 16:04:15 +0000</pubDate>
    <image>
      <url>https://i.snap.as/4wmUdb6N.png</url>
      <title>css &amp;mdash; Attach to Process</title>
      <link>https://devblog.dinobansigan.com/tag:css</link>
    </image>
    <item>
      <title>DevNotes - 002</title>
      <link>https://devblog.dinobansigan.com/devnotes-002?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[What is a react helmet? &#xA;&#xA;React helmet is a helper component that allows you to add data to the head section of a document or HTML page. It basically allows you to add link tags, scripts and other tags that goes into the head section of an HTML page.&#xA;&#xA;Source: What is react helmet?&#xA;&#xA;So react-helmet library didn&#39;t work for me, but this one did.&#xA;&#xA;---&#xA;&#xA;The equivalent of the npm install command in yarn is yarn without any parameters.&#xA;&#xA;---&#xA;&#xA;Was trying to help out someone on discuss.write.as get a logo to show up beside their blog title. I learned that you can actually set the size of the background image using something like background-size: 150px;. Cool stuff.&#xA;&#xA;Reference: Resizing background images with background-size&#xA;&#xA;---&#xA;&#xA;So last time I decided to just not show a header image for my Now Listening to... website on mobile screens. It was because I didn&#39;t know how to handle it. Well my easy solution turned out to be getting a smaller sized image to use as a header image. Then I was able to just add a css media screen entry that uses the smaller sized image.&#xA;&#xA;---&#xA;&#xA;Co-worker was running into Gatsby/Kentico/Grahpql errors with one of our projects. We pretty much had the same .env file and code base. Deleting the folder and downloading again didn&#39;t fix it. What worked for him was running the command npm cache clean --force. &#xA;&#xA;Note: &#xA;This is probably a dangerous command to run. Please research what it does before you try it out. I&#39;m only sharing what worked for me and my team. But this was a last resort type of attempt to fix our errors.&#xA;&#xA;---&#xA;&#xA;To create a repository from an existing folder or files using Github Desktop, first you have to create the repository on the app itself. This is so that the app can create and initialize the folder on your drive. Then you can copy over the files into the folder that the app created. And then you&#39;re set.&#xA;&#xA;---&#xA;&#xA;To copy the redirects file (or any other file for that matter) to the Output folder in Wyam, you can use the pipeline code below:&#xA;Pipelines.Add(&#xA;    // Copy redirect file to the output folder&#xA;    CopyFiles(&#34;_redirects&#34;)&#xA;);&#xA;&#xA;---&#xA;&#xA;Tags: #DevNotes #CSS #Gatsby #Github #NodeJS #ReactJS #Wyam #Yarn&#xA;&#xA;a href=&#34;https://remark.as/p/devblog.dinobansigan.com/devnotes-002&#34;Discuss.../a or leave a comment below.]]&gt;</description>
      <content:encoded><![CDATA[<p>What is a react helmet?</p>
<ul><li>React helmet is a helper component that allows you to add data to the <code>&lt;head&gt;</code> section of a document or HTML page. It basically allows you to add <code>&lt;link&gt;</code> tags, <code>&lt;scripts&gt;</code> and other tags that goes into the <code>&lt;head&gt;</code> section of an HTML page.</li></ul>

<p>Source: <a href="https://medium.com/coding17/what-is-react-helmet-e62be15ba63b">What is react helmet?</a></p>

<p>So react-helmet library didn&#39;t work for me, but <a href="https://github.com/staylor/react-helmet-async">this one</a> did.</p>

<hr/>

<p>The equivalent of the <code>npm install</code> command in yarn is <code>yarn</code> without any parameters.</p>

<hr/>

<p>Was trying to help out someone on discuss.write.as get a logo to show up beside their blog title. I learned that you can actually set the size of the background image using something like <code>background-size: 150px;</code>. Cool stuff.</p>

<p>Reference: <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Backgrounds_and_Borders/Resizing_background_images">Resizing background images with background-size</a></p>

<hr/>

<p>So last time I decided to just not show a header image for my <a href="https://nowlisteningto.com/">Now Listening to...</a> website on mobile screens. It was because I didn&#39;t know how to handle it. Well my easy solution turned out to be getting a smaller sized image to use as a header image. Then I was able to just add a css media screen entry that uses the smaller sized image.</p>

<hr/>

<p>Co-worker was running into Gatsby/Kentico/Grahpql errors with one of our projects. We pretty much had the same <code>.env</code> file and code base. Deleting the folder and downloading again didn&#39;t fix it. What worked for him was running the command <code>npm cache clean --force</code>.</p>

<p><em>Note:
This is probably a dangerous command to run. Please research what it does before you try it out. I&#39;m only sharing what worked for me and my team. But this was a last resort type of attempt to fix our errors.</em></p>

<hr/>

<p>To create a repository from an existing folder or files using Github Desktop, first you have to create the repository on the app itself. This is so that the app can create and initialize the folder on your drive. Then you can copy over the files into the folder that the app created. And then you&#39;re set.</p>

<hr/>

<p>To copy the <code>_redirects</code> file (or any other file for that matter) to the Output folder in Wyam, you can use the pipeline code below:</p>

<pre><code class="language-csharp">Pipelines.Add(
    // Copy redirect file to the output folder
    CopyFiles(&#34;_redirects&#34;)
);
</code></pre>

<hr/>

<p><em>Tags: <a href="https://devblog.dinobansigan.com/tag:DevNotes" class="hashtag"><span>#</span><span class="p-category">DevNotes</span></a> <a href="https://devblog.dinobansigan.com/tag:CSS" class="hashtag"><span>#</span><span class="p-category">CSS</span></a> <a href="https://devblog.dinobansigan.com/tag:Gatsby" class="hashtag"><span>#</span><span class="p-category">Gatsby</span></a> <a href="https://devblog.dinobansigan.com/tag:Github" class="hashtag"><span>#</span><span class="p-category">Github</span></a> <a href="https://devblog.dinobansigan.com/tag:NodeJS" class="hashtag"><span>#</span><span class="p-category">NodeJS</span></a> <a href="https://devblog.dinobansigan.com/tag:ReactJS" class="hashtag"><span>#</span><span class="p-category">ReactJS</span></a> <a href="https://devblog.dinobansigan.com/tag:Wyam" class="hashtag"><span>#</span><span class="p-category">Wyam</span></a> <a href="https://devblog.dinobansigan.com/tag:Yarn" class="hashtag"><span>#</span><span class="p-category">Yarn</span></a></em></p>

<p><strong><a href="https://remark.as/p/devblog.dinobansigan.com/devnotes-002">Discuss...</a></strong> or leave a comment below.</p>
]]></content:encoded>
      <guid>https://devblog.dinobansigan.com/devnotes-002</guid>
      <pubDate>Thu, 04 Aug 2022 00:00:00 +0000</pubDate>
    </item>
    <item>
      <title>Attach to Process Write.as Theme</title>
      <link>https://devblog.dinobansigan.com/attach-to-process-write-as-theme?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[I thought I&#39;d share the Custom CSS and JavaScript I use on this Write.as blog. The design is inspired by this Hugo Hello Friend theme I saw on micro.blog.!--more--&#xA;&#xA;Here is the Custom CSS I use on this blog:&#xA;/ Written in 2020 by Riley Walz&#xA;&#xA; This theme is licensed under a Creative Commons Attribution 4.0 &#xA; International License.&#xA;&#xA; You should have received a copy of the license along with this&#xA; work. If not, see http://creativecommons.org/licenses/by/4.0/&#xA;/&#xA;&#xA;.post-title {&#xA;    padding-right: 1em;&#xA;}&#xA;&#xA;.book {&#xA;&#x9;display: none;&#xA;}&#xA;&#xA;.read-more {&#xA;&#x9;display: none;&#xA;}&#xA;&#xA;.h-entry {&#xA;&#x9;justify-content: space-between;&#xA;&#x9;display: flex;&#xA;}&#xA;&#xA;body#collection #wrapper article,&#xA;body#subpage #wrapper article {&#xA;&#x9;margin-bottom: 1em;&#xA;}&#xA;&#xA;.dt-published {&#xA;&#x9;flex-shrink: 0;&#xA;}&#xA;&#xA;@media screen and (max-width: 700px) {&#xA;&#x9;.h-entry {&#xA;&#x9;&#x9;display: block&#xA;&#x9;}&#xA;&#x9;body#collection #wrapper time,&#xA;&#x9;body#subpage #wrapper time {&#xA;&#x9;&#x9;font-size: 0.9em;&#xA;&#x9;}&#xA;&#x9;.post-title {&#xA;&#x9;&#x9;font-size: 1.2rem;&#xA;&#x9;}&#xA;&#x9;body#collection #wrapper article,&#xA;&#x9;body#subpage #wrapper article {&#xA;&#x9;&#x9;margin-bottom: 1.5em;&#xA;&#x9;}&#xA;}&#xA;&#xA;emailsub {&#xA;&#x9;text-align: center;&#xA;&#x9;margin-top: 50px;&#xA;}&#xA;&#xA;/ My own theme changes /&#xA;post article {&#xA;    max-width: 60rem;&#xA;}&#xA;&#xA;body#post header, body#subpage header {&#xA;&#x9;margin-bottom: 1em;&#xA;}&#xA;&#xA;body#post header h1 {&#xA;    font-size: 2em;&#xA;}&#xA;&#xA;body#post pre {&#xA;    margin-bottom: -2.5em;&#xA;}&#xA;&#xA;post-body div.e-content div.contact-form {&#xA;    display: contents;&#xA;    margin-top: -3em;&#xA;}&#xA;&#xA;fnContactEmbed {&#xA;    display: none;&#xA;}&#xA;&#xA;fnContactEmbedIframe {&#xA;&#x9;background: #FAFAD2;&#xA;&#x9;border-radius: 6px;&#xA;}&#xA;&#xA;/ Dark Theme attempt /&#xA;body {&#xA;    font-family: Inter,-apple-system,BlinkMacSystemFont,Roboto,Segoe UI,Helvetica,Arial,sans-serif!important;&#xA;    text-rendering: optimizeLegibility;&#xA;    -webkit-text-size-adjust: 100%;&#xA;    &#xA;    background: #292a2d;&#xA;    /background-secondary: #3b3d42;&#xA;    header: #252627;/&#xA;    color: #a9a9b3;&#xA;    /color-secondary: #73747b;/&#xA;    border-color: #4a4b50;&#xA;}&#xA;#post article.norm, .font.norm, body#collection article.norm, body#subpage article.norm, input#title.norm, pre.norm, span.norm, textarea.norm {&#xA;    font-family: Inter,-apple-system,BlinkMacSystemFont,Roboto,Segoe UI,Helvetica,Arial,sans-serif!important;&#xA;}&#xA;post nav a:not(.home), header nav a {&#xA;    color: #a9a9b3;&#xA;}&#xA;&#xA;body h1 a, body header h2 a, header p.description, .post-title a:link, .post-title a:visited, a, a:visited {&#xA;    color: #a9a9b3;&#xA;}&#xA;body h1 a:hover, body header h2 a:hover, div.e-content p a, div.e-content ul li a {&#xA;    color: #a9a9b3;&#xA;    text-decoration: underline;&#xA;}&#xA;body#post article time.dt-published, body#subpage article time.dt-published {&#xA;    color: #73747b;&#xA;}&#xA;&#xA;subscribe-btn {&#xA;    border: 1px #045FB4;&#xA;    background: #045FB4;&#xA;}&#xA;subscribe-btn:hover {&#xA;    text-shadow: 0px 0px 6px white;&#xA;}&#xA;&#xA;.e-content a.hashtag:link {&#xA;    background-color: #292a2d;&#xA;    border-radius: 7px;&#xA;    border-style: solid;&#xA;    border-color: #a9a9b3;&#xA;    border-width: 1px;&#xA;    padding-left: 10px;&#xA;    padding-right: 10px;&#xA;    padding-top: 2px;&#xA;    padding-bottom: 2px;&#xA;    text-decoration: none;&#xA;&#x9;font-style: normal;&#xA;    line-height: 2em;&#xA;    color: #a9a9b3;&#xA;}&#xA;.e-content a.hashtag:visited {&#xA;    color: #a9a9b3;&#xA;&#x9;text-decoration: none;&#xA;}&#xA;.e-content a.hashtag:hover span + span {&#xA;    text-decoration: none;&#xA;}&#xA;.e-content a.hashtag:hover {&#xA;    background-color: #a9a9b3;&#xA;    border-color: #a9a9b3;&#xA;    color: #292a2d;&#xA;    text-decoration: none;&#xA;}&#xA;&#xA;body footer {&#xA;    text-align: center;&#xA;    padding: 0 2em;&#xA;}&#xA;&#xA;body footer nav {&#xA;    color: #73747b;&#xA;    padding-bottom: 48px;&#xA;    margin-bottom: 0px;&#xA;}&#xA;&#xA;body footer nav a {&#xA;    font-weight: bold;&#xA;    color: #73747b!important;&#xA;    text-decoration: none!important;&#xA;    margin: 0!important;&#xA;}&#xA;body footer nav a:hover {&#xA;    color: #a9a9b3!important;&#xA;    text-decoration: underline!important;&#xA;    margin: 0!important;&#xA;}&#xA;&#xA;body #post code, body#collection code, body#post code, body#subpage code {&#xA;&#x9;font-family: Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;&#xA;&#x9;background: #282c34;&#xA;&#x9;border-color: #3b3d42;&#xA;&#x9;padding: 3px 6px 3px 6px;&#xA;&#x9;margin: 0 2px;&#xA;&#x9;border-radius: 5px;&#xA;&#x9;font-size: .9rem;&#xA;&#x9;font-weight: 400;&#xA;}&#xA;body #post pre, body#collection pre, body#post pre, body#subpage pre {&#xA;    background: #282c34;&#xA;    border: 1px solid #3b3d42;&#xA;}&#xA;&#xA;hyvor-talk-view {&#xA;    margin-top: 1em;&#xA;    margin-bottom: -4em;&#xA;}&#xA;&#xA;/ Hide post views /&#xA;header nav .views {&#xA;    display: none;&#xA;}&#xA;&#xA;/ Hide Stats link /&#xA;nav#manage ul a[href=&#34;/me/c/attach-to-process/stats&#34;],&#xA;nav#manage ul a[href=&#34;/me/c/attach-to-process/subscribers&#34;]{&#xA;  display: none;&#xA;}&#xA;&#xA;/ Highlight.js Atom One Dark Reasonable Theme /&#xA;.hljs {&#xA;&#x9;display: block!important;&#xA;&#x9;overflow-x: auto!important;&#xA;&#x9;padding: .5em!important;&#xA;&#x9;color: #abb2bf!important;&#xA;&#x9;background: #282c34!important;&#xA;}&#xA;&#xA;.hljs-keyword,&#xA;.hljs-operator {&#xA;&#x9;color: #f92672!important;&#xA;}&#xA;&#xA;.hljs-pattern-match {&#xA;&#x9;color: #f92672!important;&#xA;}&#xA;&#xA;.hljs-pattern-match .hljs-constructor {&#xA;&#x9;color: #61aeee!important;&#xA;}&#xA;&#xA;.hljs-function {&#xA;&#x9;color: #61aeee!important;&#xA;}&#xA;&#xA;.hljs-function .hljs-params {&#xA;&#x9;color: #a6e22e!important;&#xA;}&#xA;&#xA;.hljs-function .hljs-params .hljs-typing {&#xA;&#x9;color: #fd971f!important;&#xA;}&#xA;&#xA;.hljs-module-access .hljs-module {&#xA;&#x9;color: #7e57c2!important;&#xA;}&#xA;&#xA;.hljs-constructor {&#xA;&#x9;color: #e2b93d!important;&#xA;}&#xA;&#xA;.hljs-constructor .hljs-string {&#xA;&#x9;color: #9ccc65!important;&#xA;}&#xA;&#xA;.hljs-comment,&#xA;.hljs-quote {&#xA;&#x9;color: #b18eb1!important;&#xA;&#x9;font-style: italic!important;&#xA;}&#xA;&#xA;.hljs-doctag,&#xA;.hljs-formula {&#xA;&#x9;color: #c678dd!important;&#xA;}&#xA;&#xA;.hljs-deletion,&#xA;.hljs-name,&#xA;.hljs-section,&#xA;.hljs-selector-tag,&#xA;.hljs-subst {&#xA;&#x9;color: #e06c75!important;&#xA;}&#xA;&#xA;.hljs-literal {&#xA;&#x9;color: #56b6c2!important;&#xA;}&#xA;&#xA;.hljs-addition,&#xA;.hljs-attribute,&#xA;.hljs-meta-string,&#xA;.hljs-regexp,&#xA;.hljs-string {&#xA;&#x9;color: #98c379!important;&#xA;}&#xA;&#xA;.hljs-builtin,&#xA;.hljs-class .hljs-title {&#xA;&#x9;color: #e6c07b!important;&#xA;}&#xA;&#xA;.hljs-attr,&#xA;.hljs-number,&#xA;.hljs-selector-attr,&#xA;.hljs-selector-class,&#xA;.hljs-selector-pseudo,&#xA;.hljs-template-variable,&#xA;.hljs-type,&#xA;.hljs-variable {&#xA;&#x9;color: #d19a66!important;&#xA;}&#xA;&#xA;.hljs-bullet,&#xA;.hljs-link,&#xA;.hljs-meta,&#xA;.hljs-selector-id,&#xA;.hljs-symbol,&#xA;.hljs-title {&#xA;&#x9;color: #61aeee!important;&#xA;}&#xA;&#xA;.hljs-emphasis {&#xA;&#x9;font-style: italic!important;&#xA;}&#xA;&#xA;.hljs-strong {&#xA;&#x9;font-weight: 700!important;&#xA;}&#xA;&#xA;.hljs-link {&#xA;&#x9;text-decoration: underline!important;&#xA;}&#xA;&#xA;/ Attempt at blink cursor /&#xA;.logocursor {&#xA;    display: inline-block;&#xA;    width: 15px;&#xA;    height: 1.5rem;&#xA;    background: #045FB4;&#xA;    margin-left: 5px;&#xA;    border-radius: 1px;&#xA;    -webkit-animation: cursor 1s infinite;&#xA;    animation: cursor 1s infinite;&#xA;}&#xA;@-webkit-keyframes cursor {&#xA; 0% {&#xA;  opacity:0;&#xA; }&#xA; 50% {&#xA;  opacity:1;&#xA; }&#xA; to {&#xA;  opacity:0;&#xA; }&#xA;}&#xA;@keyframes cursor {&#xA; 0% {&#xA;  opacity:0&#xA; }&#xA; 50% {&#xA;  opacity:1&#xA; }&#xA; to {&#xA;  opacity:0&#xA; }&#xA;}&#xA;Note that I include the attribution to Riley Walz at the top, since I used his theme to get the home page to show up with titles and dates only.&#xA;&#xA;And here is the Custom JavaScript I use on this blog:&#xA;/ Reading Time JS Widget /&#xA;const wpm = 200; // Average reading rate in words per minute (WPM)&#xA;&#xA;let ps = document.querySelectorAll(&#39;p&#39;);&#xA;let wordCount = 0;&#xA;for (var i=0; i&lt;ps.length; i++) {&#xA;&#x9;wordCount += ps[i].innerText.split(/\s+/).length;&#xA;}&#xA;let $time = document.querySelector(&#39;#post-body .dt-published&#39;);&#xA;if ($time) {&#xA;    const minuteToRead = Math.round(wordCount / wpm)   0 ? Math.round(wordCount / wpm) : 1;&#xA;&#x9;$time.style.display = &#39;inline-block&#39;;&#xA;&#x9;$time.insertAdjacentHTML(&#34;afterend&#34;, &#39;span style=&#34;color: #73747b&#34; &amp;middot; &#39; + minuteToRead + &#39; min read/span&#39;);&#xA;}&#xA;&#xA;/ Add blinking cursor to blog title /&#xA;const blogTitle = document.getElementById(&#34;blog-title&#34;);&#xA;const blogTitleChildNodes = blogTitle.childNodes;&#xA;blogTitleChildNodes[0].innerHTML += &#39;span class=&#34;logocursor&#34;/span&#39;;&#xA;&#xA;/ Custom Footer/&#xA;const customFooterHTML = Copyright © 2018 - ${new Date().getFullYear()} by a class=&#34;home pubd&#34; href=&#34;https://dinobansigan.com/&#34; target=&#34;blank&#34;Dino Bansigan/abr /The opinions expressed herein are my own and do not represent those of my employerbr /or any other third-party views in any way.br /This work is licensed under a class=&#34;home pubd&#34; href=&#34;https://creativecommons.org/licenses/by-nc-sa/4.0?ref=chooser-v1&#34; target=&#34;_blank&#34; rel=&#34;license noopener noreferrer&#34; style=&#34;display:inline-block;&#34;CC BY-NC-SA 4.0img style=&#34;height:22px!important;margin-left:3px;vertical-align:text-bottom;&#34; src=&#34;https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1&#34;img style=&#34;height:22px!important;margin-left:3px;vertical-align:text-bottom;&#34; src=&#34;https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1&#34;img style=&#34;height:22px!important;margin-left:3px;vertical-align:text-bottom;&#34; src=&#34;https://mirrors.creativecommons.org/presskit/icons/sa.svg?ref=chooser-v1&#34;img style=&#34;height:22px!important;margin-left:3px;vertical-align:text-bottom;&#34; src=&#34;https://mirrors.creativecommons.org/presskit/icons/nc.svg?ref=chooser-v1&#34;/abr /powered by a class=&#34;home pubd&#34; href=&#34;https://write.as/&#34;write.as/a;&#xA;let x = document.querySelector(&#39;footer&#39;).getElementsByTagName(&#39;nav&#39;)[0];&#xA;x.innerHTML = customFooterHTML;&#xA;Note that I removed the scripts for getting Hyvor Talk comments added to this blog since most people don&#39;t have it. &#xA;&#xA;I also left the custom Footer script intact. So, if you&#39;re going to use it, make sure to modify the values to match your site.&#xA;&#xA;Tags: #CSS #JavaScript #Themes&#xA;&#xA;!--emailsub--&#xA;&#xA;a href=&#34;https://remark.as/p/devblog.dinobansigan.com/attach-to-process-write-as-theme&#34;Discuss.../a or leave a comment below.]]&gt;</description>
      <content:encoded><![CDATA[<p>I thought I&#39;d share the Custom CSS and JavaScript I use on this <a href="https://write.as/">Write.as</a> blog. The design is inspired by this <a href="https://hugo-hello-friend.vercel.app/">Hugo Hello Friend</a> theme I saw on <a href="https://micro.blog/">micro.blog</a>.</p>

<p>Here is the Custom CSS I use on this blog:</p>

<pre><code class="language-css">/* Written in 2020 by Riley Walz

 This theme is licensed under a Creative Commons Attribution 4.0 
 International License.

 You should have received a copy of the license along with this
 work. If not, see http://creativecommons.org/licenses/by/4.0/
*/

.post-title {
    padding-right: 1em;
}

.book {
	display: none;
}

.read-more {
	display: none;
}

.h-entry {
	justify-content: space-between;
	display: flex;
}

body#collection #wrapper article,
body#subpage #wrapper article {
	margin-bottom: 1em;
}

.dt-published {
	flex-shrink: 0;
}

@media screen and (max-width: 700px) {
	.h-entry {
		display: block
	}
	body#collection #wrapper time,
	body#subpage #wrapper time {
		font-size: 0.9em;
	}
	.post-title {
		font-size: 1.2rem;
	}
	body#collection #wrapper article,
	body#subpage #wrapper article {
		margin-bottom: 1.5em;
	}
}

#emailsub {
	text-align: center;
	margin-top: 50px;
}

/*** My own theme changes ***/
#post article {
    max-width: 60rem;
}

body#post header, body#subpage header {
	margin-bottom: 1em;
}

body#post header h1 {
    font-size: 2em;
}

body#post pre {
    margin-bottom: -2.5em;
}

#post-body div.e-content div.contact-form {
    display: contents;
    margin-top: -3em;
}

#fnContactEmbed {
    display: none;
}

#fnContactEmbedIframe {
	background: #FAFAD2;
	border-radius: 6px;
}

/* Dark Theme attempt */
body {
    font-family: Inter,-apple-system,BlinkMacSystemFont,Roboto,Segoe UI,Helvetica,Arial,sans-serif!important;
    text-rendering: optimizeLegibility;
    -webkit-text-size-adjust: 100%;
    
    background: #292a2d;
    /*background-secondary: #3b3d42;
    header: #252627;*/
    color: #a9a9b3;
    /*color-secondary: #73747b;*/
    border-color: #4a4b50;
}
#post article.norm, .font.norm, body#collection article.norm, body#subpage article.norm, input#title.norm, pre.norm, span.norm, textarea.norm {
    font-family: Inter,-apple-system,BlinkMacSystemFont,Roboto,Segoe UI,Helvetica,Arial,sans-serif!important;
}
#post nav a:not(.home), header nav a {
    color: #a9a9b3;
}

body h1 a, body header h2 a, header p.description, .post-title a:link, .post-title a:visited, a, a:visited {
    color: #a9a9b3;
}
body h1 a:hover, body header h2 a:hover, div.e-content p a, div.e-content ul li a {
    color: #a9a9b3;
    text-decoration: underline;
}
body#post article time.dt-published, body#subpage article time.dt-published {
    color: #73747b;
}

#subscribe-btn {
    border: 1px #045FB4;
    background: #045FB4;
}
#subscribe-btn:hover {
    text-shadow: 0px 0px 6px white;
}

.e-content a.hashtag:link {
    background-color: #292a2d;
    border-radius: 7px;
    border-style: solid;
    border-color: #a9a9b3;
    border-width: 1px;
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 2px;
    padding-bottom: 2px;
    text-decoration: none;
	font-style: normal;
    line-height: 2em;
    color: #a9a9b3;
}
.e-content a.hashtag:visited {
    color: #a9a9b3;
	text-decoration: none;
}
.e-content a.hashtag:hover span + span {
    text-decoration: none;
}
.e-content a.hashtag:hover {
    background-color: #a9a9b3;
    border-color: #a9a9b3;
    color: #292a2d;
    text-decoration: none;
}

body footer {
    text-align: center;
    padding: 0 2em;
}

body footer nav {
    color: #73747b;
    padding-bottom: 48px;
    margin-bottom: 0px;
}

body footer nav a {
    font-weight: bold;
    color: #73747b!important;
    text-decoration: none!important;
    margin: 0!important;
}
body footer nav a:hover {
    color: #a9a9b3!important;
    text-decoration: underline!important;
    margin: 0!important;
}

body #post code, body#collection code, body#post code, body#subpage code {
	font-family: Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;
	background: #282c34;
	border-color: #3b3d42;
	padding: 3px 6px 3px 6px;
	margin: 0 2px;
	border-radius: 5px;
	font-size: .9rem;
	font-weight: 400;
}
body #post pre, body#collection pre, body#post pre, body#subpage pre {
    background: #282c34;
    border: 1px solid #3b3d42;
}

#hyvor-talk-view {
    margin-top: 1em;
    margin-bottom: -4em;
}

/* Hide post views */
header nav .views {
    display: none;
}

/* Hide Stats link */
nav#manage ul a[href=&#34;/me/c/attach-to-process/stats&#34;],
nav#manage ul a[href=&#34;/me/c/attach-to-process/subscribers&#34;]{
  display: none;
}

/* Highlight.js Atom One Dark Reasonable Theme */
.hljs {
	display: block!important;
	overflow-x: auto!important;
	padding: .5em!important;
	color: #abb2bf!important;
	background: #282c34!important;
}

.hljs-keyword,
.hljs-operator {
	color: #f92672!important;
}

.hljs-pattern-match {
	color: #f92672!important;
}

.hljs-pattern-match .hljs-constructor {
	color: #61aeee!important;
}

.hljs-function {
	color: #61aeee!important;
}

.hljs-function .hljs-params {
	color: #a6e22e!important;
}

.hljs-function .hljs-params .hljs-typing {
	color: #fd971f!important;
}

.hljs-module-access .hljs-module {
	color: #7e57c2!important;
}

.hljs-constructor {
	color: #e2b93d!important;
}

.hljs-constructor .hljs-string {
	color: #9ccc65!important;
}

.hljs-comment,
.hljs-quote {
	color: #b18eb1!important;
	font-style: italic!important;
}

.hljs-doctag,
.hljs-formula {
	color: #c678dd!important;
}

.hljs-deletion,
.hljs-name,
.hljs-section,
.hljs-selector-tag,
.hljs-subst {
	color: #e06c75!important;
}

.hljs-literal {
	color: #56b6c2!important;
}

.hljs-addition,
.hljs-attribute,
.hljs-meta-string,
.hljs-regexp,
.hljs-string {
	color: #98c379!important;
}

.hljs-built_in,
.hljs-class .hljs-title {
	color: #e6c07b!important;
}

.hljs-attr,
.hljs-number,
.hljs-selector-attr,
.hljs-selector-class,
.hljs-selector-pseudo,
.hljs-template-variable,
.hljs-type,
.hljs-variable {
	color: #d19a66!important;
}

.hljs-bullet,
.hljs-link,
.hljs-meta,
.hljs-selector-id,
.hljs-symbol,
.hljs-title {
	color: #61aeee!important;
}

.hljs-emphasis {
	font-style: italic!important;
}

.hljs-strong {
	font-weight: 700!important;
}

.hljs-link {
	text-decoration: underline!important;
}

/* Attempt at blink cursor */
.logo__cursor {
    display: inline-block;
    width: 15px;
    height: 1.5rem;
    background: #045FB4;
    margin-left: 5px;
    border-radius: 1px;
    -webkit-animation: cursor 1s infinite;
    animation: cursor 1s infinite;
}
@-webkit-keyframes cursor {
 0% {
  opacity:0;
 }
 50% {
  opacity:1;
 }
 to {
  opacity:0;
 }
}
@keyframes cursor {
 0% {
  opacity:0
 }
 50% {
  opacity:1
 }
 to {
  opacity:0
 }
}
</code></pre>

<p><em>Note that I include the attribution to Riley Walz at the top, since I used his theme to get the home page to show up with titles and dates only.</em></p>

<p>And here is the Custom JavaScript I use on this blog:</p>

<pre><code class="language-js">/* Reading Time JS Widget */
const wpm = 200; // Average reading rate in words per minute (WPM)

let ps = document.querySelectorAll(&#39;p&#39;);
let wordCount = 0;
for (var i=0; i&lt;ps.length; i++) {
	wordCount += ps[i].innerText.split(/\s+/).length;
}
let $time = document.querySelector(&#39;#post-body .dt-published&#39;);
if ($time) {
    const minuteToRead = Math.round(wordCount / wpm) &gt; 0 ? Math.round(wordCount / wpm) : 1;
	$time.style.display = &#39;inline-block&#39;;
	$time.insertAdjacentHTML(&#34;afterend&#34;, &#39;&lt;span style=&#34;color: #73747b&#34;&gt; &amp;middot; &#39; + minuteToRead + &#39; min read&lt;/span&gt;&#39;);
}

/* Add blinking cursor to blog title */
const blogTitle = document.getElementById(&#34;blog-title&#34;);
const blogTitleChildNodes = blogTitle.childNodes;
blogTitleChildNodes[0].innerHTML += &#39;&lt;span class=&#34;logo__cursor&#34;&gt;&lt;/span&gt;&#39;;

/* Custom Footer*/
const customFooterHTML = `Copyright © 2018 - ${new Date().getFullYear()} by &lt;a class=&#34;home pubd&#34; href=&#34;https://dinobansigan.com/&#34; target=&#34;_blank&#34;&gt;Dino Bansigan&lt;/a&gt;&lt;br /&gt;The opinions expressed herein are my own and do not represent those of my employer&lt;br /&gt;or any other third-party views in any way.&lt;br /&gt;This work is licensed under &lt;a class=&#34;home pubd&#34; href=&#34;https://creativecommons.org/licenses/by-nc-sa/4.0?ref=chooser-v1&#34; target=&#34;_blank&#34; rel=&#34;license noopener noreferrer&#34; style=&#34;display:inline-block;&#34;&gt;CC BY-NC-SA 4.0&lt;img style=&#34;height:22px!important;margin-left:3px;vertical-align:text-bottom;&#34; src=&#34;https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1&#34;&gt;&lt;img style=&#34;height:22px!important;margin-left:3px;vertical-align:text-bottom;&#34; src=&#34;https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1&#34;&gt;&lt;img style=&#34;height:22px!important;margin-left:3px;vertical-align:text-bottom;&#34; src=&#34;https://mirrors.creativecommons.org/presskit/icons/sa.svg?ref=chooser-v1&#34;&gt;&lt;img style=&#34;height:22px!important;margin-left:3px;vertical-align:text-bottom;&#34; src=&#34;https://mirrors.creativecommons.org/presskit/icons/nc.svg?ref=chooser-v1&#34;&gt;&lt;/a&gt;&lt;br /&gt;powered by &lt;a class=&#34;home pubd&#34; href=&#34;https://write.as/&#34;&gt;write.as&lt;/a&gt;`;
let x = document.querySelector(&#39;footer&#39;).getElementsByTagName(&#39;nav&#39;)[0];
x.innerHTML = customFooterHTML;
</code></pre>

<p>Note that I removed the scripts for getting Hyvor Talk comments added to this blog since most people don&#39;t have it.</p>

<p>I also left the custom Footer script intact. So, if you&#39;re going to use it, make sure to modify the values to match your site.</p>

<p><em>Tags: <a href="https://devblog.dinobansigan.com/tag:CSS" class="hashtag"><span>#</span><span class="p-category">CSS</span></a> <a href="https://devblog.dinobansigan.com/tag:JavaScript" class="hashtag"><span>#</span><span class="p-category">JavaScript</span></a> <a href="https://devblog.dinobansigan.com/tag:Themes" class="hashtag"><span>#</span><span class="p-category">Themes</span></a></em></p>



<p><strong><a href="https://remark.as/p/devblog.dinobansigan.com/attach-to-process-write-as-theme">Discuss...</a></strong> or leave a comment below.</p>
]]></content:encoded>
      <guid>https://devblog.dinobansigan.com/attach-to-process-write-as-theme</guid>
      <pubDate>Mon, 21 Feb 2022 17:59:41 +0000</pubDate>
    </item>
    <item>
      <title>How to add Responsive &#34;Last Updated Date&#34; to Pinned Pages on Write.as</title>
      <link>https://devblog.dinobansigan.com/responsive-date-writeas-pinned-pages?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[On some of the pinned pages on my journal, I added a &#34;Last Updated Date&#34; value right under the title. I did it using a span element, like this:&#xA;&#xA;Archive📜&#xA;&#xA;span class=&#34;lastUpdatedDate&#34;Last Updated: 2021-03-17/span&#xA;&#xA;Now, instead of having it show up under the title all the time, I also wanted it to show up to the right of the title, if the screen was wide enough. &#xA;&#xA;So, if the page is being viewed on a wide screen, like on a desktop computer, the &#34;Last Updated Date&#34; will show up on the right side. If the page is being viewed on a small screen, like on a mobile phone, the &#34;Last Updated Date&#34; will show up under the title.  &#xA;&#xA;Here is how I made it responsive using Custom CSS:&#xA;&#xA;span.lastUpdatedDate {&#xA;   font-size: 0.7em; &#xA;   color: silver; &#xA;}&#xA;@media screen and (min-width: 480px) {&#xA;   span.lastUpdatedDate {&#xA;      float: right; &#xA;      margin-top: -4em; &#xA;      margin-bottom: -4em;&#xA;   }&#xA;}&#xA;@media screen and (max-width: 479px) {&#xA;   span.lastUpdatedDate {&#xA;      margin-top: -2em;&#xA;      padding-bottom: 2em;&#xA;      display: block;&#xA;   }&#xA;}&#xA;&#xA;Here is what it looks like on a wide screen:&#xA;Last Updated Date showing up on the right side of the title.&#xA;&#xA;Here is what it looks like on a mobile phone:&#xA;Last Updated Date showing up under the title on a small screen.&#xA;&#xA;If you know of an easier way to do this with less CSS, please let know in the comments below. Or you can do so privately by leaving me a message.&#xA;&#xA;Tags: #HowTo #CSS #WriteAs&#xA;&#xA;!--emailsub--&#xA;&#xA;a href=&#34;https://remark.as/p/devblog.dinobansigan.com/responsive-date-writeas-pinned-pages&#34;Discuss.../a or leave a comment below.]]&gt;</description>
      <content:encoded><![CDATA[<p>On <a href="https://journal.dinobansigan.com/archive">some</a> of the pinned pages on my <a href="https://journal.dinobansigan.com/">journal</a>, I added a <em>“Last Updated Date”</em> value right under the title. I did it using a <code>span</code> element, like this:</p>

<pre><code class="language-md"># Archive📜

&lt;span class=&#34;lastUpdatedDate&#34;&gt;Last Updated: 2021-03-17&lt;/span&gt;
</code></pre>

<p>Now, instead of having it show up under the title all the time, I also wanted it to show up to the right of the title, if the screen was wide enough.</p>

<p>So, if the page is being viewed on a wide screen, like on a desktop computer, the <em>“Last Updated Date”</em> will show up on the right side. If the page is being viewed on a small screen, like on a mobile phone, the <em>“Last Updated Date”</em> will show up under the title.</p>

<p>Here is how I made it responsive using Custom CSS:</p>

<pre><code class="language-css">span.lastUpdatedDate {
   font-size: 0.7em; 
   color: silver; 
}
@media screen and (min-width: 480px) {
   span.lastUpdatedDate {
      float: right; 
      margin-top: -4em; 
      margin-bottom: -4em;
   }
}
@media screen and (max-width: 479px) {
   span.lastUpdatedDate {
      margin-top: -2em;
      padding-bottom: 2em;
      display: block;
   }
}
</code></pre>

<p>Here is what it looks like on a wide screen:
<img src="https://i.snap.as/XmHMe4tj.png" alt="Last Updated Date showing up on the right side of the title."/></p>

<p>Here is what it looks like on a mobile phone:
<img src="https://i.snap.as/7OXxRJdU.png" alt="Last Updated Date showing up under the title on a small screen."/></p>

<p>If you know of an easier way to do this with less CSS, please let know in the comments below. Or you can do so privately by <a href="https://devblog.dinobansigan.com/contact">leaving me a message</a>.</p>

<p><em>Tags: <a href="https://devblog.dinobansigan.com/tag:HowTo" class="hashtag"><span>#</span><span class="p-category">HowTo</span></a> <a href="https://devblog.dinobansigan.com/tag:CSS" class="hashtag"><span>#</span><span class="p-category">CSS</span></a> <a href="https://devblog.dinobansigan.com/tag:WriteAs" class="hashtag"><span>#</span><span class="p-category">WriteAs</span></a></em></p>



<p><strong><a href="https://remark.as/p/devblog.dinobansigan.com/responsive-date-writeas-pinned-pages">Discuss...</a></strong> or leave a comment below.</p>
]]></content:encoded>
      <guid>https://devblog.dinobansigan.com/responsive-date-writeas-pinned-pages</guid>
      <pubDate>Fri, 21 May 2021 17:30:00 +0000</pubDate>
    </item>
    <item>
      <title>Hide HTML Element Without Taking Up Space</title>
      <link>https://devblog.dinobansigan.com/hide-html-element-without-taking-up-space?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[Most of the time, using display: none; is all you need to hide an HTML element. But every once in awhile, doing so will hide the element, but would not reclaim the space the element would have been occupying.&#xA;&#xA;To hide an HTML element and not have it take up space, you can do something like this:&#xA;&#xA;post-signature-hidden {&#xA;    max-height: 0;&#xA;    margin-top: -3em;&#xA;    visibility: hidden;&#xA;}&#xA;&#xA;In case you&#39;re wondering, that&#39;s the CSS I use to stop my Post Signatures from showing up on the pinned pages on my journal.&#xA;&#xA;Tags: #HTML #CSS&#xA;&#xA;a href=&#34;https://remark.as/p/devblog.dinobansigan.com/hide-html-element-without-taking-up-space&#34;Discuss.../a or leave a comment below.]]&gt;</description>
      <content:encoded><![CDATA[<p>Most of the time, using <code>display: none;</code> is all you need to hide an HTML element. But every once in awhile, doing so will hide the element, but would not reclaim the space the element would have been occupying.</p>

<p>To hide an HTML element and not have it take up space, you can do something like this:</p>

<pre><code class="language-css">#post-signature-hidden {
    max-height: 0;
    margin-top: -3em;
    visibility: hidden;
}
</code></pre>

<p>In case you&#39;re wondering, that&#39;s the CSS I use to stop my <em>Post Signatures</em> from showing up on the pinned pages on my <a href="https://journal.dinobansigan.com/">journal</a>.</p>

<p><em>Tags: <a href="https://devblog.dinobansigan.com/tag:HTML" class="hashtag"><span>#</span><span class="p-category">HTML</span></a> <a href="https://devblog.dinobansigan.com/tag:CSS" class="hashtag"><span>#</span><span class="p-category">CSS</span></a></em></p>

<p><strong><a href="https://remark.as/p/devblog.dinobansigan.com/hide-html-element-without-taking-up-space">Discuss...</a></strong> or leave a comment below.</p>
]]></content:encoded>
      <guid>https://devblog.dinobansigan.com/hide-html-element-without-taking-up-space</guid>
      <pubDate>Tue, 19 Jan 2021 02:00:00 +0000</pubDate>
    </item>
    <item>
      <title>How to Customize the Footer on a Write.as Website</title>
      <link>https://devblog.dinobansigan.com/how-to-customize-the-footer-on-a-write-as-website?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[There are two ways that I know of to customize the footer on a Write.as website. The first one is through CSS and the second one is through JavaScript. I&#39;ll go through those two options in this post.&#xA;&#xA;Option 1: CSS&#xA;&#xA;I got this idea of customizing the footer via CSS after looking at Robert Xu&#39;s Write.as powered site. It puzzled me that I could not highlight the text in the footer. After viewing the page source, I finally figured out that it was CSS trickery. &#xA;&#xA;So, anyway here we are. To customize the footer using CSS, all you need to do is modify the following CSS script, then add it to the Custom CSS settings for your website.&#xA;footer nav::before {&#xA;    content: &#34;Copyright © 2020 - 2021 by Your Name \A&#34;;&#xA;    white-space: pre-wrap;&#xA;}&#xA;!--more--&#xA;Note the \A at the end of the content value. That basically functions like a line break (br /) in HTML. Without that, the content value will show up to the left of the &#34;published with write.as&#34; footer text. With \A in place, the content value will show up above the &#34;published with write.as&#34; footer text.&#xA;&#xA;That also means that through the use of \A, you can add however many lines of text you want into your footer.&#xA;&#xA;So, the main thing I like about using CSS for a customized footer, is that even if JavaScript is disabled on the browser, it will still work. If all you really want is to display some text on the footer, this is the best option in my opinion.&#xA;&#xA;Now the thing that I don&#39;t like about it, is that it doesn&#39;t allow you to add hyperlinks in your footer. If you want to do that, then you have to use JavaScript.&#xA;&#xA;hr class=&#34;sb&#34;/&#xA;&#xA;Option 2: JavaScript&#xA;&#xA;As I mentioned above, one of the reasons to go with JavaScript for a customized footer, is that it allows you to add hyperlinks as part of the footer content. This means that you can add links to other websites, or to a license, etc...&#xA;&#xA;To customize the footer using JavaScript, modify the contents of the customFooterHTML variable below, then copy and add the JavaScript code to the Custom Javascript settings for your website.&#xA;/ Custom Footer/&#xA;var customFooterHTML = &#39;Copyright © 2019 - 2021 by a class=&#34;home pubd&#34; href=&#34;WebsiteUrl&#34; target=&#34;_blank&#34;Your Name/abr /The opinions expressed herein are my own and do not represent those of my employerbr /or any other third-party views in any way.br /published with a class=&#34;home pubd&#34; href=&#34;https://write.as/&#34;write.as/a&#39;;&#xA;&#xA;var x = document.querySelector(&#39;footer&#39;).getElementsByTagName(&#39;nav&#39;)[0];&#xA;x.innerHTML = customFooterHTML;&#xA;span class=&#34;imageCaption&#34;For an example of this customized footer in action, scroll to the bottom of this page./span&#xA;&#xA;Note that I added class=&#34;home pubd&#34; to my links (anchor elements). home and pubd are Write.as classes that have their own specific styling. I added them so that I won&#39;t run into padding issues in the footer. This also means that you can put in other class names that you can style via your own Custom CSS settings.&#xA;&#xA;Also note that instead of using \A to force a line break, I use the regular HTML br / line break. This is one of the benefits of going with the JavaScript approach. You are pretty much working with HTML at this point. This also means that you can put any valid HTML elements in there.&#xA;&#xA;Lastly, note that I also added published with a class=&#34;home pubd&#34; href=&#34;https://write.as/&#34;write.as/a as part of the value for customFooterHTML. That&#39;s because with this approach, you are replacing the content of the footer with the content inside the customFooterHTML variable. So, if I don&#39;t add it, that text won&#39;t show up. &#xA;&#xA;Maybe that&#39;s something you don&#39;t want to include in the first place. If that&#39;s the case, then you can simply exclude it from the value of the  customFooterHTML variable.&#xA;&#xA;So, you already know what I like about this approach -- the ability to use HTML and add hyperlinks. What about drawbacks? &#xA;&#xA;Well, since this is done via the Custom Javascript settings for your website, if one of the scripts in there runs into an error, it is possible that your footer won&#39;t be rendered. Also, if someone is viewing your website on a browser with JavaScript disabled, then your footer also won&#39;t show up. It&#39;s not that big of a deal, but something to keep in mind when using this approach.&#xA;&#xA;Tags: #HowTo #WriteAs #CSS #JavaScript&#xA;&#xA;a href=&#34;https://remark.as/p/devblog.dinobansigan.com/how-to-customize-the-footer-on-a-write-as-website&#34;Discuss.../a or leave a comment below.]]&gt;</description>
      <content:encoded><![CDATA[<p>There are two ways that I know of to customize the footer on a <a href="https://write.as/">Write.as</a> website. The first one is through CSS and the second one is through JavaScript. I&#39;ll go through those two options in this post.</p>

<h3 id="option-1-css" id="option-1-css">Option 1: CSS</h3>

<p>I got this idea of customizing the footer via CSS after looking at <a href="https://robxu9.com/">Robert Xu&#39;s</a> Write.as powered site. It puzzled me that I could not highlight the text in the footer. After viewing the page source, I finally figured out that it was CSS trickery.</p>

<p>So, anyway here we are. To customize the footer using CSS, all you need to do is modify the following CSS script, then add it to the Custom CSS settings for your website.</p>

<pre><code class="language-css">footer nav::before {
    content: &#34;Copyright © 2020 - 2021 by Your Name \A&#34;;
    white-space: pre-wrap;
}
</code></pre>



<p>Note the <code>\A</code> at the end of the <code>content</code> value. That basically functions like a line break (<code>&lt;br /&gt;</code>) in HTML. Without that, the content value will show up to the left of the “published with write.as” footer text. With <code>\A</code> in place, the content value will show up above the “published with write.as” footer text.</p>

<p>That also means that through the use of <code>\A</code>, you can add however many lines of text you want into your footer.</p>

<p>So, the main thing I like about using CSS for a customized footer, is that even if JavaScript is disabled on the browser, it will still work. If all you really want is to display some text on the footer, this is the best option in my opinion.</p>

<p>Now the thing that I don&#39;t like about it, is that it doesn&#39;t allow you to add hyperlinks in your footer. If you want to do that, then you have to use JavaScript.</p>

<hr class="sb"/>

<h3 id="option-2-javascript" id="option-2-javascript">Option 2: JavaScript</h3>

<p>As I mentioned above, one of the reasons to go with JavaScript for a customized footer, is that it allows you to add hyperlinks as part of the footer content. This means that you can add links to other websites, or to a license, etc...</p>

<p>To customize the footer using JavaScript, modify the contents of the <code>customFooterHTML</code> variable below, then copy and add the JavaScript code to the Custom Javascript settings for your website.</p>

<pre><code class="language-js">/* Custom Footer*/
var customFooterHTML = &#39;Copyright © 2019 - 2021 by &lt;a class=&#34;home pubd&#34; href=&#34;WebsiteUrl&#34; target=&#34;_blank&#34;&gt;Your Name&lt;/a&gt;&lt;br /&gt;The opinions expressed herein are my own and do not represent those of my employer&lt;br /&gt;or any other third-party views in any way.&lt;br /&gt;published with &lt;a class=&#34;home pubd&#34; href=&#34;https://write.as/&#34;&gt;write.as&lt;/a&gt;&#39;;

var x = document.querySelector(&#39;footer&#39;).getElementsByTagName(&#39;nav&#39;)[0];
x.innerHTML = customFooterHTML;
</code></pre>

<p><span class="imageCaption">For an example of this customized footer in action, scroll to the bottom of this page.</span></p>

<p>Note that I added <code>class=&#34;home pubd&#34;</code> to my links (anchor elements). <code>home</code> and <code>pubd</code> are Write.as classes that have their own specific styling. I added them so that I won&#39;t run into padding issues in the footer. This also means that you can put in other class names that you can style via your own Custom CSS settings.</p>

<p>Also note that instead of using <code>\A</code> to force a line break, I use the regular HTML <code>&lt;br /&gt;</code> line break. This is one of the benefits of going with the JavaScript approach. You are pretty much working with HTML at this point. This also means that you can put any valid HTML elements in there.</p>

<p>Lastly, note that I also added <code>published with &lt;a class=&#34;home pubd&#34; href=&#34;https://write.as/&#34;&gt;write.as&lt;/a&gt;</code> as part of the value for <code>customFooterHTML</code>. That&#39;s because with this approach, you are replacing the content of the footer with the content inside the <code>customFooterHTML</code> variable. So, if I don&#39;t add it, that text won&#39;t show up.</p>

<p><em>Maybe that&#39;s something you don&#39;t want to include in the first place. If that&#39;s the case, then you can simply exclude it from the value of the  <code>customFooterHTML</code> variable.</em></p>

<p>So, you already know what I like about this approach — the ability to use HTML and add hyperlinks. What about drawbacks?</p>

<p>Well, since this is done via the Custom Javascript settings for your website, if one of the scripts in there runs into an error, it is possible that your footer won&#39;t be rendered. Also, if someone is viewing your website on a browser with JavaScript disabled, then your footer also won&#39;t show up. It&#39;s not that big of a deal, but something to keep in mind when using this approach.</p>

<p><em>Tags: <a href="https://devblog.dinobansigan.com/tag:HowTo" class="hashtag"><span>#</span><span class="p-category">HowTo</span></a> <a href="https://devblog.dinobansigan.com/tag:WriteAs" class="hashtag"><span>#</span><span class="p-category">WriteAs</span></a> <a href="https://devblog.dinobansigan.com/tag:CSS" class="hashtag"><span>#</span><span class="p-category">CSS</span></a> <a href="https://devblog.dinobansigan.com/tag:JavaScript" class="hashtag"><span>#</span><span class="p-category">JavaScript</span></a></em></p>

<p><strong><a href="https://remark.as/p/devblog.dinobansigan.com/how-to-customize-the-footer-on-a-write-as-website">Discuss...</a></strong> or leave a comment below.</p>
]]></content:encoded>
      <guid>https://devblog.dinobansigan.com/how-to-customize-the-footer-on-a-write-as-website</guid>
      <pubDate>Sat, 16 Jan 2021 00:00:00 +0000</pubDate>
    </item>
    <item>
      <title>How to Embed Responsive YouTube Videos on Write.as</title>
      <link>https://devblog.dinobansigan.com/how-to-embed-responsive-youtube-videos-on-write-as?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[Updated: 4/26/2021&#xA;&#xA;Coney complained to me this morning that the YouTube videos on my latest music log entry were getting cut off when viewed from her phone. I&#39;ve known about this issue for awhile, but didn&#39;t really try to find a solution for it. Well, today I did and it turns out to be really easy.&#xA;&#xA;The issue stems from the fact that I have to use iframes to embed videos on write.as sites. To make the YouTube videos I embed on write.as sites responsive, I simply followed the instructions from this Responsive Youtube Embed post. Specifically, these are the changes I added to my journal.&#xA;!--more--&#xA;&#xA;Custom CSS&#xA;I added the following Custom CSS:&#xA;/ Responsive Video Container /&#xA;.video-container {&#xA;    position: relative;&#xA;    padding-bottom: 56.25%;&#xA;    padding-top: 30px; height: 0; overflow: hidden;&#xA;}&#xA; &#xA;.video-container iframe,&#xA;.video-container object,&#xA;.video-container embed {&#xA;    position: absolute;&#xA;    top: 0;&#xA;    left: 0;&#xA;    width: 100%;&#xA;    height: 100%;&#xA;}&#xA;&#xA;HTML Changes&#xA;And on my posts where I embedded YouTube videos, I simply wrapped the iframe element with a div element that had a class attribute value of &#34;video-container&#34;, like this:&#xA;div class=&#34;video-container&#34;iframe width=&#34;560&#34; height=&#34;315&#34; src=&#34;https://www.youtube-nocookie.com/embed/nJS5VpoGbc4&#34; frameborder=&#34;0&#34; allowfullscreen=&#34;&#34;/iframe/div&#xA;&#xA;With those changes in place, I have found that the YouTube videos I embedded on my posts will shrink down to match the size of the screen on a mobile phone, or will expand to match the width of the text on a post when viewed on a desktop browser. Pretty cool.&#xA;&#xA;Tags: #HowTo #HTML #CSS #WriteAs&#xA;&#xA;a href=&#34;https://remark.as/p/devblog.dinobansigan.com/how-to-embed-responsive-youtube-videos-on-write-as&#34;Discuss.../a or leave a comment below.]]&gt;</description>
      <content:encoded><![CDATA[<p><em>Updated: 4/26/2021</em></p>

<p>Coney complained to me this morning that the YouTube videos on my latest <a href="https://journal.dinobansigan.com/music-log-025">music log entry</a> were getting cut off when viewed from her phone. I&#39;ve known about this issue for awhile, but didn&#39;t really try to find a solution for it. Well, today I did and it turns out to be really easy.</p>

<p>The issue stems from the fact that I have to use iframes to embed videos on <a href="https://write.as/">write.as</a> sites. To make the YouTube videos I embed on write.as sites responsive, I simply followed the instructions from this <a href="https://avexdesigns.com/responsive-youtube-embed/">Responsive Youtube Embed</a> post. Specifically, these are the changes I added to my <a href="https://journal.dinobansigan.com/">journal</a>.
</p>

<h4 id="custom-css" id="custom-css">Custom CSS</h4>

<p>I added the following Custom CSS:</p>

<pre><code class="language-css">/* Responsive Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    padding-top: 30px; height: 0; overflow: hidden;
}
 
.video-container iframe,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
</code></pre>

<h4 id="html-changes" id="html-changes">HTML Changes</h4>

<p>And on my posts where I embedded YouTube videos, I simply wrapped the iframe element with a div element that had a class attribute value of “video-container”, like this:</p>

<pre><code class="language-html">&lt;div class=&#34;video-container&#34;&gt;&lt;iframe width=&#34;560&#34; height=&#34;315&#34; src=&#34;https://www.youtube-nocookie.com/embed/nJS5VpoGbc4&#34; frameborder=&#34;0&#34; allowfullscreen=&#34;&#34;&gt;&lt;/iframe&gt;&lt;/div&gt;
</code></pre>

<p>With those changes in place, I have found that the YouTube videos I embedded on my posts will shrink down to match the size of the screen on a mobile phone, or will expand to match the width of the text on a post when viewed on a desktop browser. Pretty cool.</p>

<p><em>Tags: <a href="https://devblog.dinobansigan.com/tag:HowTo" class="hashtag"><span>#</span><span class="p-category">HowTo</span></a> <a href="https://devblog.dinobansigan.com/tag:HTML" class="hashtag"><span>#</span><span class="p-category">HTML</span></a> <a href="https://devblog.dinobansigan.com/tag:CSS" class="hashtag"><span>#</span><span class="p-category">CSS</span></a> <a href="https://devblog.dinobansigan.com/tag:WriteAs" class="hashtag"><span>#</span><span class="p-category">WriteAs</span></a></em></p>

<p><strong><a href="https://remark.as/p/devblog.dinobansigan.com/how-to-embed-responsive-youtube-videos-on-write-as">Discuss...</a></strong> or leave a comment below.</p>
]]></content:encoded>
      <guid>https://devblog.dinobansigan.com/how-to-embed-responsive-youtube-videos-on-write-as</guid>
      <pubDate>Sun, 19 Apr 2020 18:07:39 +0000</pubDate>
    </item>
  </channel>
</rss>