@ -0,0 +1,40 @@
|
|||||||
|
# Build and Release Folders
|
||||||
|
bin-debug/
|
||||||
|
bin-release/
|
||||||
|
[Oo]bj/
|
||||||
|
[Bb]in/
|
||||||
|
wp-admin/
|
||||||
|
wp-includes/
|
||||||
|
wp-content/languages/
|
||||||
|
wp-content/mu-plugins/
|
||||||
|
wp-content/plugins/
|
||||||
|
wp-content/uploads/
|
||||||
|
wp-content/themes/backup
|
||||||
|
wp-content/cache
|
||||||
|
|
||||||
|
.idea
|
||||||
|
.agent
|
||||||
|
.claude
|
||||||
|
.codex
|
||||||
|
.cursor
|
||||||
|
.gemini
|
||||||
|
.github
|
||||||
|
.idea
|
||||||
|
.kiro
|
||||||
|
.roo
|
||||||
|
.shared
|
||||||
|
.vscode
|
||||||
|
|
||||||
|
|
||||||
|
# Other files and folders
|
||||||
|
.settings/
|
||||||
|
|
||||||
|
# Executables
|
||||||
|
*.swf
|
||||||
|
*.air
|
||||||
|
*.ipa
|
||||||
|
*.apk
|
||||||
|
.idea
|
||||||
|
# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties`
|
||||||
|
# should NOT be excluded as they contain compiler settings and other important
|
||||||
|
# information for Eclipse / Flash Builder.
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||||
|
RewriteBase /
|
||||||
|
RewriteRule ^index\.php$ - [L]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule . /index.php [L]
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# END WordPress
|
||||||
@ -0,0 +1 @@
|
|||||||
|
google-site-verification: googleb9a847eee76af35d.html
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Front to the WordPress application. This file doesn't do anything, but loads
|
||||||
|
* wp-blog-header.php which does and tells WordPress to load the theme.
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tells WordPress to load the WordPress theme and output it.
|
||||||
|
*
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
define( 'WP_USE_THEMES', true );
|
||||||
|
|
||||||
|
/** Loads the WordPress Environment and Template */
|
||||||
|
require __DIR__ . '/wp-blog-header.php';
|
||||||
@ -0,0 +1,214 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Confirms that the activation key that is sent in an email after a user signs
|
||||||
|
* up for a new site matches the key for that user and then displays confirmation.
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
*/
|
||||||
|
|
||||||
|
define( 'WP_INSTALLING', true );
|
||||||
|
|
||||||
|
/** Sets up the WordPress Environment. */
|
||||||
|
require __DIR__ . '/wp-load.php';
|
||||||
|
|
||||||
|
require __DIR__ . '/wp-blog-header.php';
|
||||||
|
|
||||||
|
if ( ! is_multisite() ) {
|
||||||
|
wp_redirect( wp_registration_url() );
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
|
||||||
|
$valid_error_codes = array( 'already_active', 'blog_taken' );
|
||||||
|
|
||||||
|
list( $activate_path ) = explode( '?', wp_unslash( $_SERVER['REQUEST_URI'] ) );
|
||||||
|
$activate_cookie = 'wp-activate-' . COOKIEHASH;
|
||||||
|
|
||||||
|
$key = '';
|
||||||
|
$result = null;
|
||||||
|
|
||||||
|
if ( isset( $_GET['key'] ) && isset( $_POST['key'] ) && $_GET['key'] !== $_POST['key'] ) {
|
||||||
|
wp_die( __( 'A key value mismatch has been detected. Please follow the link provided in your activation email.' ), __( 'An error occurred during the activation' ), 400 );
|
||||||
|
} elseif ( ! empty( $_GET['key'] ) ) {
|
||||||
|
$key = sanitize_text_field( $_GET['key'] );
|
||||||
|
} elseif ( ! empty( $_POST['key'] ) ) {
|
||||||
|
$key = sanitize_text_field( $_POST['key'] );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $key ) {
|
||||||
|
$redirect_url = remove_query_arg( 'key' );
|
||||||
|
|
||||||
|
if ( remove_query_arg( false ) !== $redirect_url ) {
|
||||||
|
setcookie( $activate_cookie, $key, 0, $activate_path, COOKIE_DOMAIN, is_ssl(), true );
|
||||||
|
wp_safe_redirect( $redirect_url );
|
||||||
|
exit;
|
||||||
|
} else {
|
||||||
|
$result = wpmu_activate_signup( $key );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( null === $result && isset( $_COOKIE[ $activate_cookie ] ) ) {
|
||||||
|
$key = $_COOKIE[ $activate_cookie ];
|
||||||
|
$result = wpmu_activate_signup( $key );
|
||||||
|
setcookie( $activate_cookie, ' ', time() - YEAR_IN_SECONDS, $activate_path, COOKIE_DOMAIN, is_ssl(), true );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( null === $result || ( is_wp_error( $result ) && 'invalid_key' === $result->get_error_code() ) ) {
|
||||||
|
status_header( 404 );
|
||||||
|
} elseif ( is_wp_error( $result ) ) {
|
||||||
|
$error_code = $result->get_error_code();
|
||||||
|
|
||||||
|
if ( ! in_array( $error_code, $valid_error_codes, true ) ) {
|
||||||
|
status_header( 400 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
nocache_headers();
|
||||||
|
|
||||||
|
// Fix for page title.
|
||||||
|
$wp_query->is_404 = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fires before the Site Activation page is loaded.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*/
|
||||||
|
do_action( 'activate_header' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an action hook specific to this page.
|
||||||
|
*
|
||||||
|
* Fires on {@see 'wp_head'}.
|
||||||
|
*
|
||||||
|
* @since MU (3.0.0)
|
||||||
|
*/
|
||||||
|
function do_activate_header() {
|
||||||
|
/**
|
||||||
|
* Fires within the `<head>` section of the Site Activation page.
|
||||||
|
*
|
||||||
|
* Fires on the {@see 'wp_head'} action.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*/
|
||||||
|
do_action( 'activate_wp_head' );
|
||||||
|
}
|
||||||
|
add_action( 'wp_head', 'do_activate_header' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loads styles specific to this page.
|
||||||
|
*
|
||||||
|
* @since MU (3.0.0)
|
||||||
|
*/
|
||||||
|
function wpmu_activate_stylesheet() {
|
||||||
|
?>
|
||||||
|
<style type="text/css">
|
||||||
|
.wp-activate-container { width: 90%; margin: 0 auto; }
|
||||||
|
.wp-activate-container form { margin-top: 2em; }
|
||||||
|
#submit, #key { width: 100%; font-size: 24px; box-sizing: border-box; }
|
||||||
|
#language { margin-top: 0.5em; }
|
||||||
|
.wp-activate-container .error { background: #f66; color: #333; }
|
||||||
|
span.h3 { padding: 0 8px; font-size: 1.3em; font-weight: 600; }
|
||||||
|
</style>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
add_action( 'wp_head', 'wpmu_activate_stylesheet' );
|
||||||
|
add_action( 'wp_head', 'wp_strict_cross_origin_referrer' );
|
||||||
|
add_filter( 'wp_robots', 'wp_robots_sensitive_page' );
|
||||||
|
|
||||||
|
get_header( 'wp-activate' );
|
||||||
|
|
||||||
|
$blog_details = get_site();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="signup-content" class="widecolumn">
|
||||||
|
<div class="wp-activate-container">
|
||||||
|
<?php if ( ! $key ) { ?>
|
||||||
|
|
||||||
|
<h2><?php _e( 'Activation Key Required' ); ?></h2>
|
||||||
|
<form name="activateform" id="activateform" method="post" action="<?php echo esc_url( network_site_url( $blog_details->path . 'wp-activate.php' ) ); ?>">
|
||||||
|
<p>
|
||||||
|
<label for="key"><?php _e( 'Activation Key:' ); ?></label>
|
||||||
|
<br /><input type="text" name="key" id="key" value="" size="50" autofocus="autofocus" />
|
||||||
|
</p>
|
||||||
|
<p class="submit">
|
||||||
|
<input id="submit" type="submit" name="Submit" class="submit" value="<?php esc_attr_e( 'Activate' ); ?>" />
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
if ( is_wp_error( $result ) && in_array( $result->get_error_code(), $valid_error_codes, true ) ) {
|
||||||
|
$signup = $result->get_error_data();
|
||||||
|
?>
|
||||||
|
<h2><?php _e( 'Your account is now active!' ); ?></h2>
|
||||||
|
<?php
|
||||||
|
echo '<p class="lead-in">';
|
||||||
|
if ( '' === $signup->domain . $signup->path ) {
|
||||||
|
printf(
|
||||||
|
/* translators: 1: Login URL, 2: Username, 3: User email address, 4: Lost password URL. */
|
||||||
|
__( 'Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of “%2$s”. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.' ),
|
||||||
|
esc_url( network_site_url( $blog_details->path . 'wp-login.php', 'login' ) ),
|
||||||
|
esc_html( $signup->user_login ),
|
||||||
|
esc_html( $signup->user_email ),
|
||||||
|
esc_url( wp_lostpassword_url() )
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
printf(
|
||||||
|
/* translators: 1: Site URL, 2: Username, 3: User email address, 4: Lost password URL. */
|
||||||
|
__( 'Your site at %1$s is active. You may now log in to your site using your chosen username of “%2$s”. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.' ),
|
||||||
|
sprintf( '<a href="http://%1$s">%1$s</a>', esc_url( $signup->domain . $blog_details->path ) ),
|
||||||
|
esc_html( $signup->user_login ),
|
||||||
|
esc_html( $signup->user_email ),
|
||||||
|
esc_url( wp_lostpassword_url() )
|
||||||
|
);
|
||||||
|
}
|
||||||
|
echo '</p>';
|
||||||
|
} elseif ( null === $result || is_wp_error( $result ) ) {
|
||||||
|
?>
|
||||||
|
<h2><?php _e( 'An error occurred during the activation' ); ?></h2>
|
||||||
|
<?php if ( is_wp_error( $result ) ) : ?>
|
||||||
|
<p><?php echo esc_html( $result->get_error_message() ); ?></p>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
$url = isset( $result['blog_id'] ) ? esc_url( get_home_url( (int) $result['blog_id'] ) ) : '';
|
||||||
|
$user = get_userdata( (int) $result['user_id'] );
|
||||||
|
?>
|
||||||
|
<h2><?php _e( 'Your account is now active!' ); ?></h2>
|
||||||
|
|
||||||
|
<div id="signup-welcome">
|
||||||
|
<p><span class="h3"><?php _e( 'Username:' ); ?></span> <?php echo esc_html( $user->user_login ); ?></p>
|
||||||
|
<p><span class="h3"><?php _e( 'Password:' ); ?></span> <?php echo esc_html( $result['password'] ); ?></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ( $url && network_home_url( '', 'http' ) !== $url ) :
|
||||||
|
switch_to_blog( (int) $result['blog_id'] );
|
||||||
|
$login_url = wp_login_url();
|
||||||
|
restore_current_blog();
|
||||||
|
?>
|
||||||
|
<p class="view">
|
||||||
|
<?php
|
||||||
|
/* translators: 1: Site URL, 2: Login URL. */
|
||||||
|
printf( __( 'Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Log in</a>' ), esc_url( $url ), esc_url( $login_url ) );
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
<?php else : ?>
|
||||||
|
<p class="view">
|
||||||
|
<?php
|
||||||
|
printf(
|
||||||
|
/* translators: 1: Login URL, 2: Network home URL. */
|
||||||
|
__( 'Your account is now activated. <a href="%1$s">Log in</a> or go back to the <a href="%2$s">homepage</a>.' ),
|
||||||
|
esc_url( network_site_url( $blog_details->path . 'wp-login.php', 'login' ) ),
|
||||||
|
esc_url( network_home_url( $blog_details->path ) )
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
<?php
|
||||||
|
endif;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
get_footer( 'wp-activate' );
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Loads the WordPress environment and template.
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ( ! isset( $wp_did_header ) ) {
|
||||||
|
|
||||||
|
$wp_did_header = true;
|
||||||
|
|
||||||
|
// Load the WordPress library.
|
||||||
|
require_once __DIR__ . '/wp-load.php';
|
||||||
|
|
||||||
|
// Set up the WordPress query.
|
||||||
|
wp();
|
||||||
|
|
||||||
|
// Load the theme template.
|
||||||
|
require_once ABSPATH . WPINC . '/template-loader.php';
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,81 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Handles Comment Post to WordPress and prevents duplicate comment posting.
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ( 'POST' !== $_SERVER['REQUEST_METHOD'] ) {
|
||||||
|
$protocol = $_SERVER['SERVER_PROTOCOL'];
|
||||||
|
if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0', 'HTTP/3' ), true ) ) {
|
||||||
|
$protocol = 'HTTP/1.0';
|
||||||
|
}
|
||||||
|
|
||||||
|
header( 'Allow: POST' );
|
||||||
|
header( "$protocol 405 Method Not Allowed" );
|
||||||
|
header( 'Content-Type: text/plain' );
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Sets up the WordPress Environment. */
|
||||||
|
require __DIR__ . '/wp-load.php';
|
||||||
|
|
||||||
|
nocache_headers();
|
||||||
|
|
||||||
|
$comment = wp_handle_comment_submission( wp_unslash( $_POST ) );
|
||||||
|
if ( is_wp_error( $comment ) ) {
|
||||||
|
$data = (int) $comment->get_error_data();
|
||||||
|
if ( ! empty( $data ) ) {
|
||||||
|
wp_die(
|
||||||
|
'<p>' . $comment->get_error_message() . '</p>',
|
||||||
|
__( 'Comment Submission Failure' ),
|
||||||
|
array(
|
||||||
|
'response' => $data,
|
||||||
|
'back_link' => true,
|
||||||
|
)
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$user = wp_get_current_user();
|
||||||
|
$cookies_consent = ( isset( $_POST['wp-comment-cookies-consent'] ) );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fires after comment cookies are set.
|
||||||
|
*
|
||||||
|
* @since 3.4.0
|
||||||
|
* @since 4.9.6 The `$cookies_consent` parameter was added.
|
||||||
|
*
|
||||||
|
* @param WP_Comment $comment Comment object.
|
||||||
|
* @param WP_User $user Comment author's user object. The user may not exist.
|
||||||
|
* @param bool $cookies_consent Comment author's consent to store cookies.
|
||||||
|
*/
|
||||||
|
do_action( 'set_comment_cookies', $comment, $user, $cookies_consent );
|
||||||
|
|
||||||
|
$location = empty( $_POST['redirect_to'] ) ? get_comment_link( $comment ) : $_POST['redirect_to'] . '#comment-' . $comment->comment_ID;
|
||||||
|
|
||||||
|
// If user didn't consent to cookies, add specific query arguments to display the awaiting moderation message.
|
||||||
|
if ( ! $cookies_consent && 'unapproved' === wp_get_comment_status( $comment ) && ! empty( $comment->comment_author_email ) ) {
|
||||||
|
$location = add_query_arg(
|
||||||
|
array(
|
||||||
|
'unapproved' => $comment->comment_ID,
|
||||||
|
'moderation-hash' => wp_hash( $comment->comment_date_gmt ),
|
||||||
|
),
|
||||||
|
$location
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filters the location URI to send the commenter after posting.
|
||||||
|
*
|
||||||
|
* @since 2.0.5
|
||||||
|
*
|
||||||
|
* @param string $location The 'redirect_to' URI sent via $_POST.
|
||||||
|
* @param WP_Comment $comment Comment object.
|
||||||
|
*/
|
||||||
|
$location = apply_filters( 'comment_post_redirect', $location, $comment );
|
||||||
|
|
||||||
|
wp_safe_redirect( $location );
|
||||||
|
exit;
|
||||||
@ -0,0 +1,102 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* The base configuration for WordPress
|
||||||
|
*
|
||||||
|
* The wp-config.php creation script uses this file during the installation.
|
||||||
|
* You don't have to use the website, you can copy this file to "wp-config.php"
|
||||||
|
* and fill in the values.
|
||||||
|
*
|
||||||
|
* This file contains the following configurations:
|
||||||
|
*
|
||||||
|
* * Database settings
|
||||||
|
* * Secret keys
|
||||||
|
* * Database table prefix
|
||||||
|
* * ABSPATH
|
||||||
|
*
|
||||||
|
* @link https://developer.wordpress.org/advanced-administration/wordpress/wp-config/
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
*/
|
||||||
|
|
||||||
|
// ** Database settings - You can get this info from your web host ** //
|
||||||
|
/** The name of the database for WordPress */
|
||||||
|
define( 'DB_NAME', 'database_name_here' );
|
||||||
|
|
||||||
|
/** Database username */
|
||||||
|
define( 'DB_USER', 'username_here' );
|
||||||
|
|
||||||
|
/** Database password */
|
||||||
|
define( 'DB_PASSWORD', 'password_here' );
|
||||||
|
|
||||||
|
/** Database hostname */
|
||||||
|
define( 'DB_HOST', 'localhost' );
|
||||||
|
|
||||||
|
/** Database charset to use in creating database tables. */
|
||||||
|
define( 'DB_CHARSET', 'utf8mb4' );
|
||||||
|
|
||||||
|
/** The database collate type. Don't change this if in doubt. */
|
||||||
|
define( 'DB_COLLATE', '' );
|
||||||
|
|
||||||
|
/**#@+
|
||||||
|
* Authentication unique keys and salts.
|
||||||
|
*
|
||||||
|
* Change these to different unique phrases! You can generate these using
|
||||||
|
* the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}.
|
||||||
|
*
|
||||||
|
* You can change these at any point in time to invalidate all existing cookies.
|
||||||
|
* This will force all users to have to log in again.
|
||||||
|
*
|
||||||
|
* @since 2.6.0
|
||||||
|
*/
|
||||||
|
define( 'AUTH_KEY', 'put your unique phrase here' );
|
||||||
|
define( 'SECURE_AUTH_KEY', 'put your unique phrase here' );
|
||||||
|
define( 'LOGGED_IN_KEY', 'put your unique phrase here' );
|
||||||
|
define( 'NONCE_KEY', 'put your unique phrase here' );
|
||||||
|
define( 'AUTH_SALT', 'put your unique phrase here' );
|
||||||
|
define( 'SECURE_AUTH_SALT', 'put your unique phrase here' );
|
||||||
|
define( 'LOGGED_IN_SALT', 'put your unique phrase here' );
|
||||||
|
define( 'NONCE_SALT', 'put your unique phrase here' );
|
||||||
|
|
||||||
|
/**#@-*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WordPress database table prefix.
|
||||||
|
*
|
||||||
|
* You can have multiple installations in one database if you give each
|
||||||
|
* a unique prefix. Only numbers, letters, and underscores please!
|
||||||
|
*
|
||||||
|
* At the installation time, database tables are created with the specified prefix.
|
||||||
|
* Changing this value after WordPress is installed will make your site think
|
||||||
|
* it has not been installed.
|
||||||
|
*
|
||||||
|
* @link https://developer.wordpress.org/advanced-administration/wordpress/wp-config/#table-prefix
|
||||||
|
*/
|
||||||
|
$table_prefix = 'wp_';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For developers: WordPress debugging mode.
|
||||||
|
*
|
||||||
|
* Change this to true to enable the display of notices during development.
|
||||||
|
* It is strongly recommended that plugin and theme developers use WP_DEBUG
|
||||||
|
* in their development environments.
|
||||||
|
*
|
||||||
|
* For information on other constants that can be used for debugging,
|
||||||
|
* visit the documentation.
|
||||||
|
*
|
||||||
|
* @link https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/
|
||||||
|
*/
|
||||||
|
define( 'WP_DEBUG', false );
|
||||||
|
|
||||||
|
/* Add any custom values between this line and the "stop editing" line. */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* That's all, stop editing! Happy publishing. */
|
||||||
|
|
||||||
|
/** Absolute path to the WordPress directory. */
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
define( 'ABSPATH', __DIR__ . '/' );
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Sets up WordPress vars and included files. */
|
||||||
|
require_once ABSPATH . 'wp-settings.php';
|
||||||
@ -0,0 +1,104 @@
|
|||||||
|
<?php
|
||||||
|
define( 'WP_CACHE', true ); // Added by WP Rocket
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base configuration for WordPress
|
||||||
|
*
|
||||||
|
* The wp-config.php creation script uses this file during the installation.
|
||||||
|
* You don't have to use the website, you can copy this file to "wp-config.php"
|
||||||
|
* and fill in the values.
|
||||||
|
*
|
||||||
|
* This file contains the following configurations:
|
||||||
|
*
|
||||||
|
* * Database settings
|
||||||
|
* * Secret keys
|
||||||
|
* * Database table prefix
|
||||||
|
* * ABSPATH
|
||||||
|
*
|
||||||
|
* @link https://developer.wordpress.org/advanced-administration/wordpress/wp-config/
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
*/
|
||||||
|
|
||||||
|
// ** Database settings - You can get this info from your web host ** //
|
||||||
|
/** The name of the database for WordPress */
|
||||||
|
define( 'DB_NAME', 'nenghui_sql_new' );
|
||||||
|
|
||||||
|
/** Database username */
|
||||||
|
define( 'DB_USER', 'root' );
|
||||||
|
|
||||||
|
/** Database password */
|
||||||
|
define( 'DB_PASSWORD', 'root123' );
|
||||||
|
|
||||||
|
/** Database hostname */
|
||||||
|
define( 'DB_HOST', 'localhost' );
|
||||||
|
|
||||||
|
/** Database charset to use in creating database tables. */
|
||||||
|
define( 'DB_CHARSET', 'utf8mb4' );
|
||||||
|
|
||||||
|
/** The database collate type. Don't change this if in doubt. */
|
||||||
|
define( 'DB_COLLATE', '' );
|
||||||
|
|
||||||
|
/**#@+
|
||||||
|
* Authentication unique keys and salts.
|
||||||
|
*
|
||||||
|
* Change these to different unique phrases! You can generate these using
|
||||||
|
* the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}.
|
||||||
|
*
|
||||||
|
* You can change these at any point in time to invalidate all existing cookies.
|
||||||
|
* This will force all users to have to log in again.
|
||||||
|
*
|
||||||
|
* @since 2.6.0
|
||||||
|
*/
|
||||||
|
define('AUTH_KEY', 'hcu`M50gkGcDc-*w dkOvcX?a(>U[yzWEWnx)uoWpSVyn8rsrNmC>$l#.$Fw<o;3');
|
||||||
|
define('SECURE_AUTH_KEY', '>5|nA+he~Xy6wd#I|Plj3u+)-lQeH:LJmAKA7paw`$:g/,VA`K{Q=}dFYr~-zUv]');
|
||||||
|
define('LOGGED_IN_KEY', '/DCK24<Q+[92 ?LmkMYur9.|cP^Noxpj5)^!.c[H#_]L1l`o?Qs|HWz|.nz1h`]}');
|
||||||
|
define('NONCE_KEY', 'yh:C9Yv>H2U{>eri&W)1;}Cnv:8Q|]RpUnymRQ6x~}3|Q[wy0yC+|CaZ@-Y=btZD');
|
||||||
|
define('AUTH_SALT', '8WA$moce-{uA$+*84z}8bS);Ei;hedt13a+tpR:/}UNA{0u!^.Hw,SbE,)<q8%p<');
|
||||||
|
define('SECURE_AUTH_SALT', '+jiE7u*x$Bz`-6lr3oWmL+ul(uhA^lAsfKzk=ampakbIYC.zeE:}]BhV0z9ll<9N');
|
||||||
|
define('LOGGED_IN_SALT', '}4W$FK(5n/i<4YA*HE^D_7,%LS<>a(0*d>Zki62CD_HAmY=77sA^AD%HgJ::rXt<');
|
||||||
|
define('NONCE_SALT', 'fs/WpNr<8yo6iRDS&hgru2i0w@K5tC/0T6gxk(f1}XsxfnBX@|pid^<q o98@v:v');
|
||||||
|
|
||||||
|
/**#@-*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WordPress database table prefix.
|
||||||
|
*
|
||||||
|
* You can have multiple installations in one database if you give each
|
||||||
|
* a unique prefix. Only numbers, letters, and underscores please!
|
||||||
|
*
|
||||||
|
* At the installation time, database tables are created with the specified prefix.
|
||||||
|
* Changing this value after WordPress is installed will make your site think
|
||||||
|
* it has not been installed.
|
||||||
|
*
|
||||||
|
* @link https://developer.wordpress.org/advanced-administration/wordpress/wp-config/#table-prefix
|
||||||
|
*/
|
||||||
|
$table_prefix = 'wp_';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For developers: WordPress debugging mode.
|
||||||
|
*
|
||||||
|
* Change this to true to enable the display of notices during development.
|
||||||
|
* It is strongly recommended that plugin and theme developers use WP_DEBUG
|
||||||
|
* in their development environments.
|
||||||
|
*
|
||||||
|
* For information on other constants that can be used for debugging,
|
||||||
|
* visit the documentation.
|
||||||
|
*
|
||||||
|
* @link https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/
|
||||||
|
*/
|
||||||
|
define( 'WP_DEBUG', false);
|
||||||
|
|
||||||
|
/* Add any custom values between this line and the "stop editing" line. */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* That's all, stop editing! Happy publishing. */
|
||||||
|
|
||||||
|
/** Absolute path to the WordPress directory. */
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
define( 'ABSPATH', __DIR__ . '/' );
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Sets up WordPress vars and included files. */
|
||||||
|
require_once ABSPATH . 'wp-settings.php';
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
<?php
|
||||||
|
// Silence is golden.
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* 案例归档页面模板
|
||||||
|
* 用于显示 cases 自定义文章类型的归档页面
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<?php get_header();?>
|
||||||
|
|
||||||
|
<div class="page-full-width">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<?php echo do_shortcode('[nenghui_banner_title bg_image="https://nenghui.com/wp-content/uploads/2025/07/cases-bg.webp" title="CASES" description="Nenghui Energy Cases Successful solar & storage renewable project examples." overlay_opacity="0.5"]'); ?>
|
||||||
|
<?php echo do_shortcode('[nenghui_cases posts_per_page="6" default_category="power-station" columns="3" show_tabs="true" show_pagination="true"]'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php get_footer();?>
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* FAQ归档页面模板
|
||||||
|
* 用于显示 FAQ 自定义文章类型的归档页面
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<?php get_header();?>
|
||||||
|
|
||||||
|
<div class="page-full-width">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<?php echo do_shortcode('[nenghui_banner_title title="FAQ" bg_image="https://nenghui.com/wp-content/uploads/2025/07/SUPPORT.webp" description="Nenghui Energy FAQs Answers on renewable solutions services sustainability and support for solar wind storage" overlay_opacity="0.5"]'); ?>
|
||||||
|
<?php echo do_shortcode('[nenghui_about_nav menu_id="7"]'); ?>
|
||||||
|
<?php echo do_shortcode('[nenghui_faq title="FREQUENTLY ASKED QUESTIONS" show_animation]'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php get_footer();?>
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* 新闻列表页
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<?php get_header();?>
|
||||||
|
|
||||||
|
<div class="page-full-width">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<?php
|
||||||
|
// 获取分类图片作为banner背景
|
||||||
|
$banner_bg_image = 'https://nenghui.com/wp-content/uploads/2025/07/News-top-bg.webp'; // 默认背景图片
|
||||||
|
if (is_category()) {
|
||||||
|
$category = get_queried_object();
|
||||||
|
$category_image_url = get_category_image_url($category->term_id, 'full');
|
||||||
|
if ($category_image_url) {
|
||||||
|
$banner_bg_image = $category_image_url;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo do_shortcode('[nenghui_banner_title bg_image="' . esc_url($banner_bg_image) . '" title="NEWS" description="Nenghui has been awarded excellent honors in the industry and is committed to providing prompt service for all of our current and potential customers." overlay_opacity="0.5"]');
|
||||||
|
?>
|
||||||
|
<?php echo do_shortcode('[nenghui_about_nav menu_id="4"]'); ?>
|
||||||
|
<?php echo do_shortcode('[nenghui_news_grid title="NEWS" posts_per_page="12" enable_pagination="true" order_by="date" order="DESC"]'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php get_footer();?>
|
||||||
@ -0,0 +1,278 @@
|
|||||||
|
.black-about-company-banner {
|
||||||
|
background-color: #fff;
|
||||||
|
color: #333;
|
||||||
|
padding: 60px 0;
|
||||||
|
overflow: hidden;
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 90%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner-content {
|
||||||
|
display: flex;
|
||||||
|
gap: 40px;
|
||||||
|
align-items: flex-start;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner-left {
|
||||||
|
flex: 1;
|
||||||
|
max-width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-image {
|
||||||
|
width: 100%;
|
||||||
|
height: auto !important;;
|
||||||
|
border-radius: 8px;
|
||||||
|
overflow: hidden;
|
||||||
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-image img {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
display: block;
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-image:hover img {
|
||||||
|
transform: scale(1.02);
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner-right {
|
||||||
|
flex: 1;
|
||||||
|
max-width: 50%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-text h2 {
|
||||||
|
font-size: 26px;
|
||||||
|
color: #007cba;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-text p {
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.6;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mass-production h3 {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mass-production p {
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.6;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Swiper轮播容器样式 */
|
||||||
|
.production-carousel-container {
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 6px;
|
||||||
|
background: #f8f9fa;
|
||||||
|
padding: 4px;
|
||||||
|
border: 1px solid #e9ecef;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.production-swiper {
|
||||||
|
width: 100%;
|
||||||
|
height: 88px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.production-swiper .swiper-wrapper {
|
||||||
|
align-items: center;
|
||||||
|
transition-timing-function: linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.production-swiper .swiper-slide {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 80px;
|
||||||
|
width: auto !important;
|
||||||
|
flex-shrink: 0;
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.production-swiper .swiper-slide img {
|
||||||
|
width: auto;
|
||||||
|
height: auto;
|
||||||
|
max-height: 80px;
|
||||||
|
max-width: 120px;
|
||||||
|
min-width: 80px;
|
||||||
|
object-fit: contain;
|
||||||
|
border-radius: 2px;
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
background: #fff;
|
||||||
|
margin: 0 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.production-swiper .swiper-slide:hover img {
|
||||||
|
transform: scale(1.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Swiper导航按钮样式 */
|
||||||
|
.production-swiper .swiper-button-next,
|
||||||
|
.production-swiper .swiper-button-prev {
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
margin-top: -12px;
|
||||||
|
background: rgba(255, 255, 255, 0.9);
|
||||||
|
border-radius: 50%;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
||||||
|
color: #333;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.production-swiper .swiper-button-next:hover,
|
||||||
|
.production-swiper .swiper-button-prev:hover {
|
||||||
|
background: #2196F3;
|
||||||
|
color: white;
|
||||||
|
transform: scale(1.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.production-swiper .swiper-button-next::after,
|
||||||
|
.production-swiper .swiper-button-prev::after {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.production-swiper .swiper-button-next {
|
||||||
|
right: -12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.production-swiper .swiper-button-prev {
|
||||||
|
left: -12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Swiper分页器样式 */
|
||||||
|
.production-swiper .swiper-pagination {
|
||||||
|
bottom: -20px;
|
||||||
|
position: relative;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.production-swiper .swiper-pagination-bullet {
|
||||||
|
width: 20px;
|
||||||
|
height: 3px;
|
||||||
|
background: #ddd;
|
||||||
|
opacity: 1;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
border-radius: 2px;
|
||||||
|
margin: 0 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.production-swiper .swiper-pagination-bullet-active {
|
||||||
|
background: #2196F3;
|
||||||
|
transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 响应式设计 */
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.production-swiper {
|
||||||
|
height: 88px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.production-swiper .swiper-slide {
|
||||||
|
height: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.production-swiper .swiper-slide img {
|
||||||
|
max-height: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.production-swiper .swiper-button-next,
|
||||||
|
.production-swiper .swiper-button-prev {
|
||||||
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
margin-top: -14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.production-swiper .swiper-button-next::after,
|
||||||
|
.production-swiper .swiper-button-prev::after {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.banner-content {
|
||||||
|
flex-direction: column;
|
||||||
|
text-align: center;
|
||||||
|
gap: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner-left,
|
||||||
|
.banner-right {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner-right {
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-text h2 {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-text p,
|
||||||
|
.mass-production p {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.production-swiper {
|
||||||
|
height: 68px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.production-swiper .swiper-slide {
|
||||||
|
height: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.production-swiper .swiper-slide img {
|
||||||
|
max-height: 60px;
|
||||||
|
max-width: 100px;
|
||||||
|
min-width: 60px;
|
||||||
|
margin: 0 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.production-swiper .swiper-button-next,
|
||||||
|
.production-swiper .swiper-button-prev {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
margin-top: -10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.production-swiper .swiper-button-next::after,
|
||||||
|
.production-swiper .swiper-button-prev::after {
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.production-swiper .swiper-button-next {
|
||||||
|
right: -8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.production-swiper .swiper-button-prev {
|
||||||
|
left: -8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 480px) {
|
||||||
|
.black-about-company-banner {
|
||||||
|
padding: 40px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-text h2 {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-text p,
|
||||||
|
.mass-production p {
|
||||||
|
font-size: 0.85rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,109 @@
|
|||||||
|
/**
|
||||||
|
* Black Maps Block Styles
|
||||||
|
* WordPress标准地图区块样式文件
|
||||||
|
*/
|
||||||
|
|
||||||
|
.black-maps-wrapper {
|
||||||
|
background-size: 100% 100%;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.black-maps-container {
|
||||||
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
#echartsMap {
|
||||||
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 响应式设计 */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.black-maps-wrapper,
|
||||||
|
.black-maps-container,
|
||||||
|
#echartsMap {
|
||||||
|
height: 60vh;
|
||||||
|
min-height: 400px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 480px) {
|
||||||
|
.black-maps-wrapper,
|
||||||
|
.black-maps-container,
|
||||||
|
#echartsMap {
|
||||||
|
height: 50vh;
|
||||||
|
min-height: 350px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 加载状态样式 */
|
||||||
|
.black-maps-loading {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100%;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.black-maps-loading::after {
|
||||||
|
content: '';
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
margin-left: 10px;
|
||||||
|
border: 2px solid #f3f3f3;
|
||||||
|
border-top: 2px solid #3498db;
|
||||||
|
border-radius: 50%;
|
||||||
|
animation: spin 1s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes spin {
|
||||||
|
0% { transform: rotate(0deg); }
|
||||||
|
100% { transform: rotate(360deg); }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 错误状态样式 */
|
||||||
|
.black-maps-error {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100%;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #e74c3c;
|
||||||
|
text-align: center;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 自定义器预览模式样式 */
|
||||||
|
.customize-preview .black-maps-wrapper {
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 地图标题样式覆盖 */
|
||||||
|
.black-maps-wrapper .echarts-title {
|
||||||
|
font-family: inherit;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 地图工具提示样式 */
|
||||||
|
.black-maps-wrapper .echarts-tooltip {
|
||||||
|
background-color: rgba(0, 0, 0, 0.8);
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 12px;
|
||||||
|
padding: 8px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 确保地图容器不会溢出 */
|
||||||
|
.black-maps-wrapper * {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
@ -0,0 +1,326 @@
|
|||||||
|
/**
|
||||||
|
* 业务流程设计区块样式
|
||||||
|
* Business Process Block Styles
|
||||||
|
*/
|
||||||
|
|
||||||
|
.business-process-block {
|
||||||
|
padding: 80px 0;
|
||||||
|
background: #f8f9fa;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.business-process-block .container {
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 0 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 头部样式 */
|
||||||
|
.process-header {
|
||||||
|
text-align: left;
|
||||||
|
margin-bottom: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-title {
|
||||||
|
font-size: 2.5rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #2c3e50;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-subtitle {
|
||||||
|
font-size: 1.125rem;
|
||||||
|
color: #6c757d;
|
||||||
|
margin: 0;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 主要内容区域 */
|
||||||
|
.process-content {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
gap: 60px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 左侧Tab标签区域 */
|
||||||
|
.process-tabs {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-tab {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 24px 0;
|
||||||
|
background: transparent;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
border-bottom: 1px solid #e9ecef;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-tab:hover {
|
||||||
|
background: rgba(0, 149, 123, 0.02);
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-tab.active {
|
||||||
|
background: rgba(0, 149, 123, 0.05);
|
||||||
|
border-left: 4px solid #00957b;
|
||||||
|
padding-left: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-number {
|
||||||
|
font-size: 2.5rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #00957b;
|
||||||
|
margin-right: 24px;
|
||||||
|
min-width: 70px;
|
||||||
|
text-align: left;
|
||||||
|
transition: color 0.3s ease;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-tab.active .tab-number {
|
||||||
|
color: #00957b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-tab:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-content {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-title {
|
||||||
|
font-size: 1.25rem;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
color: #2c3e50;
|
||||||
|
transition: color 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-tab.active .tab-title {
|
||||||
|
color: #00957b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-description {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
color: #6c757d;
|
||||||
|
margin: 0;
|
||||||
|
line-height: 1.6;
|
||||||
|
transition: color 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-tab.active .tab-description {
|
||||||
|
color: #6c757d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-arrow {
|
||||||
|
margin-left: 20px;
|
||||||
|
color: #00957b;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
opacity: 0.7;
|
||||||
|
font-size: 1.1rem;
|
||||||
|
transform: translateX(-14px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-tab.active .tab-arrow {
|
||||||
|
color: #00957b;
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateX(-14px);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 右侧图片显示区域 */
|
||||||
|
.process-images {
|
||||||
|
position: relative;
|
||||||
|
height: 500px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-image {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity 0.5s ease;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-image.active {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-image img {
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
object-position: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 响应式设计 */
|
||||||
|
@media (max-width: 1024px) {
|
||||||
|
.business-process-block {
|
||||||
|
padding: 60px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-content {
|
||||||
|
gap: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-images {
|
||||||
|
height: 400px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.business-process-block {
|
||||||
|
padding: 40px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.business-process-block .container {
|
||||||
|
padding: 0 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-header {
|
||||||
|
margin-bottom: 40px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-title {
|
||||||
|
font-size: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-subtitle {
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-content {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
gap: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-tabs {
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-tab {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-number {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
margin-right: 16px;
|
||||||
|
min-width: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-title {
|
||||||
|
font-size: 1.125rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-description {
|
||||||
|
font-size: 0.8125rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-images {
|
||||||
|
height: 300px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 480px) {
|
||||||
|
.process-tab {
|
||||||
|
padding: 16px;
|
||||||
|
flex-direction: column;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-number {
|
||||||
|
margin-right: 0;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-arrow {
|
||||||
|
margin-left: 0;
|
||||||
|
margin-top: 12px;
|
||||||
|
transform: rotate(90deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-tab.active .tab-arrow {
|
||||||
|
transform: rotate(90deg) translateX(4px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-images {
|
||||||
|
height: 250px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 动画效果 */
|
||||||
|
@keyframes fadeInUp {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(30px);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.business-process-block.animate-in .process-header,
|
||||||
|
.business-process-block.animate-in .process-tab,
|
||||||
|
.business-process-block.animate-in .process-images {
|
||||||
|
animation: fadeInUp 0.6s ease forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
.business-process-block.animate-in .process-tab:nth-child(1) {
|
||||||
|
animation-delay: 0.1s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.business-process-block.animate-in .process-tab:nth-child(2) {
|
||||||
|
animation-delay: 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.business-process-block.animate-in .process-tab:nth-child(3) {
|
||||||
|
animation-delay: 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.business-process-block.animate-in .process-tab:nth-child(4) {
|
||||||
|
animation-delay: 0.4s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.business-process-block.animate-in .process-images {
|
||||||
|
animation-delay: 0.5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 打印样式 */
|
||||||
|
@media print {
|
||||||
|
.business-process-block {
|
||||||
|
background: #ffffff;
|
||||||
|
padding: 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-content {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
gap: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-tab {
|
||||||
|
box-shadow: none;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.process-images {
|
||||||
|
height: 300px;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
|
||||||
|
/* feature-module 模块 */
|
||||||
|
.feature-module {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 1300px;
|
||||||
|
margin: 40px auto;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-inner {
|
||||||
|
display: flex;
|
||||||
|
align-items: stretch;
|
||||||
|
gap: 15px;
|
||||||
|
padding: 15px; /* 让外框与内容留出安全距离 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 左侧文字区域 */
|
||||||
|
.feature-text {
|
||||||
|
flex: 0 0 50%;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
.feature-text h2 {
|
||||||
|
color: #116598;
|
||||||
|
font-size: 28px;
|
||||||
|
font-weight: 400;
|
||||||
|
margin: 0 0 16px;
|
||||||
|
}
|
||||||
|
.feature-text p {
|
||||||
|
color: #808080;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1.5;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-divider {
|
||||||
|
width: 32px;
|
||||||
|
height: 3px;
|
||||||
|
background-color: #116598;
|
||||||
|
border-radius: 2px;
|
||||||
|
margin: 12px 0 16px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 右侧图片区域(背景图) */
|
||||||
|
.feature-media {
|
||||||
|
flex: 0 0 40%;
|
||||||
|
border-radius: 15px;
|
||||||
|
background: url('../images/tgrdfrfed.jpg');
|
||||||
|
background-size: cover; /* 保持比例,填充容器 */
|
||||||
|
background-position: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
min-height: 280px; /* 保证在文本较少时也有可视高度 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 响应式:小屏幕上下布局 */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.feature-inner { flex-direction: column; }
|
||||||
|
.feature-text { flex: 1 1 auto; padding: 16px; }
|
||||||
|
.feature-media { flex: 1 1 auto; min-height: 220px; }
|
||||||
|
}
|
||||||
@ -0,0 +1,227 @@
|
|||||||
|
.article-content h1 {
|
||||||
|
font-size: 25px;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content h2 {
|
||||||
|
font-size: 30px;
|
||||||
|
color: #0073aa;
|
||||||
|
font-weight: bold;
|
||||||
|
border-bottom: 2px solid #0073aa;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content h3 {
|
||||||
|
font-size: 26px;
|
||||||
|
color: #333;
|
||||||
|
font-weight: normal;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content h4 {
|
||||||
|
font-size: 22px;
|
||||||
|
color: #555;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content h5 {
|
||||||
|
font-size: 18px;
|
||||||
|
color: #666;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-top: 15px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content h6 {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #777;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 段落样式 */
|
||||||
|
.article-content p {
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.8;
|
||||||
|
color: #000000;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
word-wrap: break-word;
|
||||||
|
overflow-wrap: break-word;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 链接样式 */
|
||||||
|
.article-content a {
|
||||||
|
color: #0073aa;
|
||||||
|
text-decoration: none;
|
||||||
|
border-bottom: 1px solid transparent;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content a:hover {
|
||||||
|
color: #0056b3;
|
||||||
|
text-decoration: underline;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 列表样式 */
|
||||||
|
.article-content ul,
|
||||||
|
.article-content ol {
|
||||||
|
margin: 16px 0;
|
||||||
|
padding-left: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content ul li,
|
||||||
|
.article-content ol li {
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1.6;
|
||||||
|
color: #333;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content ul li {
|
||||||
|
list-style-type: disc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content ol li {
|
||||||
|
list-style-type: decimal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 引用样式 */
|
||||||
|
.article-content blockquote {
|
||||||
|
background: #f9f9f9;
|
||||||
|
border-left: 4px solid #0073aa;
|
||||||
|
margin: 20px 0;
|
||||||
|
padding: 15px 20px;
|
||||||
|
font-style: italic;
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content blockquote p {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 代码样式 */
|
||||||
|
.article-content code {
|
||||||
|
background: #f4f4f4;
|
||||||
|
padding: 2px 6px;
|
||||||
|
border-radius: 3px;
|
||||||
|
font-family: 'Courier New', monospace;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #d63384;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content pre {
|
||||||
|
background: #f8f8f8;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 15px;
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content pre code {
|
||||||
|
background: none;
|
||||||
|
padding: 0;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 图片样式 */
|
||||||
|
.article-content img {
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
|
border-radius: 5px;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||||
|
margin: 20px 0;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 表格样式 */
|
||||||
|
.article-content table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin: 20px 0;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content table th,
|
||||||
|
.article-content table td {
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
padding: 12px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content table th {
|
||||||
|
background: #f5f5f5;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content table tr:nth-child(even) {
|
||||||
|
background: #f9f9f9;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 分隔线样式 */
|
||||||
|
.article-content hr {
|
||||||
|
border: none;
|
||||||
|
height: 2px;
|
||||||
|
background: linear-gradient(to right, #0073aa, #2eb6aa);
|
||||||
|
margin: 30px 0;
|
||||||
|
border-radius: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 强调文本样式 */
|
||||||
|
.article-content strong,
|
||||||
|
.article-content b {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #333;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content em,
|
||||||
|
.article-content i {
|
||||||
|
font-style: italic;
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 文章容器整体样式 */
|
||||||
|
.article-content {
|
||||||
|
margin: 20px auto;
|
||||||
|
padding: 30px;
|
||||||
|
font-family: 'Arial', 'Microsoft YaHei', sans-serif;
|
||||||
|
background: #fff;
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||||
|
border-radius: 8px;
|
||||||
|
word-wrap: break-word;
|
||||||
|
overflow-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 响应式设计 */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.article-content {
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content h1 {
|
||||||
|
font-size: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content h2 {
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content h3 {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content h4 {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content p {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,740 @@
|
|||||||
|
/**
|
||||||
|
* 产品详情页样式
|
||||||
|
* Product Content Page Styles
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* 产品特性样式 */
|
||||||
|
.product-features {
|
||||||
|
padding: 60px 0;
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2.product-title {
|
||||||
|
align-content: center;
|
||||||
|
padding: 0 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-description{
|
||||||
|
color: #666;
|
||||||
|
line-height: 1.5;
|
||||||
|
padding: 10px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.features-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||||
|
gap: 30px;
|
||||||
|
padding: 0 20px;
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-card {
|
||||||
|
background: #ffffff;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 40px 30px;
|
||||||
|
text-align: center;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-card:hover {
|
||||||
|
border-radius: 0;
|
||||||
|
transform: translateY(-5px);
|
||||||
|
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-card::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 5px;
|
||||||
|
background: linear-gradient(90deg, #009294 0%, #116698 100%);
|
||||||
|
transform: scaleX(0);
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-card:hover::after {
|
||||||
|
transform: scaleX(1);
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-icon {
|
||||||
|
margin-bottom: 25px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-icon img {
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-title {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 1.3;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-description {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #666666;
|
||||||
|
line-height: 1.5;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 响应式设计 */
|
||||||
|
@media (max-width: 992px) {
|
||||||
|
.features-grid {
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||||
|
gap: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-card {
|
||||||
|
padding: 35px 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-icon img {
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.features-grid {
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
||||||
|
gap: 20px;
|
||||||
|
padding: 0 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-card {
|
||||||
|
padding: 30px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-icon img {
|
||||||
|
width: 45px;
|
||||||
|
height: 45px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-title {
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-description {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 576px) {
|
||||||
|
.features-grid {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-features {
|
||||||
|
padding: 40px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-card {
|
||||||
|
padding: 25px 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-icon {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-icon img {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-title {
|
||||||
|
font-size: 14px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-description {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 使用场景板块样式 */
|
||||||
|
.usage-scenario-section {
|
||||||
|
padding: 20px 0;
|
||||||
|
background: #f8f9fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.usage-scenario-content {
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 0 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scenario-header {
|
||||||
|
text-align: left;
|
||||||
|
margin-bottom: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scenario-title {
|
||||||
|
font-size: 36px;
|
||||||
|
font-weight: 700;
|
||||||
|
background: linear-gradient(to bottom, #30b7aa, #027da4);
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
-webkit-text-fill-color: transparent;
|
||||||
|
background-clip: text;
|
||||||
|
letter-spacing: 2px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scenario-description {
|
||||||
|
font-size: 18px;
|
||||||
|
color: #666666;
|
||||||
|
line-height: 1.6;
|
||||||
|
margin: 0;
|
||||||
|
max-width: 600px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scenario-image {
|
||||||
|
text-align: center;
|
||||||
|
margin: 50px 0;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scenario-image img {
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
|
border-radius: 8px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scenario-footer {
|
||||||
|
text-align: left;
|
||||||
|
margin-top: 50px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scenario-text {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #555555;
|
||||||
|
line-height: 1.8;
|
||||||
|
margin: 0;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 响应式设计 */
|
||||||
|
@media (max-width: 992px) {
|
||||||
|
.usage-scenario-section {
|
||||||
|
padding: 60px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scenario-title {
|
||||||
|
font-size: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scenario-description {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scenario-text {
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.usage-scenario-section {
|
||||||
|
padding: 50px 0;
|
||||||
|
margin-top: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.usage-scenario-content {
|
||||||
|
padding: 0 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scenario-header {
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scenario-title {
|
||||||
|
font-size: 26px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scenario-description {
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scenario-image {
|
||||||
|
margin: 40px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scenario-footer {
|
||||||
|
margin-top: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scenario-text {
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 576px) {
|
||||||
|
.usage-scenario-section {
|
||||||
|
padding: 40px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scenario-title {
|
||||||
|
font-size: 22px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scenario-description {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scenario-image {
|
||||||
|
margin: 30px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scenario-text {
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 技术规格板块样式 */
|
||||||
|
.technical-specs-section {
|
||||||
|
padding: 20px 0;
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.technical-specs-content {
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 0 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.specs-header {
|
||||||
|
text-align: left;
|
||||||
|
margin-bottom: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.specs-title {
|
||||||
|
font-size: 36px;
|
||||||
|
font-weight: 700;
|
||||||
|
background: linear-gradient(to bottom, #30b7aa, #027da4);
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
-webkit-text-fill-color: transparent;
|
||||||
|
background-clip: text;
|
||||||
|
letter-spacing: 2px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.specs-accordion {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-item {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
background: #ffffff;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
border-radius: 8px;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: box-shadow 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-item:hover {
|
||||||
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-trigger {
|
||||||
|
width: 100%;
|
||||||
|
padding: 20px 24px;
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
text-align: left;
|
||||||
|
transition: background-color 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-trigger:hover {
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-trigger:focus {
|
||||||
|
outline: 2px solid #30b7aa;
|
||||||
|
outline-offset: -2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-title {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
margin: 0;
|
||||||
|
color: #333333;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-icon {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
position: relative;
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-left: 16px;
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-icon::before,
|
||||||
|
.accordion-icon::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
background: #30b7aa;
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-icon::before {
|
||||||
|
width: 12px;
|
||||||
|
height: 2px;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-icon::after {
|
||||||
|
width: 2px;
|
||||||
|
height: 12px;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-item.is-expanded .accordion-icon::after {
|
||||||
|
transform: translate(-50%, -50%) rotate(90deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-panel {
|
||||||
|
max-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
|
background: #ffffff;
|
||||||
|
will-change: max-height;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-panel[hidden] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-content {
|
||||||
|
padding: 24px;
|
||||||
|
color: #555555;
|
||||||
|
line-height: 1.6;
|
||||||
|
border-top: 1px solid #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 响应式设计 */
|
||||||
|
@media (max-width: 992px) {
|
||||||
|
.specs-title {
|
||||||
|
font-size: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-trigger {
|
||||||
|
padding: 18px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-title {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-content {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.technical-specs-content {
|
||||||
|
padding: 0 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.specs-header {
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.specs-title {
|
||||||
|
font-size: 26px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-trigger {
|
||||||
|
padding: 16px 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-title {
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-icon {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
margin-left: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-icon::before {
|
||||||
|
width: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-icon::after {
|
||||||
|
height: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-content {
|
||||||
|
padding: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 576px) {
|
||||||
|
.specs-title {
|
||||||
|
font-size: 22px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-item {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-trigger {
|
||||||
|
padding: 14px 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-title {
|
||||||
|
font-size: 14px;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-icon {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-icon::before {
|
||||||
|
width: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-icon::after {
|
||||||
|
height: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion-content {
|
||||||
|
padding: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* PDF下载板块样式 */
|
||||||
|
.pdf-downloads-section {
|
||||||
|
padding: 60px 0;
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pdf-downloads-content {
|
||||||
|
padding: 0 20px;
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.downloads-header {
|
||||||
|
text-align: left;
|
||||||
|
margin-bottom: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.downloads-title {
|
||||||
|
font-size: 32px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #333333;
|
||||||
|
letter-spacing: 2px;
|
||||||
|
margin: 0;
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.downloads-title::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
bottom: -10px;
|
||||||
|
left: 0;
|
||||||
|
width: 60px;
|
||||||
|
height: 3px;
|
||||||
|
background: linear-gradient(90deg, #009294 0%, #116698 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.downloads-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
gap: 20px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.download-item {
|
||||||
|
background: #ffffff;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 25px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 20px;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.download-item:hover {
|
||||||
|
transform: translateY(-3px);
|
||||||
|
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
|
||||||
|
border-color: #009294;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.download-icon {
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pdf-icon {
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.download-info {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.download-title {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #333333;
|
||||||
|
margin: 0 0 8px 0;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.download-description {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #666666;
|
||||||
|
margin: 0 0 8px 0;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.download-size {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #999999;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.download-action {
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.download-button {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
background: linear-gradient(135deg, #009294 0%, #116698 100%);
|
||||||
|
border-radius: 50%;
|
||||||
|
text-decoration: none;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
box-shadow: 0 4px 15px rgba(0, 146, 148, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.download-button:hover {
|
||||||
|
transform: scale(1.1);
|
||||||
|
box-shadow: 0 6px 20px rgba(0, 146, 148, 0.4);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.download-btn-icon {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
filter: brightness(0) invert(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 响应式设计 */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.pdf-downloads-section {
|
||||||
|
padding: 40px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pdf-downloads-content {
|
||||||
|
padding: 0 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.downloads-title {
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.download-item {
|
||||||
|
padding: 20px;
|
||||||
|
gap: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.download-title {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.download-description {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pdf-icon {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.download-button {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.download-btn-icon {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 480px) {
|
||||||
|
.download-item {
|
||||||
|
flex-direction: column;
|
||||||
|
text-align: center;
|
||||||
|
gap: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.download-info {
|
||||||
|
order: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.download-icon {
|
||||||
|
order: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.download-action {
|
||||||
|
order: 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 302 KiB |
|
After Width: | Height: | Size: 452 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 630 KiB |
|
After Width: | Height: | Size: 79 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 130 KiB |
|
After Width: | Height: | Size: 399 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 329 KiB |
|
After Width: | Height: | Size: 419 KiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 242 KiB |
|
After Width: | Height: | Size: 137 KiB |
|
After Width: | Height: | Size: 495 B |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 152 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 682 KiB |
|
After Width: | Height: | Size: 634 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 422 KiB |
|
After Width: | Height: | Size: 236 KiB |
|
After Width: | Height: | Size: 245 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 9.9 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 123 KiB |
|
After Width: | Height: | Size: 269 KiB |
@ -0,0 +1,84 @@
|
|||||||
|
/**
|
||||||
|
* 自定义器控制脚本
|
||||||
|
* 用于增强自定义器界面的用户体验
|
||||||
|
*/
|
||||||
|
|
||||||
|
// 立即定义全局测试函数,确保在控制台中可用
|
||||||
|
window.testGalleryControls = function() {
|
||||||
|
if (typeof $ !== 'undefined') {
|
||||||
|
var galleryWrappers = $('.gallery-control-wrapper');
|
||||||
|
var selectButtons = $('.gallery-select-button');
|
||||||
|
var clearButtons = $('.gallery-clear-button');
|
||||||
|
|
||||||
|
return {
|
||||||
|
wrappers: galleryWrappers.length,
|
||||||
|
selectButtons: selectButtons.length,
|
||||||
|
clearButtons: clearButtons.length,
|
||||||
|
mediaAvailable: typeof wp !== 'undefined' && typeof wp.media !== 'undefined',
|
||||||
|
customizeAvailable: typeof wp !== 'undefined' && typeof wp.customize !== 'undefined'
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
return { error: 'jQuery not available' };
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
window.triggerGallerySelect = function() {
|
||||||
|
if (typeof $ === 'undefined') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var selectButton = $('.gallery-select-button').first();
|
||||||
|
if (selectButton.length > 0) {
|
||||||
|
selectButton.trigger('click');
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
(function($) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
// 当自定义器准备就绪时执行
|
||||||
|
wp.customize.bind('ready', function() {
|
||||||
|
|
||||||
|
// 确保媒体库已加载
|
||||||
|
if (typeof wp.media === 'undefined') {
|
||||||
|
// Error handling silently
|
||||||
|
}
|
||||||
|
|
||||||
|
// 强制初始化媒体库
|
||||||
|
if (typeof wp.media !== 'undefined') {
|
||||||
|
wp.media.view.settings.post.id = 0;
|
||||||
|
}
|
||||||
|
// 添加Banner面板的帮助信息
|
||||||
|
var bannerPanel = wp.customize.panel('nenghui_banner_panel');
|
||||||
|
// if (bannerPanel) {
|
||||||
|
// bannerPanel.container.find('.accordion-section-title').after(
|
||||||
|
// '<p class="description customize-panel-description">' +
|
||||||
|
// '配置完成后,您可以在任何文章或页面中使用短代码 <code>[nenghui_banner]</code> 来显示Banner轮播。' +
|
||||||
|
// '</p>'
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 添加Banner Title面板的帮助信息
|
||||||
|
var bannerTitlePanel = wp.customize.panel('nenghui_banner_title_panel');
|
||||||
|
// if (bannerTitlePanel) {
|
||||||
|
// bannerTitlePanel.container.find('.accordion-section-title').after(
|
||||||
|
// '<p class="description customize-panel-description">' +
|
||||||
|
// '配置完成后,您可以在任何文章或页面中使用短代码 <code>[nenghui_banner_title]</code> 来显示Banner标题区块。' +
|
||||||
|
// '</p>'
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 添加Futures面板的帮助信息
|
||||||
|
var futuresPanel = wp.customize.panel('nenghui_futures_panel');
|
||||||
|
// if (futuresPanel) {
|
||||||
|
// futuresPanel.container.find('.accordion-section-title').after(
|
||||||
|
// '<p class="description customize-panel-description">' +
|
||||||
|
// '配置完成后,您可以在任何文章或页面中使用短代码 <code>[nenghui_futures]</code> 来显示Futures区块。' +
|
||||||
|
// '</p>'
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
});
|
||||||
|
})(jQuery);
|
||||||
@ -0,0 +1 @@
|
|||||||
|
(function webpackUniversalModuleDefinition(root,factory){if(typeof exports==='object'&&typeof module==='object')module.exports=factory();else if(typeof define==='function'&&define.amd)define("tinytyper",[],factory);else if(typeof exports==='object')exports["tinytyper"]=factory();else root["tinytyper"]=factory()})(this,function(){return(function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={exports:{},id:moduleId,loaded:false};modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);module.loaded=true;return module.exports}__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.p="";return __webpack_require__(0)})([function(module,exports,__webpack_require__){'use strict';Object.defineProperty(exports,"__esModule",{value:true});var _tinytyper=__webpack_require__(1);var _tinytyper2=_interopRequireDefault(_tinytyper);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=_tinytyper2.default;module.exports=exports['default']},function(module,exports,__webpack_require__){'use strict';Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _blinker=__webpack_require__(2);var _blinker2=_interopRequireDefault(_blinker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}var TinyTyper=function(){function TinyTyper(el){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,TinyTyper);this.element=el;this.cursor=document.createElement('span');this.textEl=document.createElement('span');this.options=options;this.text=options.text||el.innerText;this.textEl.className=options.textClass||'tiny-typer-text';this.cursor.className=options.cursorClass||'tiny-typer-cursor';this.cursor.innerHTML=options.cursor||' ▌';this.init()}_createClass(TinyTyper,[{key:'init',value:function init(){this.element.innerHTML='';this.element.innerText='';this.element.appendChild(this.textEl);this.element.appendChild(this.cursor);if(!this.options.staticCursor)this.blinker=(0,_blinker2.default)(this.cursor,this.options.blinkSpeed||0.05);if(!this.options.staticText){this.animate()}else{this.redraw(this.text)}}},{key:'animate',value:function animate(){var _this=this;var symbols=this.text.split('');var result=[];var animation=function animation(){return setTimeout(tick,_this.options.textSpeed||95)};var tick=function tick(){result.push(symbols.shift());_this.redraw(result.join(''));if(symbols.length)animation()};animation()}},{key:'redraw',value:function redraw(text){this.textEl.innerText=text}}]);return TinyTyper}();exports.default=TinyTyper;module.exports=exports['default']},function(module,exports){'use strict';Object.defineProperty(exports,"__esModule",{value:true});exports.fadeOut=fadeOut;exports.fadeIn=fadeIn;var requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(callback){window.setTimeout(callback,1000/60)};window.requestAnimationFrame=requestAnimationFrame;function fadeOut(el,speed,callback){el.style.opacity=1;var fade=function fade(){if((el.style.opacity-=speed)<0){el.style.opacity=0;callback()}else{requestAnimationFrame(fade)}};fade()}function fadeIn(el,speed,callback){el.style.opacity=0;var fade=function fade(){var val=parseFloat(el.style.opacity);if(!((val+=speed)>1)){el.style.opacity=val;requestAnimationFrame(fade)}else{el.style.opacity=1;callback()}};fade()}var blink=function blink(el,speed){var isStopped=false;el.style.opacity=1;var tick=function tick(){if(!isStopped){fadeIn(el,speed,function(){fadeOut(el,speed,function(){return tick()})})}};var start=function start(){isStopped=false;tick()};var stop=function stop(){return isStopped=true};tick();return{stop:stop,start:start}};exports.default=blink}])});
|
||||||
@ -0,0 +1,115 @@
|
|||||||
|
<footer class="main-footer">
|
||||||
|
<div class="footer-container">
|
||||||
|
<!-- 主要内容区域 -->
|
||||||
|
<div class="footer-main">
|
||||||
|
<!-- Logo 和公司信息 -->
|
||||||
|
<div class="footer-brand">
|
||||||
|
<div class="footer-logo">
|
||||||
|
<img src="https://nenghui.com/wp-content/uploads/2025/11/logo-2.png" alt="<?php bloginfo('name'); ?>" style=" height: 32px;" class="logo-img">
|
||||||
|
</div>
|
||||||
|
<div class="footer-social">
|
||||||
|
<a href="https://www.linkedin.com/company/nenghuitech" class="social-link linkedin" aria-label="LinkedIn">
|
||||||
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
|
||||||
|
<path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
<a href="https://www.facebook.com/nenghuitech" class="social-link facebook" aria-label="Facebook">
|
||||||
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
|
||||||
|
<path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
<a href="https://x.com/NenghuiTech" class="social-link twitter" aria-label="Twitter">
|
||||||
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
|
||||||
|
<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 导航菜单区域 -->
|
||||||
|
<div class="footer-nav">
|
||||||
|
<div class="footer-nav-column">
|
||||||
|
<h3 class="footer-nav-title">Products</h3>
|
||||||
|
<ul class="footer-nav-list">
|
||||||
|
|
||||||
|
<li><a href="https://nenghui.com/products/ne418l/">NB418L</a></li>
|
||||||
|
<li><a href="https://nenghui.com/products/ne233l/">NE233L</a></li>
|
||||||
|
|
||||||
|
<li><a href="https://nenghui.com/products/ne261l/">NE261L</a></li>
|
||||||
|
<li><a href="https://nenghui.com/products/n20hc5000/">N20HC5000</a></li>
|
||||||
|
<li><a href="https://nenghui.com/products/nh-ics180-261/">NH-ICS180-261</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="footer-nav-column">
|
||||||
|
<h3 class="footer-nav-title">Support</h3>
|
||||||
|
<ul class="footer-nav-list">
|
||||||
|
<li><a href="https://nenghui.com/download-center/">Download Center</a></li>
|
||||||
|
<li><a href="https://nenghui.com/support/">Service</a></li>
|
||||||
|
<li><a href="https://nenghui.com/faq/">FAQ</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="footer-nav-column">
|
||||||
|
<h3 class="footer-nav-title">ABOUT US</h3>
|
||||||
|
<ul class="footer-nav-list">
|
||||||
|
<li><a href="https://nenghui.com/about-us/">Company Profile</a></li>
|
||||||
|
<li><a href="https://nenghui.com/honor/">Certifications & Accreditations</a></li>
|
||||||
|
<li><a href="https://nenghui.com/oem/">OEM</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="footer-nav-column">
|
||||||
|
<h3 class="footer-nav-title">Contact us</h3>
|
||||||
|
<ul class="footer-nav-list">
|
||||||
|
<li><a href="https://nenghui.com/contact-us/">Contact us</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 订阅区域 -->
|
||||||
|
<div class="footer-subscribe">
|
||||||
|
<?php echo do_shortcode('[fluentform id="3"]'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 分隔线 -->
|
||||||
|
<div class="footer-divider"></div>
|
||||||
|
|
||||||
|
<!-- 底部版权信息 -->
|
||||||
|
<div class="footer-bottom">
|
||||||
|
<div class="footer-copyright">
|
||||||
|
<p>© <?php echo date('Y'); ?> Shanghai Nenghui Technology Co.,Ltd. All rights reserved.</p>
|
||||||
|
</div>
|
||||||
|
<div class="footer-links">
|
||||||
|
<?php
|
||||||
|
$cookie_options = get_option('nenghui_cookie_options');
|
||||||
|
$privacy_page_id = isset($cookie_options['privacy_policy_page']) ? $cookie_options['privacy_policy_page'] : '';
|
||||||
|
$cookie_page_id = isset($cookie_options['cookie_policy_page']) ? $cookie_options['cookie_policy_page'] : '';
|
||||||
|
|
||||||
|
if ($privacy_page_id) : ?>
|
||||||
|
<a href="<?php echo get_permalink($privacy_page_id); ?>">Privacy Policy</a>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ($cookie_page_id) : ?>
|
||||||
|
<a href="<?php echo get_permalink($cookie_page_id); ?>">Cookie Policy</a>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php wp_footer(); ?>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/aos/2.3.4/aos.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/11.0.5/swiper-bundle.min.js"></script>
|
||||||
|
<script>
|
||||||
|
AOS.init({
|
||||||
|
duration: 800, // 动画持续时间
|
||||||
|
once: true, // 动画只触发一次,防止回滚时重复触发
|
||||||
|
offset: 100, // 触发偏移量
|
||||||
|
easing: 'ease-out-cubic', // 缓动函数
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -0,0 +1,120 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="google-site-verification" content="4-DXQwmh6Tn_4TiIaslQa4L-xJTXT0XBVn2dCB_A7F8" />
|
||||||
|
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">
|
||||||
|
<?php wp_head(); ?>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap" rel="stylesheet"/>
|
||||||
|
<link href="https://fonts.googleapis.com" rel="preconnect"/>
|
||||||
|
<link crossorigin="" href="https://fonts.gstatic.com" rel="preconnect"/>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;700&display=swap" rel="stylesheet"/>
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/11.0.5/swiper-bundle.min.css" />
|
||||||
|
<!-- AOS Animation Library -->
|
||||||
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/aos/2.3.4/aos.css" rel="stylesheet">
|
||||||
|
|
||||||
|
<!-- Tailwind & Config -->
|
||||||
|
<script src="https://cdn.tailwindcss.com?plugins=forms,container-queries"></script>
|
||||||
|
<script id="tailwind-config">
|
||||||
|
tailwind.config = {
|
||||||
|
darkMode: "class",
|
||||||
|
theme: {
|
||||||
|
extend: {
|
||||||
|
colors: {
|
||||||
|
"primary": "#13eca4",
|
||||||
|
"background-light": "#f8fcfa",
|
||||||
|
"background-dark": "#10221c",
|
||||||
|
"pearlescent": "#f0f7f5",
|
||||||
|
"silver-accent": "#e2e8f0",
|
||||||
|
},
|
||||||
|
fontFamily: {
|
||||||
|
"display": ["Space Grotesk", "sans-serif"],
|
||||||
|
"sans": ["Space Grotesk", "sans-serif"],
|
||||||
|
},
|
||||||
|
borderRadius: {
|
||||||
|
"DEFAULT": "0.5rem",
|
||||||
|
"lg": "1rem",
|
||||||
|
"xl": "1.5rem",
|
||||||
|
"2xl": "2rem",
|
||||||
|
"3xl": "3rem",
|
||||||
|
"full": "9999px"
|
||||||
|
},
|
||||||
|
backgroundImage: {
|
||||||
|
'liquid-gradient': 'linear-gradient(135deg, #f8fcfa 0%, #e8f5f1 50%, #dcfce7 100%)',
|
||||||
|
'glass-gradient': 'linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.3) 100%)',
|
||||||
|
},
|
||||||
|
keyframes: {
|
||||||
|
fadeIn: {
|
||||||
|
'0%': { opacity: '0', transform: 'translateY(10px)' },
|
||||||
|
'100%': { opacity: '1', transform: 'translateY(0)' },
|
||||||
|
},
|
||||||
|
scan: {
|
||||||
|
'0%': { top: '-10%', opacity: '0' },
|
||||||
|
'10%': { opacity: '1' },
|
||||||
|
'90%': { opacity: '1' },
|
||||||
|
'100%': { top: '110%', opacity: '0' },
|
||||||
|
},
|
||||||
|
rotateGlobe: {
|
||||||
|
'0%': { transform: 'rotate(0deg)' },
|
||||||
|
'100%': { transform: 'rotate(360deg)' },
|
||||||
|
},
|
||||||
|
dash: {
|
||||||
|
'0%': { strokeDashoffset: '1000' },
|
||||||
|
'100%': { strokeDashoffset: '0' },
|
||||||
|
},
|
||||||
|
globePulse: {
|
||||||
|
'0%': { boxShadow: '0 0 0px rgba(19,236,164,0)' },
|
||||||
|
'50%': { boxShadow: '0 0 50px rgba(19,236,164,0.4)', transform: 'scale(1.02)' },
|
||||||
|
'100%': { boxShadow: '0 0 0px rgba(19,236,164,0)' },
|
||||||
|
}
|
||||||
|
},
|
||||||
|
animation: {
|
||||||
|
'fade-in': 'fadeIn 0.5s ease-out forwards',
|
||||||
|
'scan-slow': 'scan 6s linear infinite',
|
||||||
|
'spin-slow': 'rotateGlobe 60s linear infinite',
|
||||||
|
'dash-flow': 'dash 3s linear infinite',
|
||||||
|
'globe-select': 'globePulse 0.8s ease-out'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body <?php body_class(); ?>>
|
||||||
|
<nav class="main-nav">
|
||||||
|
<div class="nav-container">
|
||||||
|
<div class="nav-logo">
|
||||||
|
<a href="<?php echo home_url(); ?>">
|
||||||
|
<?php
|
||||||
|
$logo = get_theme_mod('site_logo');
|
||||||
|
if ($logo): ?>
|
||||||
|
<img src="<?php echo esc_url($logo); ?>" alt="<?php bloginfo('name'); ?>">
|
||||||
|
<?php else: ?>
|
||||||
|
<img src="https://nenghui.com/wp-content/uploads/2025/11/logo-2.png" alt="logo">
|
||||||
|
<?php endif; ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button class="menu-toggle" aria-label="菜单">
|
||||||
|
<span></span>
|
||||||
|
<span></span>
|
||||||
|
<span></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div class="nav-menu">
|
||||||
|
<?php
|
||||||
|
wp_nav_menu(array(
|
||||||
|
'theme_location' => 'primary-menu',
|
||||||
|
'container' => false,
|
||||||
|
'menu_class' => 'menu-items',
|
||||||
|
'walker' => new Nenghui_Walker_Nav_Menu(),
|
||||||
|
'fallback_cb' => function() {
|
||||||
|
echo '<ul class="menu-items"><li><a href="' . admin_url('nav-menus.php') . '">添加菜单</a></li></ul>';
|
||||||
|
}
|
||||||
|
));
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
@ -0,0 +1,252 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Cookie Consent & Policy Module
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!defined('ABSPATH')) {
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Nenghui_Cookie_Consent {
|
||||||
|
private $options;
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
add_action('admin_menu', array($this, 'add_plugin_page'));
|
||||||
|
add_action('admin_init', array($this, 'page_init'));
|
||||||
|
add_action('wp_footer', array($this, 'render_frontend_assets'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function add_plugin_page() {
|
||||||
|
add_options_page(
|
||||||
|
'Cookie Consent & Policies',
|
||||||
|
'Cookie Consent',
|
||||||
|
'manage_options',
|
||||||
|
'nenghui-cookie-consent',
|
||||||
|
array($this, 'create_admin_page')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function create_admin_page() {
|
||||||
|
$this->options = get_option('nenghui_cookie_options');
|
||||||
|
?>
|
||||||
|
<div class="wrap">
|
||||||
|
<h1>Cookie同意与政策设置</h1>
|
||||||
|
<form method="post" action="options.php">
|
||||||
|
<?php
|
||||||
|
settings_fields('nenghui_cookie_group');
|
||||||
|
do_settings_sections('nenghui-cookie-consent');
|
||||||
|
submit_button();
|
||||||
|
?>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
public function page_init() {
|
||||||
|
register_setting(
|
||||||
|
'nenghui_cookie_group',
|
||||||
|
'nenghui_cookie_options'
|
||||||
|
);
|
||||||
|
|
||||||
|
add_settings_section(
|
||||||
|
'nenghui_cookie_section_main',
|
||||||
|
'Cookie同意与政策设置',
|
||||||
|
null,
|
||||||
|
'nenghui-cookie-consent'
|
||||||
|
);
|
||||||
|
|
||||||
|
add_settings_field(
|
||||||
|
'cookie_notice_text',
|
||||||
|
'Cookie同意通知文本',
|
||||||
|
array($this, 'cookie_notice_text_callback'),
|
||||||
|
'nenghui-cookie-consent',
|
||||||
|
'nenghui_cookie_section_main'
|
||||||
|
);
|
||||||
|
|
||||||
|
add_settings_field(
|
||||||
|
'cookie_accept_label',
|
||||||
|
'“同意”按钮文本',
|
||||||
|
array($this, 'cookie_accept_label_callback'),
|
||||||
|
'nenghui-cookie-consent',
|
||||||
|
'nenghui_cookie_section_main'
|
||||||
|
);
|
||||||
|
|
||||||
|
add_settings_field(
|
||||||
|
'cookie_decline_label',
|
||||||
|
'“拒绝”按钮文本',
|
||||||
|
array($this, 'cookie_decline_label_callback'),
|
||||||
|
'nenghui-cookie-consent',
|
||||||
|
'nenghui_cookie_section_main'
|
||||||
|
);
|
||||||
|
|
||||||
|
add_settings_section(
|
||||||
|
'nenghui_cookie_section_pages',
|
||||||
|
'相关政策页面设置',
|
||||||
|
null,
|
||||||
|
'nenghui-cookie-consent'
|
||||||
|
);
|
||||||
|
|
||||||
|
add_settings_field(
|
||||||
|
'privacy_policy_page',
|
||||||
|
'隐私政策页面 (Privacy Policy)',
|
||||||
|
array($this, 'privacy_policy_page_callback'),
|
||||||
|
'nenghui-cookie-consent',
|
||||||
|
'nenghui_cookie_section_pages'
|
||||||
|
);
|
||||||
|
|
||||||
|
add_settings_field(
|
||||||
|
'cookie_policy_page',
|
||||||
|
'Cookie政策页面 (Cookie Policy)',
|
||||||
|
array($this, 'cookie_policy_page_callback'),
|
||||||
|
'nenghui-cookie-consent',
|
||||||
|
'nenghui_cookie_section_pages'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function cookie_notice_text_callback() {
|
||||||
|
$text = isset($this->options['cookie_notice_text']) ? $this->options['cookie_notice_text'] : 'We use cookies to improve your experience on our website. By browsing this website, you agree to our use of cookies.';
|
||||||
|
echo '<textarea name="nenghui_cookie_options[cookie_notice_text]" rows="3" class="large-text">' . esc_textarea($text) . '</textarea>';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function cookie_accept_label_callback() {
|
||||||
|
$text = isset($this->options['cookie_accept_label']) ? $this->options['cookie_accept_label'] : 'Accept';
|
||||||
|
echo '<input type="text" name="nenghui_cookie_options[cookie_accept_label]" value="' . esc_attr($text) . '" class="regular-text">';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function cookie_decline_label_callback() {
|
||||||
|
$text = isset($this->options['cookie_decline_label']) ? $this->options['cookie_decline_label'] : 'Decline';
|
||||||
|
echo '<input type="text" name="nenghui_cookie_options[cookie_decline_label]" value="' . esc_attr($text) . '" class="regular-text">';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function privacy_policy_page_callback() {
|
||||||
|
$selected = isset($this->options['privacy_policy_page']) ? $this->options['privacy_policy_page'] : '';
|
||||||
|
wp_dropdown_pages(array(
|
||||||
|
'name' => 'nenghui_cookie_options[privacy_policy_page]',
|
||||||
|
'selected' => $selected,
|
||||||
|
'show_option_none' => '选择页面'
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function cookie_policy_page_callback() {
|
||||||
|
$selected = isset($this->options['cookie_policy_page']) ? $this->options['cookie_policy_page'] : '';
|
||||||
|
wp_dropdown_pages(array(
|
||||||
|
'name' => 'nenghui_cookie_options[cookie_policy_page]',
|
||||||
|
'selected' => $selected,
|
||||||
|
'show_option_none' => '选择页面'
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render_frontend_assets() {
|
||||||
|
$options = get_option('nenghui_cookie_options');
|
||||||
|
$notice_text = isset($options['cookie_notice_text']) ? $options['cookie_notice_text'] : 'We use cookies to improve your experience on our website. By browsing this website, you agree to our use of cookies.';
|
||||||
|
$accept_label = isset($options['cookie_accept_label']) ? $options['cookie_accept_label'] : 'Accept';
|
||||||
|
$decline_label = isset($options['cookie_decline_label']) ? $options['cookie_decline_label'] : 'Decline';
|
||||||
|
|
||||||
|
$cookie_url = isset($options['cookie_policy_page']) && !empty($options['cookie_policy_page']) ? get_permalink($options['cookie_policy_page']) : '#';
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- Cookie Consent Banner -->
|
||||||
|
<div id="nh-cookie-banner" class="nh-cookie-banner" style="display: none;">
|
||||||
|
<div class="nh-cookie-content">
|
||||||
|
<p><?php echo esc_html($notice_text); ?></p>
|
||||||
|
<div class="nh-cookie-links">
|
||||||
|
<?php if($cookie_url !== '#'): ?><a href="<?php echo esc_url($cookie_url); ?>" class="nh-policy-link">Cookie Policy</a><?php endif; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="nh-cookie-actions">
|
||||||
|
<button id="nh-cookie-accept" class="nh-cookie-btn nh-accept"><?php echo esc_html($accept_label); ?></button>
|
||||||
|
<button id="nh-cookie-decline" class="nh-cookie-btn nh-decline"><?php echo esc_html($decline_label); ?></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.nh-cookie-banner {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 20px;
|
||||||
|
left: 20px;
|
||||||
|
max-width: 400px;
|
||||||
|
background: #fff;
|
||||||
|
padding: 20px;
|
||||||
|
box-shadow: 0 5px 20px rgba(0,0,0,0.15);
|
||||||
|
border-radius: 8px;
|
||||||
|
z-index: 9999;
|
||||||
|
font-family: inherit;
|
||||||
|
border-left: 5px solid #0056b3;
|
||||||
|
}
|
||||||
|
.nh-cookie-content p {
|
||||||
|
margin: 0 0 10px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
.nh-cookie-links {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
.nh-cookie-links a {
|
||||||
|
color: #0056b3;
|
||||||
|
text-decoration: underline;
|
||||||
|
margin-right: 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.nh-cookie-actions {
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
.nh-cookie-btn {
|
||||||
|
flex: 1;
|
||||||
|
border: none;
|
||||||
|
padding: 10px 15px;
|
||||||
|
border-radius: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.nh-cookie-btn.nh-accept {
|
||||||
|
background: #0056b3;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.nh-cookie-btn.nh-accept:hover {
|
||||||
|
background: #004494;
|
||||||
|
}
|
||||||
|
.nh-cookie-btn.nh-decline {
|
||||||
|
background: #f1f1f1;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
.nh-cookie-btn.nh-decline:hover {
|
||||||
|
background: #e1e1e1;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
var cookieBanner = document.getElementById('nh-cookie-banner');
|
||||||
|
var acceptBtn = document.getElementById('nh-cookie-accept');
|
||||||
|
var declineBtn = document.getElementById('nh-cookie-decline');
|
||||||
|
|
||||||
|
// Check for cookie consent
|
||||||
|
if (!localStorage.getItem('nh_cookie_consent')) {
|
||||||
|
cookieBanner.style.display = 'block';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Accept button
|
||||||
|
acceptBtn.addEventListener('click', function() {
|
||||||
|
localStorage.setItem('nh_cookie_consent', 'accepted');
|
||||||
|
cookieBanner.style.display = 'none';
|
||||||
|
});
|
||||||
|
|
||||||
|
// Decline button
|
||||||
|
declineBtn.addEventListener('click', function() {
|
||||||
|
localStorage.setItem('nh_cookie_consent', 'declined');
|
||||||
|
cookieBanner.style.display = 'none';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
new Nenghui_Cookie_Consent();
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* FAQ Custom Post Type Registration
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!defined('ABSPATH')) {
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
function nenghui_register_faq_cpt() {
|
||||||
|
$labels = array(
|
||||||
|
'name' => _x('FAQs', 'Post Type General Name', 'nenghui'),
|
||||||
|
'singular_name' => _x('FAQ', 'Post Type Singular Name', 'nenghui'),
|
||||||
|
'menu_name' => __('FAQs', 'nenghui'),
|
||||||
|
'name_admin_bar' => __('FAQ', 'nenghui'),
|
||||||
|
'archives' => __('FAQ Archives', 'nenghui'),
|
||||||
|
'attributes' => __('FAQ Attributes', 'nenghui'),
|
||||||
|
'parent_item_colon' => __('Parent FAQ:', 'nenghui'),
|
||||||
|
'all_items' => __('All FAQs', 'nenghui'),
|
||||||
|
'add_new_item' => __('Add New FAQ', 'nenghui'),
|
||||||
|
'add_new' => __('Add New', 'nenghui'),
|
||||||
|
'new_item' => __('New FAQ', 'nenghui'),
|
||||||
|
'edit_item' => __('Edit FAQ', 'nenghui'),
|
||||||
|
'update_item' => __('Update FAQ', 'nenghui'),
|
||||||
|
'view_item' => __('View FAQ', 'nenghui'),
|
||||||
|
'view_items' => __('View FAQs', 'nenghui'),
|
||||||
|
'search_items' => __('Search FAQ', 'nenghui'),
|
||||||
|
'not_found' => __('Not found', 'nenghui'),
|
||||||
|
'not_found_in_trash' => __('Not found in Trash', 'nenghui'),
|
||||||
|
'featured_image' => __('Featured Image', 'nenghui'),
|
||||||
|
'set_featured_image' => __('Set featured image', 'nenghui'),
|
||||||
|
'remove_featured_image' => __('Remove featured image', 'nenghui'),
|
||||||
|
'use_featured_image' => __('Use as featured image', 'nenghui'),
|
||||||
|
'insert_into_item' => __('Insert into FAQ', 'nenghui'),
|
||||||
|
'uploaded_to_this_item' => __('Uploaded to this FAQ', 'nenghui'),
|
||||||
|
'items_list' => __('FAQs list', 'nenghui'),
|
||||||
|
'items_list_navigation' => __('FAQs list navigation', 'nenghui'),
|
||||||
|
'filter_items_list' => __('Filter FAQs list', 'nenghui'),
|
||||||
|
);
|
||||||
|
$args = array(
|
||||||
|
'label' => __('FAQ', 'nenghui'),
|
||||||
|
'description' => __('Frequently Asked Questions', 'nenghui'),
|
||||||
|
'labels' => $labels,
|
||||||
|
'supports' => array('title', 'editor', 'page-attributes'), // page-attributes for menu_order
|
||||||
|
'hierarchical' => false,
|
||||||
|
'public' => true,
|
||||||
|
'show_ui' => true,
|
||||||
|
'show_in_menu' => true,
|
||||||
|
'menu_position' => 20,
|
||||||
|
'menu_icon' => 'dashicons-format-chat',
|
||||||
|
'show_in_admin_bar' => true,
|
||||||
|
'show_in_nav_menus' => true,
|
||||||
|
'can_export' => true,
|
||||||
|
'has_archive' => true,
|
||||||
|
'exclude_from_search' => false,
|
||||||
|
'publicly_queryable' => true,
|
||||||
|
'capability_type' => 'post',
|
||||||
|
'show_in_rest' => true, // Enable Gutenberg editor
|
||||||
|
);
|
||||||
|
register_post_type('faq', $args);
|
||||||
|
}
|
||||||
|
add_action('init', 'nenghui_register_faq_cpt');
|
||||||
@ -0,0 +1,321 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* 错误处理和调试配置文件
|
||||||
|
* 专门用于诊断和修复 plugin.php 中的 foreach 错误
|
||||||
|
*/
|
||||||
|
|
||||||
|
// 防止直接访问
|
||||||
|
if (!defined('ABSPATH')) {
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 增强的错误处理函数
|
||||||
|
* 捕获和记录 foreach 相关的错误
|
||||||
|
*/
|
||||||
|
function nenghui_error_handler($errno, $errstr, $errfile, $errline) {
|
||||||
|
// 只处理 foreach 相关的错误
|
||||||
|
if (strpos($errstr, 'foreach') !== false || strpos($errstr, 'Invalid argument') !== false) {
|
||||||
|
$error_info = array(
|
||||||
|
'error_type' => $errno,
|
||||||
|
'error_message' => $errstr,
|
||||||
|
'error_file' => $errfile,
|
||||||
|
'error_line' => $errline,
|
||||||
|
'timestamp' => date('Y-m-d H:i:s'),
|
||||||
|
'request_uri' => isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : 'unknown',
|
||||||
|
'user_agent' => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : 'unknown'
|
||||||
|
);
|
||||||
|
|
||||||
|
// 记录错误日志
|
||||||
|
nenghui_log_foreach_error($error_info);
|
||||||
|
|
||||||
|
// 如果是调试模式,显示详细信息
|
||||||
|
if (WP_DEBUG && WP_DEBUG_DISPLAY) {
|
||||||
|
echo '<div style="background: #ffebee; border: 1px solid #f44336; padding: 10px; margin: 10px; border-radius: 4px;">';
|
||||||
|
echo '<strong>Foreach Error Detected:</strong><br>';
|
||||||
|
echo 'File: ' . esc_html($errfile) . '<br>';
|
||||||
|
echo 'Line: ' . esc_html($errline) . '<br>';
|
||||||
|
echo 'Message: ' . esc_html($errstr) . '<br>';
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 返回 false 让 PHP 继续处理错误
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 记录 foreach 错误到日志文件
|
||||||
|
*/
|
||||||
|
function nenghui_log_foreach_error($error_info) {
|
||||||
|
$upload_dir = wp_upload_dir();
|
||||||
|
|
||||||
|
// 确保 $upload_dir 是数组且包含 basedir
|
||||||
|
if (!is_array($upload_dir) || !isset($upload_dir['basedir'])) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$log_file = $upload_dir['basedir'] . '/foreach_errors.log';
|
||||||
|
|
||||||
|
$log_entry = sprintf(
|
||||||
|
"[%s] FOREACH ERROR: %s in %s on line %d (URI: %s)\n",
|
||||||
|
$error_info['timestamp'],
|
||||||
|
$error_info['error_message'],
|
||||||
|
$error_info['error_file'],
|
||||||
|
$error_info['error_line'],
|
||||||
|
$error_info['request_uri']
|
||||||
|
);
|
||||||
|
|
||||||
|
// 确保日志文件安全
|
||||||
|
if (!file_exists($log_file)) {
|
||||||
|
file_put_contents($log_file, "# Foreach Errors Log\n");
|
||||||
|
chmod($log_file, 0600);
|
||||||
|
}
|
||||||
|
|
||||||
|
file_put_contents($log_file, $log_entry, FILE_APPEND | LOCK_EX);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全的 foreach 包装函数
|
||||||
|
* 确保传入的变量是可迭代的数组
|
||||||
|
*/
|
||||||
|
function nenghui_safe_foreach($array, $callback) {
|
||||||
|
if (!is_array($array) && !($array instanceof Traversable)) {
|
||||||
|
nenghui_log_foreach_error(array(
|
||||||
|
'error_type' => E_WARNING,
|
||||||
|
'error_message' => 'nenghui_safe_foreach: Invalid argument supplied, expected array or Traversable',
|
||||||
|
'error_file' => __FILE__,
|
||||||
|
'error_line' => __LINE__,
|
||||||
|
'timestamp' => date('Y-m-d H:i:s'),
|
||||||
|
'request_uri' => isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : 'unknown',
|
||||||
|
'user_agent' => 'nenghui_safe_foreach'
|
||||||
|
));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_callable($callback)) {
|
||||||
|
foreach ($array as $key => $value) {
|
||||||
|
call_user_func($callback, $value, $key);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修复常见的 WordPress 全局变量问题
|
||||||
|
* 确保关键的全局变量是正确的数组格式
|
||||||
|
*/
|
||||||
|
function nenghui_fix_wp_globals() {
|
||||||
|
global $wp_filter, $wp_actions, $wp_current_filter, $wp_meta_boxes, $wp_settings_sections, $wp_settings_fields;
|
||||||
|
|
||||||
|
// 确保 $wp_filter 是数组
|
||||||
|
if (!is_array($wp_filter)) {
|
||||||
|
$wp_filter = array();
|
||||||
|
nenghui_log_foreach_error(array(
|
||||||
|
'error_type' => E_WARNING,
|
||||||
|
'error_message' => 'Fixed $wp_filter global variable - was not array',
|
||||||
|
'error_file' => __FILE__,
|
||||||
|
'error_line' => __LINE__,
|
||||||
|
'timestamp' => date('Y-m-d H:i:s'),
|
||||||
|
'request_uri' => isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : 'unknown',
|
||||||
|
'user_agent' => 'nenghui_fix_wp_globals'
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确保 $wp_actions 是数组
|
||||||
|
if (!is_array($wp_actions)) {
|
||||||
|
$wp_actions = array();
|
||||||
|
nenghui_log_foreach_error(array(
|
||||||
|
'error_type' => E_WARNING,
|
||||||
|
'error_message' => 'Fixed $wp_actions global variable - was not array',
|
||||||
|
'error_file' => __FILE__,
|
||||||
|
'error_line' => __LINE__,
|
||||||
|
'timestamp' => date('Y-m-d H:i:s'),
|
||||||
|
'request_uri' => isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : 'unknown',
|
||||||
|
'user_agent' => 'nenghui_fix_wp_globals'
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确保 $wp_current_filter 是数组
|
||||||
|
if (!is_array($wp_current_filter)) {
|
||||||
|
$wp_current_filter = array();
|
||||||
|
nenghui_log_foreach_error(array(
|
||||||
|
'error_type' => E_WARNING,
|
||||||
|
'error_message' => 'Fixed $wp_current_filter global variable - was not array',
|
||||||
|
'error_file' => __FILE__,
|
||||||
|
'error_line' => __LINE__,
|
||||||
|
'timestamp' => date('Y-m-d H:i:s'),
|
||||||
|
'request_uri' => isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : 'unknown',
|
||||||
|
'user_agent' => 'nenghui_fix_wp_globals'
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确保 $wp_meta_boxes 是数组
|
||||||
|
if (!is_array($wp_meta_boxes)) {
|
||||||
|
$wp_meta_boxes = array();
|
||||||
|
nenghui_log_foreach_error(array(
|
||||||
|
'error_type' => E_WARNING,
|
||||||
|
'error_message' => 'Fixed $wp_meta_boxes global variable - was not array',
|
||||||
|
'error_file' => __FILE__,
|
||||||
|
'error_line' => __LINE__,
|
||||||
|
'timestamp' => date('Y-m-d H:i:s'),
|
||||||
|
'request_uri' => isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : 'unknown',
|
||||||
|
'user_agent' => 'nenghui_fix_wp_globals'
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确保 $wp_settings_sections 是数组
|
||||||
|
if (!is_array($wp_settings_sections)) {
|
||||||
|
$wp_settings_sections = array();
|
||||||
|
nenghui_log_foreach_error(array(
|
||||||
|
'error_type' => E_WARNING,
|
||||||
|
'error_message' => 'Fixed $wp_settings_sections global variable - was not array',
|
||||||
|
'error_file' => __FILE__,
|
||||||
|
'error_line' => __LINE__,
|
||||||
|
'timestamp' => date('Y-m-d H:i:s'),
|
||||||
|
'request_uri' => isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : 'unknown',
|
||||||
|
'user_agent' => 'nenghui_fix_wp_globals'
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确保 $wp_settings_fields 是数组
|
||||||
|
if (!is_array($wp_settings_fields)) {
|
||||||
|
$wp_settings_fields = array();
|
||||||
|
nenghui_log_foreach_error(array(
|
||||||
|
'error_type' => E_WARNING,
|
||||||
|
'error_message' => 'Fixed $wp_settings_fields global variable - was not array',
|
||||||
|
'error_file' => __FILE__,
|
||||||
|
'error_line' => __LINE__,
|
||||||
|
'timestamp' => date('Y-m-d H:i:s'),
|
||||||
|
'request_uri' => isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : 'unknown',
|
||||||
|
'user_agent' => 'nenghui_fix_wp_globals'
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在插件加载前修复全局变量
|
||||||
|
*/
|
||||||
|
function nenghui_pre_plugin_fix() {
|
||||||
|
nenghui_fix_wp_globals();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查和修复主题选项中的数组
|
||||||
|
*/
|
||||||
|
function nenghui_fix_theme_options() {
|
||||||
|
// 检查常用的主题选项
|
||||||
|
$options_to_check = array(
|
||||||
|
'banner_images',
|
||||||
|
'futures_items',
|
||||||
|
'news_posts',
|
||||||
|
'menu_items',
|
||||||
|
'tab_items'
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($options_to_check as $option) {
|
||||||
|
$value = get_theme_mod($option);
|
||||||
|
if ($value !== false && !is_array($value)) {
|
||||||
|
// 尝试将非数组值转换为数组
|
||||||
|
if (is_string($value) && !empty($value)) {
|
||||||
|
// 如果是 JSON 字符串,尝试解码
|
||||||
|
$decoded = json_decode($value, true);
|
||||||
|
if (json_last_error() === JSON_ERROR_NONE && is_array($decoded)) {
|
||||||
|
set_theme_mod($option, $decoded);
|
||||||
|
} else {
|
||||||
|
// 否则包装为数组
|
||||||
|
set_theme_mod($option, array($value));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 设置为空数组
|
||||||
|
set_theme_mod($option, array());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专门修复 plugin.php 第 1853 行的 foreach 错误
|
||||||
|
* 这个错误通常发生在钩子系统中的数组操作
|
||||||
|
*/
|
||||||
|
function nenghui_fix_plugin_foreach_error() {
|
||||||
|
global $wp_filter;
|
||||||
|
|
||||||
|
// 确保 $wp_filter 的每个钩子都是正确的数组结构
|
||||||
|
if (is_array($wp_filter)) {
|
||||||
|
foreach ($wp_filter as $hook_name => $hook_callbacks) {
|
||||||
|
if (!is_object($hook_callbacks) && !is_array($hook_callbacks)) {
|
||||||
|
// 如果钩子回调不是对象或数组,重置为空的 WP_Hook 对象
|
||||||
|
$wp_filter[$hook_name] = new WP_Hook();
|
||||||
|
nenghui_log_foreach_error(array(
|
||||||
|
'error_type' => E_WARNING,
|
||||||
|
'error_message' => "Fixed invalid hook callbacks for '$hook_name' - was " . gettype($hook_callbacks),
|
||||||
|
'error_file' => __FILE__,
|
||||||
|
'error_line' => __LINE__,
|
||||||
|
'timestamp' => date('Y-m-d H:i:s'),
|
||||||
|
'request_uri' => isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : 'unknown',
|
||||||
|
'user_agent' => 'nenghui_fix_plugin_foreach_error'
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在最早期修复全局变量
|
||||||
|
* 确保在任何插件或主题代码执行前修复问题
|
||||||
|
*/
|
||||||
|
function nenghui_early_fix() {
|
||||||
|
nenghui_fix_wp_globals();
|
||||||
|
nenghui_fix_plugin_foreach_error();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 立即修复全局变量 - 在文件加载时就执行
|
||||||
|
* 这确保在任何WordPress函数调用前就修复了全局变量
|
||||||
|
*/
|
||||||
|
function nenghui_immediate_fix() {
|
||||||
|
global $menu, $submenu, $wp_filter, $wp_actions, $wp_current_filter;
|
||||||
|
|
||||||
|
// 立即确保关键全局变量是数组
|
||||||
|
if (!is_array($menu)) {
|
||||||
|
$menu = array();
|
||||||
|
}
|
||||||
|
if (!is_array($submenu)) {
|
||||||
|
$submenu = array();
|
||||||
|
}
|
||||||
|
if (!is_array($wp_filter)) {
|
||||||
|
$wp_filter = array();
|
||||||
|
}
|
||||||
|
if (!is_array($wp_actions)) {
|
||||||
|
$wp_actions = array();
|
||||||
|
}
|
||||||
|
if (!is_array($wp_current_filter)) {
|
||||||
|
$wp_current_filter = array();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 立即执行修复
|
||||||
|
nenghui_immediate_fix();
|
||||||
|
|
||||||
|
// 注册错误处理器(仅在调试模式下)
|
||||||
|
if (WP_DEBUG) {
|
||||||
|
set_error_handler('nenghui_error_handler', E_WARNING | E_NOTICE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 在最早期修复全局变量 - 在 muplugins_loaded 之前
|
||||||
|
add_action('muplugins_loaded', 'nenghui_early_fix', 1);
|
||||||
|
// 在插件加载前再次修复
|
||||||
|
add_action('plugins_loaded', 'nenghui_pre_plugin_fix', 1);
|
||||||
|
// 在主题设置后修复主题选项
|
||||||
|
add_action('after_setup_theme', 'nenghui_fix_theme_options', 1);
|
||||||
|
// 在管理页面初始化前修复
|
||||||
|
add_action('admin_init', 'nenghui_early_fix', 1);
|
||||||
|
// 在前端初始化前修复
|
||||||
|
add_action('init', 'nenghui_early_fix', 1);
|
||||||
|
// 在admin_menu动作前确保菜单变量正确
|
||||||
|
add_action('admin_menu', 'nenghui_immediate_fix', 1);
|
||||||
|
|
||||||
|
?>
|
||||||