Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: css minical

css minical 9 years 9 months ago #24246

  • georgiedekker
  • georgiedekker's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 13
  • Thank you received: 1
Today I've been messing around with the mini calendar.
I wanted a black and white theme and background colors for "today" and for "hasevent".

After changing the head of the mini cal's bg to black and the month to white, the arrows were gone.

After a lot of searching I found that somehow the arrow colors can be edited in the theme. So in my custom.css that sits next to my theme I've added some code. It works perfect. So I wanted to share this solution with you.

a, at, ,a:hover, a:focus, at:hover, at:focus {
color: #fff;
}
.dt_ajax {
color: #fff;
}

to change the "special day" font color i changed the below part of ajax.php in the mod_dt_calendar folder.

$today_class = "";
if($day == $day_num && $present_year == $year && $present_month == $month) {
$today_class = 'class="dtToday"';
$a_class = 'class="at"';
}

if(isset($dates[trim($year."-".$month."-".sprintf("%02d\n",$day_num))])) {
if($today_class != "") {
$class = "class='dtToday dtHasEvent'";
} else {
$class = "class='dtHasEvent'";
}
echo "<td $class><a href ='".$link."' > $day_num </a></td>";
} else {
echo "<td $today_class > $day_num </td>";
}

Somehow the styling i tried earlier on the "a" class seems to work without changing other "a" class styles like article headings and such.

#dt_calendar td.dtHasEvent a {
color: #fff;
}
#dt_calendar td.dtHasEvent a:focus {
color: #fff;
}
#dt_calendar td.dtHasEvent a:hover {
color: #fff;
}
at, at:hover, at:focus {
color: #fff;
}
#dt_calendar td.dtToday a {
color: #fff;
}
#dt_calendar td.dtToday a:focus {
color: #fff;
}
#dt_calendar td.dtToday a:hover {
color: #fff;
}

Please Log in or Create an account to join the conversation.

Last Edit: by georgiedekker.
  • Page:
  • 1
Time to create page: 0.638 seconds