Skip to content
This repository has been archived by the owner on Jun 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1 from Branyac/NoFollow
Browse files Browse the repository at this point in the history
First version
  • Loading branch information
Branyac authored Dec 14, 2019
2 parents 126c2f7 + 84f1a17 commit 5d7b78e
Show file tree
Hide file tree
Showing 6 changed files with 123 additions and 62 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
# Wordpress theme for thingsandcode.com based on Less Reloaded

Customizations:
- **Photo from static URL instead of Gravatar**.
- **The link bar has been replaced by my name and my LinkedIn profile**.
- **I put the license of the contents in the footer**.
- **Improved readability**: I changed the color of the content to increase contrast.
- **I replaced the comments counter by the date of the post** and put it over the title of the posts.
- **SEO**:
- **Robots: noimageindex**: Because images are not the relevant thing of this blog.
- **Robots: noindex**: Disable indexing for 404, pages, categories, tags, and archive. Only homepage and posts are indexed on search engines.
- **Add Google Analytics**: To understand how people interact with the blog.
- **Disable emojis**: For faster page load times. Also I don't use emojis.
- **Bugs solved**:
- **Remove `<h1 />` from `<header />`**: Because an html page should have only one title.
- **Remove `role` attribute**: Removed form Header, Navigation bar, and Footer because are not necessary when using the html tags `<header />`, `<nav />`, and `<footer />`.
- **Move the comments form outside `<ol />`** to pass w3 html validator.
- **Added GDPR notice**

Feel free to download and use this theme in your page.
**IMPORTANT: CHANGE THESE THINGS BEFORE USING THIS THEME IN YOUR WEBSITE!**
- **Change the URL of the avatar and put a photo of yours**.
- **Change my name and LinkedIn link for yours**.
- **Delete Google Analytics tracking code at `<footer />`**.

# About Less Reloaded

A simple minimal WordPress theme built with only what is needed to survive

Expand Down
4 changes: 2 additions & 2 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
?>
<ol class="commentlist">
<?php wp_list_comments(); ?>
<?php comment_form(); ?>
</ol>
</ol>
<?php comment_form(); ?>
15 changes: 14 additions & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,17 @@ function less_pingback_header() {
printf( '<link rel="pingback" href="%s">', esc_url( get_bloginfo( 'pingback_url' ) ) );
}
}
add_action( 'wp_head', 'less_pingback_header' );
add_action( 'wp_head', 'less_pingback_header' );

/* Disable emojis for fast page load times */
function disable_wp_emojicons() {
remove_action( 'admin_print_styles', 'print_emoji_styles' );
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
add_filter( 'tiny_mce_plugins', 'disable_emojicons_tinymce' );
}
add_action( 'init', 'disable_wp_emojicons' );
64 changes: 38 additions & 26 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
<meta name="viewport" content="width=device-width" />

<link rel="profile" href="http://gmpg.org/xfn/11" />

<meta name="robots" content="noimageindex<?php if(is_404() || is_page() || is_category() || is_archive()) {?>,noindex<?php } ?>" />
<?php wp_head(); ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.css" />
</head>

<body <?php body_class(); ?>>
Expand All @@ -18,23 +19,21 @@
/*-----------------------------------------------------------------------------------*/
?>

<header id="masthead" class="site-header" role="banner">
<header id="masthead" class="site-header">
<div class="container">

<div class="gravatar">
<?php
// grab admin email and their photo
$admin_email = get_option('admin_email');
echo get_avatar( $admin_email, 100 );
?>
</div><!--/ author -->
<img alt="" src="/wp-content/uploads/2019/11/foto_perfil.jpg" class="avatar avatar-100 photo" height="100" width="100">
</div><!-- /author -->

<div id="brand">
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php echo esc_attr( get_bloginfo( 'name' ) ); ?></a> &mdash; <span><?php echo esc_attr( get_bloginfo( 'description' ) ); ?></span></h1>
<span class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php echo esc_attr( get_bloginfo( 'name' ) ); ?></a> &mdash; <span><?php echo esc_attr( get_bloginfo( 'description' ) ); ?></span></span>
</div><!-- /brand -->

<nav role="navigation" class="site-navigation main-navigation">
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
<nav class="site-navigation main-navigation">
<div class="menu"><ul>
<li class="page_item">Written by Sergio</li>
<li class="page_item">| <a href="https://www.linkedin.com/in/sergiocoder/" target="_blank">LinkedIn</a></li>
</ul></div>
</nav><!-- .site-navigation .main-navigation -->

