split out css to separate file
This commit is contained in:
parent
9ab7bbbfca
commit
5cf992a73f
@ -109,6 +109,8 @@ class DailyImageWidget {
|
|||||||
$options = $this->get_display_options();
|
$options = $this->get_display_options();
|
||||||
|
|
||||||
echo '<div id="hubblesite-daily-image">';
|
echo '<div id="hubblesite-daily-image">';
|
||||||
|
echo '<p id="hubblesite-daily-image-header">HubbleSite Daily Image</p>';
|
||||||
|
|
||||||
if (in_array("image", $options)) {
|
if (in_array("image", $options)) {
|
||||||
echo '<a href="' . $this->data['gallery_url'] . '" title="' . $this->data['title'] . '">';
|
echo '<a href="' . $this->data['gallery_url'] . '" title="' . $this->data['title'] . '">';
|
||||||
echo '<img src="' . $this->data['image_url'] . '" alt="' . $this->data['title'] . '" />';
|
echo '<img src="' . $this->data['image_url'] . '" alt="' . $this->data['title'] . '" />';
|
||||||
@ -135,9 +137,9 @@ class DailyImageWidget {
|
|||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
if (in_array("styles", $options)) {
|
if (in_array("styles", $options)) {
|
||||||
echo '<style type="text/css">';
|
echo "<style type=\"text/css\">";
|
||||||
echo "div#hubblesite-daily-image { text-align: center }";
|
include(dirname(__FILE__) . '/../hubblesite-styles.css');
|
||||||
echo '</style>';
|
echo "</style>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
28
hubblesite-styles.css
Normal file
28
hubblesite-styles.css
Normal 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;
|
||||||
|
}";
|
Loading…
Reference in New Issue
Block a user