Fix theme card layout: - Adjust theme-actions positioning to match WordPress core - Update button container styles - Fix screenshot and author display - Match core WordPress theme browser styling

This commit is contained in:
Marcus Quinn
2025-03-14 04:47:04 +00:00
parent cf4db41d29
commit 3fad7e03a4

View File

@ -306,34 +306,36 @@ function wpa_superstar_ajax_get_theme() {
?> ?>
<style> <style>
.theme-browser .theme { .theme-browser .theme {
position: relative; cursor: pointer;
display: inline-block; float: none;
box-sizing: border-box;
width: 100%;
margin: 0; margin: 0;
position: relative;
width: 100%;
border: 1px solid #dcdcde; border: 1px solid #dcdcde;
box-shadow: 0 1px 1px rgba(0,0,0,.04); box-shadow: 0 1px 1px rgba(0,0,0,.04);
background: #fff; box-sizing: border-box;
min-height: 800px; min-height: 330px;
padding-bottom: 50px;
} }
.theme-browser .theme .theme-screenshot { .theme-browser .theme .theme-screenshot {
display: block; display: block;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
background: #f0f0f1; -webkit-backface-visibility: hidden;
transition: opacity .2s ease-in-out;
background-position: center;
background-size: cover;
} }
.theme-browser .theme .theme-screenshot img { .theme-browser .theme .theme-screenshot img {
height: auto; height: auto;
position: absolute;
left: 0;
top: 0;
width: 100%; width: 100%;
transform: translateZ(0);
transition: opacity .2s ease-in-out; transition: opacity .2s ease-in-out;
display: block;
} }
.theme-browser .theme .theme-name { .theme-browser .theme .theme-name {
font-size: 15px; font-size: 15px;
font-weight: 600; font-weight: 600;
height: 18px;
margin: 0; margin: 0;
padding: 15px; padding: 15px;
box-shadow: inset 0 1px 0 rgba(0,0,0,.1); box-shadow: inset 0 1px 0 rgba(0,0,0,.1);
@ -344,41 +346,42 @@ function wpa_superstar_ajax_get_theme() {
background: rgba(255,255,255,.65); background: rgba(255,255,255,.65);
} }
.theme-browser .theme .theme-actions { .theme-browser .theme .theme-actions {
opacity: 0;
transition: opacity .1s ease-in-out;
position: absolute; position: absolute;
bottom: 0; bottom: 0;
right: 0; right: 0;
left: 0; padding: 9px 15px;
height: 50px; box-shadow: inset 0 1px 0 rgba(0,0,0,.1);
padding: 10px;
background: rgba(244,244,244,.7); background: rgba(244,244,244,.7);
border-top: 1px solid rgba(0,0,0,.05); height: auto;
text-align: right;
z-index: 1; z-index: 1;
} }
.theme-browser .theme:hover .theme-actions { .theme-browser .theme:hover .theme-actions,
.theme-browser .theme:focus .theme-actions {
opacity: 1; opacity: 1;
} }
.theme-browser .theme .theme-author { .theme-browser .theme .theme-author {
background: rgba(35, 40, 45, 0.85); background: rgba(0,0,0,.7);
color: #eee; color: #fff;
font-size: 14px; padding: 5px;
margin: 0;
padding: 5px 10px;
position: absolute; position: absolute;
bottom: 56px; bottom: 56px;
left: 0; left: 0;
opacity: 0;
right: 0; right: 0;
text-align: center; text-align: center;
text-shadow: 0 1px 0 rgba(0,0,0,.6); opacity: 0;
transition: opacity .1s ease-in-out; transition: opacity .1s ease-in-out;
white-space: nowrap;
} }
.theme-browser .theme:hover .theme-author { .theme-browser .theme:hover .theme-author {
opacity: 1; opacity: 1;
} }
.theme-browser .theme .theme-actions .button { .theme-browser .theme .theme-actions .button {
margin-left: 5px; float: none;
margin-left: 3px;
}
.theme-browser .theme .theme-actions .button:first-child {
margin-left: 0;
} }
</style> </style>
<div class="theme-browser"> <div class="theme-browser">