页面修改

This commit is contained in:
yaoyuan2.chu
2021-03-11 17:39:01 +08:00
parent 2515039d73
commit a29ff4b0b8
8 changed files with 82 additions and 41 deletions
+2 -2
View File
@@ -20,12 +20,12 @@
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'cyywordpress' ) ); ?>"> <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'cyywordpress' ) ); ?>">
<?php <?php
/* translators: %s: CMS name, i.e. WordPress. */ /* translators: %s: CMS name, i.e. WordPress. */
printf( esc_html__( 'Proudly powered by %s', 'cyywordpress' ), 'WordPress' ); printf( esc_html__( '自豪地使用 %s', 'cyywordpress' ), 'WordPress' );
?> ?>
</a> </a>
<span class="sep"> | </span> <span class="sep"> | </span>
Theme: <a href="http://chuyaoyuan.com/">cyywordpress</a> by Underscores.me. Theme: <a href="http://chuyaoyuan.com/">cyywordpress</a> by Chuyaoyuan(自用主题).
</p> </p>
</div> </div>
</footer> </footer>
+4 -4
View File
@@ -28,12 +28,12 @@
<!-- <a class="skip-link screen-reader-text" href="#primary">--><?php //esc_html_e( 'Skip to content', 'cyywordpress' ); ?><!--</a>--> <!-- <a class="skip-link screen-reader-text" href="#primary">--><?php //esc_html_e( 'Skip to content', 'cyywordpress' ); ?><!--</a>-->
<nav class="navbar is-light" role="navigation" aria-label="main navigation"> <nav class="navbar" style="box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px 0 rgba(0, 0, 0, .06) !important;" role="navigation" aria-label="main navigation">
<div class="navbar-brand"> <div class="navbar-brand">
<a class="navbar-item" href="https://bulma.io"> <a class="navbar-item" href="<?php echo esc_url( home_url( '/' ) ); ?>">
<img src="https://s3.ax1x.com/2021/02/26/6SEr4g.jpg" width="28" height="28"> <img src="https://s3.ax1x.com/2021/02/26/6SEr4g.jpg" width="28" height="28">
</a> </a>
<p class="subtitle is-3" style=" margin-top: 5px;margin-bottom: 5px;"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p> <p class="subtitle is-4" style=" margin-top: 10px;margin-bottom: 5px;"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample"> <a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample">
<span aria-hidden="true"></span> <span aria-hidden="true"></span>
<span aria-hidden="true"></span> <span aria-hidden="true"></span>
@@ -83,7 +83,7 @@
<div class="navbar-end"> <div class="navbar-end">
<div class="navbar-item"> <div class="navbar-item">
<div class="buttons"> <div class="buttons">
<a class="button is-primary"> <a class="button is-link is-light" href="http://chuyaoyuan.com/wp-admin/">
<strong>后台登陆</strong> <strong>后台登陆</strong>
</a> </a>
<!-- <a class="button is-light"> <!-- <a class="button is-light">
+10 -6
View File
@@ -14,7 +14,8 @@ if ( ! function_exists( 'cyywordpress_posted_on' ) ) :
function cyywordpress_posted_on() { function cyywordpress_posted_on() {
$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>'; $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>'; //$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time> &nbsp; &nbsp;<time class="updated" datetime="%3$s">%4$s</time>';
$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time> ';
} }
$time_string = sprintf( $time_string = sprintf(
@@ -27,7 +28,8 @@ if ( ! function_exists( 'cyywordpress_posted_on' ) ) :
$posted_on = sprintf( $posted_on = sprintf(
/* translators: %s: post date. */ /* translators: %s: post date. */
esc_html_x( 'Posted on %s', 'post date', 'cyywordpress' ), // esc_html_x( 'Posted on %s', 'post date', 'cyywordpress' ),
esc_html_x( '发布于 %s &nbsp; ', 'post date', 'cyywordpress' ),
'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>' '<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
); );
@@ -63,14 +65,16 @@ if ( ! function_exists( 'cyywordpress_entry_footer' ) ) :
$categories_list = get_the_category_list( esc_html__( ', ', 'cyywordpress' ) ); $categories_list = get_the_category_list( esc_html__( ', ', 'cyywordpress' ) );
if ( $categories_list ) { if ( $categories_list ) {
/* translators: 1: list of categories. */ /* translators: 1: list of categories. */
printf( '<span class="cat-links">' . esc_html__( 'Posted in %1$s', 'cyywordpress' ) . '</span>', $categories_list ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped // printf( '<span class="cat-links">' . esc_html__( 'Posted in %1$s', 'cyywordpress' ) . '</span>', $categories_list ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
printf( '<span class="cat-links">' . esc_html__( '属于&nbsp; %1$s 分类&nbsp; ', 'cyywordpress' ) . '</span>', $categories_list ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
} }
/* translators: used between list items, there is a space after the comma */ /* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '', esc_html_x( ', ', 'list item separator', 'cyywordpress' ) ); $tags_list = get_the_tag_list( '', esc_html_x( ', ', 'list item separator', 'cyywordpress' ) );
if ( $tags_list ) { if ( $tags_list ) {
/* translators: 1: list of tags. */ /* translators: 1: list of tags. */
printf( '<span class="tags-links">' . esc_html__( 'Tagged %1$s', 'cyywordpress' ) . '</span>', $tags_list ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped //printf( '<span class="tags-links">' . esc_html__( 'Tagged %1$s', 'cyywordpress' ) . '</span>', $tags_list ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
printf( '<span class="tags-links">' . esc_html__( '标签&nbsp; %1$s &nbsp; ', 'cyywordpress' ) . '</span>', $tags_list ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
} }
} }
@@ -80,7 +84,7 @@ if ( ! function_exists( 'cyywordpress_entry_footer' ) ) :
sprintf( sprintf(
wp_kses( wp_kses(
/* translators: %s: post title */ /* translators: %s: post title */
__( 'Leave a Comment<span class="screen-reader-text"> on %s</span>', 'cyywordpress' ), __( '发表一条评论<span class="screen-reader-text"> %s</span>', 'cyywordpress' ),
array( array(
'span' => array( 'span' => array(
'class' => array(), 'class' => array(),
@@ -97,7 +101,7 @@ if ( ! function_exists( 'cyywordpress_entry_footer' ) ) :
sprintf( sprintf(
wp_kses( wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */ /* translators: %s: Name of current post. Only visible to screen readers */
__( 'Edit <span class="screen-reader-text">%s</span>', 'cyywordpress' ), __( '&nbsp; Edit <span class="screen-reader-text">%s</span>', 'cyywordpress' ),
array( array(
'span' => array( 'span' => array(
'class' => array(), 'class' => array(),
+4 -3
View File
@@ -25,6 +25,10 @@ get_header();
</div> </div>
</section> </section>
<br>
<div class="notification is-primary">
欢迎来到这! <strong>Hello everyone.</strong>
</div>
<nav class="breadcrumb" aria-label="breadcrumbs"> <nav class="breadcrumb" aria-label="breadcrumbs">
<ul> <ul>
@@ -39,9 +43,6 @@ get_header();
</ul> </ul>
</nav> </nav>
<div class="notification is-primary">
欢迎来到这! <strong>Hello everyone.</strong>
</div>
<?php <?php
+27 -1
View File
@@ -10,6 +10,31 @@
get_header(); get_header();
?> ?>
<br>
<div class="notification is-primary">
欢迎来到这! <strong>Hello everyone.</strong>
</div>
<nav class="breadcrumb" aria-label="breadcrumbs">
<ul>
<li>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" >
<span class="icon is-small">
<i class="fas fa-home" aria-hidden="true"></i>
</span>
<span>首页</span>
</a>
</li>
<li>
<a href="#">
<span class="icon is-small">
<i class="fas fa-book" aria-hidden="true"></i>
</span>
<span>搜索页</span>
</a>
</li>
</ul>
</nav>
<main id="primary" class="site-main"> <main id="primary" class="site-main">
<?php if ( have_posts() ) : ?> <?php if ( have_posts() ) : ?>
@@ -18,7 +43,8 @@ get_header();
<h1 class="page-title"> <h1 class="page-title">
<?php <?php
/* translators: %s: search query. */ /* translators: %s: search query. */
printf( esc_html__( 'Search Results for: %s', 'cyywordpress' ), '<span>' . get_search_query() . '</span>' ); // printf( esc_html__( 'Search Results for: %s', 'cyywordpress' ), '<span>' . get_search_query() . '</span>' );
printf( esc_html__( '搜索条件: %s', 'cyywordpress' ), '<span>' . get_search_query() . '</span>' );
?> ?>
</h1> </h1>
</header><!-- .page-header --> </header><!-- .page-header -->
+4 -4
View File
@@ -9,7 +9,10 @@
get_header(); get_header();
?> ?>
<br>
<div class="notification is-primary">
欢迎来到这! <strong>Hello everyone.</strong>
</div>
<nav class="breadcrumb" aria-label="breadcrumbs"> <nav class="breadcrumb" aria-label="breadcrumbs">
<ul> <ul>
<li> <li>
@@ -31,9 +34,6 @@ get_header();
</ul> </ul>
</nav> </nav>
<div class="notification is-primary">
欢迎来到这! <strong>Hello everyone.</strong>
</div>
<main id="primary" class="site-main"> <main id="primary" class="site-main">
+14 -5
View File
@@ -9,9 +9,12 @@
?> ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div id="post-<?php the_ID(); ?>" class="card" style=" margin-bottom: 25px;">
<header class="entry-header"> <div class="card-content">
<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?> <div class="media">
<div class="media-content">
<?php the_title( sprintf( '<h2 class="title is-4"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
<?php if ( 'post' === get_post_type() ) : ?> <?php if ( 'post' === get_post_type() ) : ?>
<div class="entry-meta"> <div class="entry-meta">
@@ -21,10 +24,13 @@
?> ?>
</div><!-- .entry-meta --> </div><!-- .entry-meta -->
<?php endif; ?> <?php endif; ?>
</header><!-- .entry-header -->
<?php cyywordpress_post_thumbnail(); ?> <?php cyywordpress_post_thumbnail(); ?>
</div>
</div>
<div class="content">
<div class="entry-summary"> <div class="entry-summary">
<?php the_excerpt(); ?> <?php the_excerpt(); ?>
</div><!-- .entry-summary --> </div><!-- .entry-summary -->
@@ -32,4 +38,7 @@
<footer class="entry-footer"> <footer class="entry-footer">
<?php cyywordpress_entry_footer(); ?> <?php cyywordpress_entry_footer(); ?>
</footer><!-- .entry-footer --> </footer><!-- .entry-footer -->
</article><!-- #post-<?php the_ID(); ?> --> </div>
</div>
</div><!-- #post-<?php the_ID(); ?> -->
+2 -1
View File
@@ -39,7 +39,8 @@
sprintf( sprintf(
wp_kses( wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */ /* translators: %s: Name of current post. Only visible to screen readers */
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'cyywordpress' ), // __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'cyywordpress' ),
__( '继续阅读 <span class="screen-reader-text"> "%s"</span>', 'cyywordpress' ),
array( array(
'span' => array( 'span' => array(
'class' => array(), 'class' => array(),