<div class="clear"></div>
Expand All @@ -61,7 +60,9 @@
<?php while ( have_posts() ) : the_post(); ?>

<article class="post">

<div class="post-date">
<?php the_time('d/m/Y'); ?>
</div>
<h1 class="title">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_title() ?>
Expand Down Expand Up @@ -126,16 +127,10 @@
<?php while ( have_posts() ) : the_post(); ?>

<article class="post">

<div class="post-date">
<?php the_time('d/m/Y'); ?>
</div>
<h1 class="title"><?php the_title() ?></h1>
<div class="post-meta">
<?php if( comments_open() ) : ?>
<span class="comments-link">
<?php comments_popup_link( __( 'Comment', 'less-reloaded' ), __( '1 Comment', 'less-reloaded' ), __( '% Comments', 'less-reloaded' ) ); ?>
</span>
<?php endif; ?>

</div><!--/post-meta -->

<div class="the-content">
<?php the_content( __( 'Continue...', 'less-reloaded' ) ); ?>
Expand Down Expand Up @@ -230,15 +225,32 @@
/*-----------------------------------------------------------------------------------*/
?>

<footer class="site-footer" role="contentinfo">
<footer class="site-footer">
<div class="site-info container">
<a href="https://wordpress.org/" title="<?php esc_html_e( 'A Semantic Personal Publishing Platform', 'less-reloaded'); ?>" rel="generator"><?php esc_html_e( 'Proudly powered by WordPress', 'less-reloaded'); ?></a>
<span class="sep"> <?php esc_html_e( 'and', 'less-reloaded' ); ?> </span>
<?php esc_html_e( 'Less Reloaded by Morteza Geransayeh', 'less-reloaded'); ?>
Content under <a href="http://creativecommons.org/licenses/by/4.0/" rel="license">Creative Commons Attribution 4.0 International</a> license
</div><!-- .site-info -->
</footer><!-- #colophon .site-footer -->

<?php wp_footer(); ?>

<?php if (!is_user_logged_in()) { ?>
<script src="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.js" data-cfasync="false"></script>
<script>
window.cookieconsent.initialise({
"palette": {
"popup": {
"background": "#000"
},
"button": {
"background": "#f1d600"
}
},
"theme": "edgeless"
});
</script>
<script>
let oId="UA-8277";!function(a,b,c,d,e,f,g){a.GoogleAnalyticsObject=e,a[e]=a[e]||function(){(a[e].q=a[e].q||[]).push(arguments)},a[e].l=1*new Date,f=b.createElement(c),g=b.getElementsByTagName(c)[0],f.async=1,f.src=d,g.parentNode.insertBefore(f,g)}(window,document,"script","https://www.google-analytics.com/analytics.js","ga"),ga("create",oId+"6104-1","auto"),ga("set","dimension1","trafico-real"),ga("set","anonymizeIp",true),ga("send","pageview");
</script>
<?php } ?>
</body>
</html>
32 changes: 18 additions & 14 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
=== Less Reloaded ===
Theme Name: Less Reloaded
Contributors: man4toman
Theme URI: https://github.com/man4toman/Less-Reloaded
Author: Morteza Geransayeh
Author URI: https://geransayeh.com
=== Less Reloaded-Thingsandcode.com ===
Theme Name: Less Reloaded-Thingsandcode.com
Contributors: Branyac
Theme URI: https://github.com/Branyac/Less-Reloaded-Thingsandcodedotcom
Author: Sergio Monedero
Author URI: https://thingsandcode.com
Requires PHP: 5.6
Requires at least: WordPress 4.0
Tested up to: WordPress 5.0.3
Stable tag: 1.0.3
Description: Less Reloaded is a super minimal theme, both front end and back end. adding no bloat whatesover. It only uses the minimum requirements that WordPress has, a stylesheet, screenshot and the index page.
Tested up to: WordPress 5.3
Stable tag: 1.1.0
Description: Theme for my blog thingsandcode.com Based on Less-Reloaded with a few personalizations and SEO enhacements.
License: GNU General Public License v3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Tags: one-column, custom-menu, rtl-language-support, threaded-comments, translation-ready
Text Domain: less-reloaded
Text Domain: less-reloaded-thingsandcodedotcom

== Description ==

A simple minimal WordPress theme built with only what is needed to survive
Thingsandcode.com Theme. Based on Less-Reloaded.

Less is a super minimal theme, both front end and back end. adding no bloat whatesover. It only uses the minimum requirements that WordPress has, a stylesheet, screenshot and the index page.
A simple minimal WordPress theme built with only what is needed to survive.

