New class to differentiate post title & tags

Development-related discussion, including bundled plugins
User avatar
gmargo
Bear Rating Disaster
Bear Rating Disaster
Posts: 62
Joined: 08 Jan 2012, 22:33
Location: Silicon Valley

New class to differentiate post title & tags

Postby gmargo » 08 Jun 2012, 03:06

I was trying some custom CSS to embolden the post title in headline mode.
However, the title does not have a unique class, so the other <a> link in the same enclosing <div> was modified as well.
I respectfully submit this minor patch to add class names to the title and tag <div>s for the headline mode:

Code: Select all

diff --git a/include/functions.php b/include/functions.php
index 684ff5a..1a7f766 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -3383,14 +3383,14 @@
          $rv['content'] .= "<div class=\"postDate$rtl_class\">$parsed_updated</div>";
 
          if ($line["link"]) {
-            $rv['content'] .= "<div clear='both'><a target='_blank'
+            $rv['content'] .= "<div class='postTitle' clear='both'><a target='_blank'
                title=\"".htmlspecialchars($line['title'])."\"
                href=\"" .
                $line["link"] . "\">" .
                truncate_string($line["title"], 100) .
                "<span class='author'>$entry_author</span></a></div>";
          } else {
-            $rv['content'] .= "<div clear='both'>" . $line["title"] . "$entry_author</div>";
+            $rv['content'] .= "<div class='postTitle' clear='both'>" . $line["title"] . "$entry_author</div>";
          }
 
          $tag_cache = $line["tag_cache"];
@@ -3407,7 +3407,7 @@
 
          if (!$entry_comments) $entry_comments = "&nbsp;"; # placeholder
 
-         $rv['content'] .= "<div style='float : right'>
+         $rv['content'] .= "<div class='postTags' style='float : right'>
             <img src='".theme_image($link, 'images/tag.png')."'
             class='tagsPic' alt='Tags' title='Tags'>&nbsp;";
 


User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: New class to differentiate post title & tags

Postby fox » 08 Jun 2012, 08:09

Sure, but please post that in diff format. :)

User avatar
gmargo
Bear Rating Disaster
Bear Rating Disaster
Posts: 62
Joined: 08 Jan 2012, 22:33
Location: Silicon Valley

Re: New class to differentiate post title & tags

Postby gmargo » 08 Jun 2012, 19:14

Oops, I meant to do that. See attached.
Attachments
Post_Title_Tags_Classiness.patch.gz
Add class to post title/tags in headline mode.
(693 Bytes) Downloaded 117 times


Return to “Development”

Who is online

Users browsing this forum: No registered users and 3 guests