* Learn more: http://codex.wordpress.org/Template_Hierarchy * * @package material-design-par-amauri */ ?> <article id="post-<?php the_ID(); ?> " <?php post_class(); ?> > <?php if (material_design_par_amauri_getImage(get_the_ID()) != '') { echo '<div class="material_feat" style="background-image:url(' . material_design_par_amauri_getImage(get_the_ID()) . ')"></div>'; } ?> <header class="entry-header"> <?php if (get_post_format() == 'link') { echo material_design_par_amauri_get_link(); } else { the_title(sprintf('<h1 class="entry-title"><img width="36" height="36" src="%s" alt="%s" /> <a href="%s" rel="bookmark">', esc_url(get_template_directory_uri() . '/image/icon/_' . get_post_format() . '.png'), get_post_format(), esc_url(get_permalink())), '</a></h1>'); } ?> <?php if ('post' == get_post_type()) { ?> <div class="entry-meta"> <?php
/** * Styles the header image and text displayed on the blog * * @see material_design_par_amauri_custom_header_setup(). */ function material_design_par_amauri_header_style() { $backIMG = ''; if (is_front_page() && get_header_image() != '') { $backIMG = get_header_image(); } elseif (material_design_par_amauri_getImage(get_the_ID()) != '' && is_singular()) { $backIMG = material_design_par_amauri_getImage(get_the_ID()); } ?> <style type="text/css"> .site-header { <?php // if featured image if ($backIMG != '') { echo 'background-image:url(' . $backIMG . ');'; echo 'background-image:-moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.65) 100%), url(' . $backIMG . ');'; /* FF3.6+ */ echo 'background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,0.65))), url(' . $backIMG . ');'; /* Chrome,Safari4+ */ echo 'background-image:-webkit-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.65) 100%), url(' . $backIMG . ');'; /* Chrome10+,Safari5.1+ */ echo 'background-image:-o-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.65) 100%), url(' . $backIMG . ');'; /* Opera 11.10+ */ echo 'background-image:-ms-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.65) 100%), url(' . $backIMG . ');'; /* IE10+ */ echo 'background-image:linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0.65) 100%), url(' . $backIMG . ');'; /* W3C */ echo 'background-repeat: no-repeat;background-position: center center;'; echo 'background-size:cover !important;'; } ?> height:420px; } </style> <?php $header_text_color = get_header_textcolor(); // If no custom options for text are set, let's bail // get_header_textcolor() options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value. if (HEADER_TEXTCOLOR == $header_text_color) { return; } // If we get this far, we have custom styles. Let's do this. ?> <style type="text/css"> <?php // Has the text been hidden? if ('blank' == $header_text_color) { ?> .site-title, .site-description { position: absolute; clip: rect(1px, 1px, 1px, 1px); } <?php // If the user has set a custom color for the text use that. } else { ?> #drawer .header b { color: #<?php echo esc_attr($header_text_color); ?> ; } #drawer .header .site-description { <?php list($r, $g, $b) = sscanf($header_text_color, "%02x%02x%02x"); ?> color: rgba(<?php echo $r . ', ' . $g . ', ' . $b . ', 0.68'; ?> ); } <?php } ?> </style> <?php }