Less is a super minimal theme, both front end and back end. Adding no bloat whatesover. It only uses the minimum requirements that WordPress has, a stylesheet, screenshot and the index page.
Less Reloaded is modefied version that works with WordPress 5 and it's translation ready and it support rtl.

Less Reloaded Thingsandcode.com is a theme for my blog thingsandcode.com. It is based on Less-Reloaded with a few personalizations and SEO enhacements.

== Installation ==

1. In your admin panel, go to Appearance -> Themes and click the 'Add New' button.
Expand All @@ -29,8 +33,8 @@ Less Reloaded is modefied version that works with WordPress 5 and it's translati

== Copyright ==

Less Reloaded Theme is based on Less Theme � Jared Erickson, GPL License - https://github.com/alliswell/Less
Less Reloaded Theme is distributed under the terms of the GNU GPL
Less Reloaded-Thingsandcode.com Theme is based on Less Theme � Jared Erickson, GPL License - https://github.com/alliswell/Less
Less Reloaded-Thingsandcode.com Theme is distributed under the terms of the GNU GPL

== Changelog ==

Expand Down
44 changes: 25 additions & 19 deletions style.css
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/*
Theme Name: Less Reloaded
Theme URI: https://github.com/man4toman/Less-Reloaded
Author: Morteza Geransayeh
Author URI: http://geransayeh.com
Description: Less Reloaded is a super minimal theme, both front end and back end. adding no bloat whatesover. It only uses the minimum requirements that WordPress has, a stylesheet, screenshot and the index page.
Theme Name: Less Reloaded-Thingsandcode.com
Contributors: Branyac
Theme URI: https://github.com/Branyac/Less-Reloaded-Thingsandcodedotcom
Author: Sergio Monedero
Author URI: https://thingsandcode.com
Requires PHP: 5.6
Requires at least: WordPress 4.0
Version: 1.0.3
Tested up to: WordPress 5.3
Stable tag: 1.1.0
Description: Theme for my blog thingsandcode.com Based on Less-Reloaded with a few personalizations and SEO enhacements.
License: GNU General Public License v3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Text Domain: less-reloaded
Tags: one-column, custom-menu, rtl-language-support, threaded-comments, translation-ready
Less Reloaded Theme is based on Less Theme © Jared Erickson, GPL License - https://github.com/alliswell/Less
This theme, like WordPress, is licensed under the GPL.
Text Domain: less-reloaded-thingsandcodedotcom
*/


Expand All @@ -31,6 +31,7 @@ span,
applet,
object,
iframe,
.site-title,
h1,
h2,
h3,
Expand Down Expand Up @@ -340,14 +341,15 @@ select {
padding: 0;
margin: 0;
background: #ffffff;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
line-height: 26.64px;
font-size: 18px;
font-size: 1.8rem;
}
/* typography
-------------------------------------------------------------- */
/* Headings */
.site-title,
h1,
h2,
h3,
Expand All @@ -357,6 +359,7 @@ h6 {
clear: both;
font-family: "Arvo", Georgia, serif;
}
.site-title,
h1 {
line-height: 71.03999999999999px;
font-size: 48px;
Expand Down Expand Up @@ -490,7 +493,7 @@ header #brand {
width: 80%;
margin-top: 22px;
}
header #brand h1 {
header #brand .site-title {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: 900;
color: #565656;
Expand All @@ -501,17 +504,19 @@ header #brand h1 {
padding: 0;
text-transform: uppercase;
}
header #brand h1 a {
header #brand .site-title a {
color: #565656;
text-decoration: none;
}
header #brand h1 span {
header #brand .site-title span {
font-weight: 200;
color: #888888;
text-transform: lowercase;
}
header nav {
float: left;
color: #888888;
font-size: 14px;
}
header nav ul {
list-style: none;
Expand All @@ -521,10 +526,6 @@ header nav ul li {
float: left;
margin: 2px 10px 0 0;
}
header nav ul li a {
color: #888888;
font-size: 14px;
}
.container {
max-width: 720px;
padding: 20px;
Expand Down Expand Up @@ -553,6 +554,11 @@ article .title a {
article .title a:hover {
color: #007998;
}
article .post-date {
color: #888888;
text-decoration: none;
font-size: 14px;
}
article .post-meta {
margin-bottom: 40px;
font-size: 14px;
Expand All @@ -569,7 +575,7 @@ article .the-content a {
text-decoration: none;
}
article .the-content p {
color: #787878;
color: #505050;
}
article .the-content img {
width: 100%;
Expand Down

0 comments on commit 5d7b78e

Please sign in to comment.