A collection of themes for your Write.as & WriteFreely blog

Dino's Journal


Copy Theme

CSS

/* 
   Written in 2020 by Dino Bansigan

   To the extent possible under law, the author(s) have dedicated all 
   copyright and related and neighboring rights to this software to the 
   public domain worldwide. This software is distributed without any 
   warranty.

   You should have received a copy of the CC0 Public Domain Dedication 
   along with this software. If not, see 
   http://creativecommons.org/publicdomain/zero/1.0
*/

body {
    font-size-adjust: .5;
    background-color: #fff;
    color: #585858;
}

body footer {
    text-align: center;
    padding: 0 2em;
    background-color: #f6f6f6;
}

body footer nav {
    color: #444;
    background-color: #f6f6f6;
    padding-bottom: 48px;
    margin-bottom: 0px;
}

#blog-title a:hover { 
    color: #045FB4;
}

.post-title a:hover {
    color: #045FB4;
}

#post nav a:not(.home):hover, header nav a:hover {
    text-decoration: underline;
    color: #045FB4;
}

body#collection a.read-more, body#subpage a.read-more {
    color: #fff;
}

#collection a.read-more, #subpage a.read-more {
    background: #585858;
    padding: 4px;
    border-radius: 7px;
}

#collection a.read-more:hover, #subpage a.read-more:hover {
    background: #045FB4;
    padding: 5px;
    color: white;
    border-radius: 7px;
    text-decoration: none;
}

body#post header {
    text-align: center;
}

footer nav::before {
    content: "Copyright © 2019 - 2020 by Your Name \A The opinions expressed herein are my own and do not represent those of my employer \A or any other third-party views in any way. \A";
    white-space: pre-wrap;
}

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

a.tags {
    background-color: #fff;
    border-radius: 7px;
    border-style: solid;
    border-color: #585858;
    border-width: thin;
    padding-left: 5px;
    padding-right: 5px;
    padding-top: 2px;
    padding-bottom: 2px;
    text-decoration: none;
    line-height: 2em;
    color: #585858;
}

.tags:hover {
    background-color: #045FB4;
    color: #fff;
}
 
.tags:hover:after {
    border-color: transparent transparent transparent #045FB4;
}

body#post .commentsHeader {
    text-align: center;
    display: block;
}

body#post .commentsQuestion {
    text-align: center;
    display: block;
}

#subscribe-btn {
    border: 1px #045FB4;
    background: #045FB4; 
}

/* Hide Stats link */
nav#manage ul a[href="/me/c/dino/stats"] {
  display: none;
}

/* Change the background color for when you highlight/select text */
::selection {
    background: 
    rgba(255,255,0,0.5);
}

/* Search bar styling */
#search .field {
    width: 270px;
    height: 34px;
    text-indent: 0px;
    display: inline-block;
    text-align: left;
    background-color: white;
    margin: 0em;
}

JS

// src: https://platform.twitter.com/widgets.js


/* Post Comments Section

Usage: 
- Edit the "commentsText" and "responsePostText" variables below to customize the content of the post comments section.
- To not display the post comments section on a specific post, type "nocomments" anywhere in the post.
- To not display the post comments section on a all posts, set the showPostCommentsSection variable to false.
*/

var showPostCommentsSection = true;

// Insert Post Comments Section on posts, but not on the homepage.

if (document.getElementById("post-body") && showPostCommentsSection)
{
	var content = document.getElementById("post-body").innerHTML;
	var result = /nocomments/i.test(content);

	if (result)
	{
		var newContent = content.replace(/nocomments/gi, "");
		document.getElementById("post-body").innerHTML = newContent;
	}
	else
	{
		var commentsText = '<h3>Comments</h3><br /><br /><p>Do you have questions, comments or concerns about this post? <a href="https://yourblog.com/comments">Get in touch</a> with me and we can talk about it.</p>';

		var responsePostText = '<p>Or, if you are a Write.as user, responses to this post are welcome on Read.Write.As using hashtag &#35;<a href="https://read.write.as/t/ResponseToMe">ResponseToMe</a>. <span style="font-style: italic;">- For more information on Write.as "Response Posts", see this <a href="https://discuss.write.as/t/response-posts-for-discussion-between-authors/1017">thread</a></span>.</p>';

		var postCommentsSection = '<br /><hr /><br /><div style="text-align: center; font-style: normal;">' + commentsText + '<br /><br />' + responsePostText + '</div>';

		document.getElementsByTagName("article")[0].insertAdjacentHTML('beforeend', postCommentsSection);
	}
}
else
{
	// Remove nocomments text from homepage if displayed as part of post preview.
	var bodyContent = document.getElementsByTagName("body")[0].innerHTML;
	var newBodyContent = bodyContent.replace(/nocomments/gi, "");
	document.body.innerHTML = newBodyContent;
}