mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-11 18:46:03 +09:00
Update CSS
This commit is contained in:
@@ -1 +1 @@
|
||||
.has-leader .site-inner{margin-top:0}.big-leader{overflow:hidden;max-height:100vh;position:relative}.big-leader .wrap{position:absolute;right:0;bottom:0;left:0;width:100%;z-index:1}.big-leader--scriptless{height:auto}.big-leader--scriptless img{display:block;height:100vh;max-width:none;-o-object-fit:cover;object-fit:cover;width:100vw}.big-leader .entry-title.featured-image-overlay,.big-leader .archive-title.featured-image-overlay{color:#fff;text-align:center}.big-leader .excerpt,.big-leader .archive-description{margin-bottom:24px;padding:24px;background:rgba(255,255,255,.85)}.big-leader p{margin-top:18px;margin-bottom:0}.home .big-leader p{margin-top:0}.home .big-leader p:last-child{margin-bottom:0}.big-leader .excerpt .entry-title,.big-leader .archive-description .archive-title{margin-bottom:0}.backstretch.no-js{max-height:600px}img.featured{max-width:100%}
|
||||
.has-leader .site-inner{margin-top:0}.big-leader{overflow:hidden;max-height:100vh;position:relative}.big-leader .wrap{position:absolute;right:0;bottom:0;left:0;width:100%;z-index:1}.big-leader--scriptless{height:auto}.big-leader--scriptless img{display:block;height:100vh;max-width:none;-o-object-fit:cover;object-fit:cover;width:100vw}.big-leader .entry-title.featured-image-overlay,.big-leader .archive-title.featured-image-overlay{color:#fff;text-align:center}.big-leader .excerpt,.big-leader .archive-description{margin-bottom:24px;padding:24px;background:rgba(255,255,255,.85)}.big-leader p{margin-top:18px;margin-bottom:0}.home .big-leader p{margin-top:0}.home .big-leader p:last-child{margin-bottom:0}.big-leader .excerpt .entry-title,.big-leader .archive-description .archive-title{margin-bottom:0}@keyframes fadein{from{opacity:0}to{opacity:1}}.backstretch.no-js{max-height:600px}img.featured{max-width:100%}
|
||||
@@ -44,8 +44,10 @@ class DisplayFeaturedImageGenesisEnqueue {
|
||||
* @since 3.1.0
|
||||
*/
|
||||
public function enqueue_style() {
|
||||
$css_file = apply_filters( 'display_featured_image_genesis_css_file', plugin_dir_url( __FILE__ ) . 'css/display-featured-image-genesis.css' );
|
||||
$css_file = apply_filters( 'display_featured_image_genesis_css_file', plugin_dir_url( dirname( __FILE__ ) ) . 'css/display-featured-image-genesis.css' );
|
||||
if ( $css_file ) {
|
||||
wp_enqueue_style( 'displayfeaturedimage-style', esc_url( $css_file ), array(), $this->version );
|
||||
}
|
||||
$this->add_inline_style();
|
||||
}
|
||||
|
||||
@@ -55,10 +57,10 @@ class DisplayFeaturedImageGenesisEnqueue {
|
||||
*/
|
||||
public function enqueue_scripts() {
|
||||
$minify = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
||||
wp_register_script( 'backstretch', plugins_url( "/includes/js/backstretch{$minify}.js", dirname( __FILE__ ) ), array( 'jquery' ), '2.1.16', true );
|
||||
wp_register_script( 'backstretch', plugins_url( "/js/backstretch{$minify}.js", dirname( __FILE__ ) ), array( 'jquery' ), '2.1.16', true );
|
||||
wp_enqueue_script(
|
||||
'displayfeaturedimage-backstretch-set',
|
||||
plugins_url( "/includes/js/backstretch-set{$minify}.js", dirname( __FILE__ ) ),
|
||||
plugins_url( "/js/backstretch-set{$minify}.js", dirname( __FILE__ ) ),
|
||||
array(
|
||||
'jquery',
|
||||
'backstretch',
|
||||
@@ -173,9 +175,11 @@ class DisplayFeaturedImageGenesisEnqueue {
|
||||
*/
|
||||
private function get_image_css() {
|
||||
$css = $this->get_object_position();
|
||||
$height = $this->setting['less_header'];
|
||||
if ( $height ) {
|
||||
$css .= "height: calc( 100vh - {$height}px );";
|
||||
if ( $this->setting['less_header'] ) {
|
||||
$css .= "height: calc( 100vh - {$this->setting['less_header']}px );";
|
||||
}
|
||||
if ( $this->setting['fade'] ) {
|
||||
$css .= "animation: fadein {$this->setting['fade']}ms;";
|
||||
}
|
||||
if ( $css ) {
|
||||
$css = ".big-leader--scriptless img { {$css} }";
|
||||
|
||||
@@ -64,6 +64,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadein {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
.backstretch.no-js {
|
||||
max-height: 600px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user