read off canvas
This commit is contained in:
parent
cfa5f31633
commit
d2944e59f2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
41
header.php
41
header.php
|
@ -17,6 +17,8 @@
|
|||
</head>
|
||||
|
||||
<body <?php body_class(); ?>>
|
||||
|
||||
|
||||
|
||||
<div id="page" class="hfeed site">
|
||||
|
||||
|
@ -30,8 +32,8 @@
|
|||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-<?php if ( is_active_sidebar( 'off-canvas' ) ): ?>11<?php else : ?>12<?php endif; ?>">
|
||||
|
||||
<div class="navbar-header">
|
||||
|
||||
|
@ -60,12 +62,43 @@
|
|||
)
|
||||
); ?>
|
||||
|
||||
</div> <!-- .col-md-12 end -->
|
||||
</div> <!-- .col-md-11 or col-md-12 end -->
|
||||
|
||||
<?php if ( is_active_sidebar( 'off-canvas' ) ): ?>
|
||||
<div class="col-md-1 text-right">
|
||||
<!-- Off Canvas Toggle -->
|
||||
<a class="off-canvas-toggle-link" data-toggle="offcanvas" data-target=".navmenu" data-canvas="body">
|
||||
menu
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div> <!-- .container -->
|
||||
|
||||
</div><!-- .navbar -->
|
||||
|
||||
<?php if ( is_active_sidebar( 'off-canvas' ) ): ?>
|
||||
<div class="navmenu navmenu-inverse navmenu-fixed-left offcanvas">
|
||||
<!-- Off Canvas Toggle -->
|
||||
<a class="off-canvas-toggle-link" data-toggle="offcanvas" data-target=".navmenu" data-canvas="body">
|
||||
menu
|
||||
</a>
|
||||
|
||||
<!-- Off Canvas Widget itself -->
|
||||
|
||||
<?php dynamic_sidebar( 'off-canvas' ); ?>
|
||||
|
||||
</div>
|
||||
<?php else : ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</nav><!-- .site-navigation -->
|
||||
|
||||
</div><!-- .wrapper-navbar end -->
|
||||
</div><!-- .wrapper-navbar end -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ function understrap_scripts() {
|
|||
if ( is_active_sidebar( 'off-canvas' ) ) {
|
||||
wp_enqueue_style('understrap-off-canvas-style', get_stylesheet_directory_uri() . '/css/jasny-bootstrap.min.css', array(), '310', false);
|
||||
wp_enqueue_script('understrap-off-canvas-script', get_template_directory_uri() . '/js/jasny-bootstrap.min.js', array(), '310', true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
add_action( 'wp_enqueue_scripts', 'understrap_scripts' );
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
function understrap_scripts() {
|
||||
wp_enqueue_style( 'understrap-theme', get_stylesheet_directory_uri() . '/css/theme.css', array(), '0.1', false );
|
||||
wp_enqueue_script('jquery');
|
||||
wp_enqueue_script( 'understrap-navigation', get_template_directory_uri() . '/js/bootstrap.min.js', array(), '20120206', true );
|
||||
wp_enqueue_script( 'understrap-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );
|
||||
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
|
||||
wp_enqueue_script( 'comment-reply' );
|
||||
}
|
||||
}
|
||||
|
||||
add_action( 'wp_enqueue_scripts', 'understrap_scripts' );
|
|
@ -19,5 +19,15 @@ function understrap_widgets_init() {
|
|||
'before_title' => '',
|
||||
'after_title' => '',
|
||||
) );
|
||||
|
||||
register_sidebar( array(
|
||||
'name' => __( 'Off Canvas', 'understrap' ),
|
||||
'id' => 'off-canvas',
|
||||
'description' => '',
|
||||
'before_widget' => '<div class="col-md-12">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '',
|
||||
'after_title' => '',
|
||||
) );
|
||||
}
|
||||
add_action( 'widgets_init', 'understrap_widgets_init' );
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue