split out css to separate file

This commit is contained in:
John Bintz 2009-06-10 16:53:33 -04:00
parent 9ab7bbbfca
commit 5cf992a73f
2 changed files with 33 additions and 3 deletions

View File

@ -109,6 +109,8 @@ class DailyImageWidget {
$options = $this->get_display_options();
echo '<div id="hubblesite-daily-image">';
echo '<p id="hubblesite-daily-image-header">HubbleSite Daily Image</p>';
if (in_array("image", $options)) {
echo '<a href="' . $this->data['gallery_url'] . '" title="' . $this->data['title'] . '">';
echo '<img src="' . $this->data['image_url'] . '" alt="' . $this->data['title'] . '" />';
@ -135,9 +137,9 @@ class DailyImageWidget {
echo '</div>';
if (in_array("styles", $options)) {
echo '<style type="text/css">';
echo "div#hubblesite-daily-image { text-align: center }";
echo '</style>';
echo "<style type=\"text/css\">";
include(dirname(__FILE__) . '/../hubblesite-styles.css');
echo "</style>";
}
}
}

28
hubblesite-styles.css Normal file
View File

@ -0,0 +1,28 @@
div#hubblesite-daily-image {
text-align: center;
border: 1px solid #67201D;
background-color: #F0EEDD;
padding: 10px;
}
div#hubblesite-daily-image a:hover {
color: #00d2d3
}
div#hubblesite-daily-image img {
margin: 5px 0;
border: 1px solid #67201D;
}
div#hubblesite-daily-image a:hover img {
border-color: #00d2d3
}
p#hubblesite-daily-image-header {
text-align: center;
font-size: 12px;
font-weight: bold;
color: #666;
margin: 0;
padding: 0;
}";