Extract entry-title into a component
This commit is contained in:
parent
750ae735ef
commit
05ba91b472
4 changed files with 20 additions and 2 deletions
wp-content/themes/twentynineteen-tailwindcss
|
@ -0,0 +1,15 @@
|
|||
.entry-title {
|
||||
@apply text-black text-4xl font-bold mt-6 mb-8;
|
||||
|
||||
@screen md {
|
||||
@apply text-5xl
|
||||
}
|
||||
}
|
||||
|
||||
.entry-title a {
|
||||
@apply text-inherit;
|
||||
|
||||
&:hover {
|
||||
@apply text-gray-800 no-underline
|
||||
}
|
||||
}
|
|
@ -39,6 +39,8 @@ h2 {
|
|||
@apply absolute opacity-0 pointer-events-none
|
||||
}
|
||||
|
||||
@import 'components/post.css';
|
||||
|
||||
.content {
|
||||
@apply font-serif text-lg leading-loose;
|
||||
@screen md {
|
||||
|
|
|
@ -3,6 +3,7 @@ module.exports = {
|
|||
extend: {
|
||||
colors: {
|
||||
'gray-600': '#767676',
|
||||
inherit: 'inherit',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
printf( '<span class="sticky-post">%s</span>', _x( 'Featured', 'post', 'twentynineteen' ) );
|
||||
}
|
||||
if ( is_singular() ) :
|
||||
the_title( '<h1 class="text-4xl md:text-5xl font-bold mt-6 mb-8">', '</h1>' );
|
||||
the_title( '<h1 class="entry-title">', '</h1>' );
|
||||
else :
|
||||
the_title( sprintf( '<h2 class="text-4xl md:text-5xl font-bold mt-6 mb-8"><a class="text-black hover:text-gray-800 hover:no-underline" href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
|
||||
the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
|
||||
endif;
|
||||
?>
|
||||
</header><!-- .entry-header -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue