Skip to content

Commit

Permalink
Use CSS to handle vertical overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwoodnz committed Oct 10, 2022
1 parent 0b58315 commit 9f6df36
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 571 deletions.
13 changes: 0 additions & 13 deletions source/wp-content/themes/wporg-developer/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ function init() {

add_filter( 'post_type_link', __NAMESPACE__ . '\\method_permalink', 11, 2 );
add_filter( 'term_link', __NAMESPACE__ . '\\taxonomy_permalink', 10, 3 );
add_filter( 'script_loader_tag', __NAMESPACE__ . '\\add_type_attribute' , 10, 3);

add_theme_support( 'automatic-feed-links' );
add_theme_support( 'post-thumbnails' );
Expand Down Expand Up @@ -376,17 +375,6 @@ function header_js() {
</script>\n";
}

/**
* Load specified scripts as an es6 module
*/
function add_type_attribute($tag, $handle, $src) {
if ( 'wporg-table-of-contents' !== $handle ) {
return $tag;
}

return '<script type="module" src="' . esc_url( $src ) . '"></script>';
}

/**
* Register and enqueue the theme assets.
*/
Expand All @@ -404,7 +392,6 @@ function theme_scripts_styles() {
wp_enqueue_script( 'wporg-developer-navigation', get_stylesheet_directory_uri() . '/js/navigation.js', array(), filemtime( __DIR__ . '/js/navigation.js' ), true );
wp_enqueue_script( 'wporg-developer-chapters', get_stylesheet_directory_uri() . '/js/chapters.js', array( 'jquery' ), filemtime( __DIR__ . '/js/chapters.js' ) );
wp_enqueue_script( 'wporg-developer-menu', get_stylesheet_directory_uri() . '/js/menu.js', array( 'jquery' ), filemtime( __DIR__ . '/js/menu.js' ), true );
wp_enqueue_script( 'wporg-table-of-contents', get_stylesheet_directory_uri() . '/js/table-of-contents.js', array(), filemtime( __DIR__ . '/js/table-of-contents.js' ), true );
}

/**
Expand Down

0 comments on commit 9f6df36

Please sign in to comment.