diff --git a/assets/css/routes/user-home.css b/assets/css/routes/user-home.css index aec78447..31e5397b 100644 --- a/assets/css/routes/user-home.css +++ b/assets/css/routes/user-home.css @@ -399,14 +399,20 @@ animation: panel-fade-in 0.25s ease; } -/* Public author posts follow legacy's full-width, two-column list. */ -@media (min-width: 992px) { +/* Public author posts follow Zibll's single-column author-tab list + * (zibll css/main.css: .author-tab .posts-item / .author-tab .no_margin:first-of-type). */ +.aksrt-user-home #panel-posts .aksrt-user-home__post-list .posts-item { + background: transparent; + box-shadow: none; +} + +.aksrt-user-home #panel-posts .aksrt-user-home__post-list .no_margin:first-of-type { + margin-top: 0; +} + +@media (max-width: 767px) { .aksrt-user-home #panel-posts .aksrt-user-home__post-list .posts-item { - display: inline-flex; - width: calc(50% - 16px); - margin: 8px; - border-radius: var(--main-radius, 8px); - vertical-align: top; + padding: 10px 0; } } diff --git a/tests/widget-system/post-visual-contract.test.cjs b/tests/widget-system/post-visual-contract.test.cjs index cf8f3fdc..657b2e0b 100644 --- a/tests/widget-system/post-visual-contract.test.cjs +++ b/tests/widget-system/post-visual-contract.test.cjs @@ -321,7 +321,10 @@ test('profile routes load versioned leaf styles and keep dialogs hidden initiall assert.match(accountModals, /id="email-modal" class="aksrt-modal" hidden/); assert.match(userCenterJs, /function closeModal\(m\)[\s\S]*?m\.hidden = true;/); assert.match(userHomeCss, /\.aksrt-profile-details-modal\[hidden\]\s*\{\s*display:\s*none\s*!important;\s*\}/); - assert.match(userHomeCss, /@media \(min-width: 992px\)[\s\S]*?\.aksrt-user-home #panel-posts \.aksrt-user-home__post-list \.posts-item\s*\{[^}]*display:\s*inline-flex;[^}]*width:\s*calc\(50% - 16px\);/); + assert.match(userHomeCss, /\.aksrt-user-home #panel-posts \.aksrt-user-home__post-list \.posts-item\s*\{[^}]*background:\s*transparent;[^}]*box-shadow:\s*none;/); + assert.match(userHomeCss, /\.aksrt-user-home #panel-posts \.aksrt-user-home__post-list \.no_margin:first-of-type\s*\{[^}]*margin-top:\s*0;/); + assert.match(userHomeCss, /@media \(max-width: 767px\)\s*\{[\s\S]*?\.aksrt-user-home #panel-posts \.aksrt-user-home__post-list \.posts-item\s*\{[^}]*padding:\s*10px 0;/); + assert.doesNotMatch(userHomeCss, /#panel-posts[^{]*\{[^}]*calc\(50% - 16px\)/); assert.match(profileLayoutCss, /\.aksrt-cover-menu__panel\[hidden\]\s*\{\s*display:\s*none\s*!important;\s*\}/); assert.match(profileLayoutCss, /#aksrt-bg-file-input\[hidden\],[\s\S]*?#aksrt-avatar-file-input\[hidden\][\s\S]*?display:\s*none\s*!important;/); assert.match(settingsSecurity, /data-modal="email-modal"[\s\S]*?<\/button>\s*<\/div>\s*
[\s\S]*?data-modal="phone-modal"/);