fix(frontend): align post thumbnail display with reference
This commit is contained in:
1 parent
542daca457
commit
4cdde50695
11 files changed
+201
-104
No files matched your search
@@ -20,6 +20,7 @@ class InlineStyleBuilder {
|
||||
$font_family = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::font_family() : 'system';
|
||||
$logo_width = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::logo_width() : 150;
|
||||
$sidebar_cfg = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_sidebar_config() : ['width' => 311, 'enabled' => true, 'position' => 'right'];
|
||||
$list_settings = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_post_list_style_settings() : [];
|
||||
|
||||
$content_width = $container_max . 'px';
|
||||
$container_wide = max(1280, $container_max + 160) . 'px';
|
||||
@@ -48,8 +49,6 @@ class InlineStyleBuilder {
|
||||
'--font-heading' => $font_stacks['ui'],
|
||||
'--aksrt-logo-width' => $logo_width . 'px',
|
||||
'--nav-height' => '60px',
|
||||
'--posts-list-scale' => (class_exists('\AKSRT\Settings\Settings') ? (\AKSRT\Settings\Settings::get_post_list_style_settings()['list_list_option']['scale'] ?? 70) : 70) . '%',
|
||||
'--posts-card-scale' => (class_exists('\AKSRT\Settings\Settings') ? (\AKSRT\Settings\Settings::get_post_list_style_settings()['list_card_option']['scale'] ?? 70) : 70) . '%',
|
||||
];
|
||||
|
||||
echo '<style id="aksrt-runtime-vars">:root{';
|
||||
@@ -71,7 +70,11 @@ class InlineStyleBuilder {
|
||||
|
||||
// 对齐参考主题 zib_head_css():主题色变量与 --main-radius 挂在 body(main.css 的定义层级),
|
||||
// 夜间主题色仅在单独设置时覆盖 body.dark-theme。
|
||||
echo '<style id="aksrt-theme-color">body{' . $this->theme_color_vars($primary_color) . '--main-radius:' . (int) $main_radius . 'px;}';
|
||||
// main.css declares these defaults on body; :root values cannot override them by inheritance.
|
||||
echo '<style id="aksrt-theme-color">body{' . $this->theme_color_vars($primary_color)
|
||||
. '--main-radius:' . (int) $main_radius . 'px;'
|
||||
. '--posts-list-scale:' . (int) ($list_settings['list_list_option']['scale'] ?? 70) . '%;'
|
||||
. '--posts-card-scale:' . (int) ($list_settings['list_card_option']['scale'] ?? 70) . '%;}';
|
||||
if ($dark_primary !== '') {
|
||||
echo 'html.dark body,body.dark-theme{' . $this->theme_color_vars($dark_primary) . '}';
|
||||
}
|
||||
@@ -88,7 +91,6 @@ class InlineStyleBuilder {
|
||||
echo '</style>' . "\n";
|
||||
|
||||
if (class_exists('\AKSRT\Settings\Settings')) {
|
||||
$list_settings = \AKSRT\Settings\Settings::get_post_list_style_settings();
|
||||
$mobile_meta = sanitize_key((string) ($list_settings['list_meta_show'] ?? 'like'));
|
||||
if (!in_array($mobile_meta, ['view', 'like', 'comm'], true)) {
|
||||
$mobile_meta = 'like';
|
||||
|
||||
Reference in new issue
Block a user