进行了一些小修复
This commit is contained in:
@@ -457,44 +457,9 @@ body.aksrt-editor-media-open {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.newpost-pay-box .form-switch {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 42px;
|
||||
height: 22px;
|
||||
border-radius: 30px;
|
||||
background: #d9dde2;
|
||||
transition: 0.2s;
|
||||
}
|
||||
|
||||
.newpost-pay-box .form-switch::after {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
left: 2px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border-radius: 50%;
|
||||
background: #fff;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
||||
content: "";
|
||||
transition: 0.2s;
|
||||
}
|
||||
|
||||
.newpost-pay-box input:checked + .form-switch {
|
||||
background: var(--focus-color, #f04494);
|
||||
}
|
||||
|
||||
.newpost-pay-box input:checked + .form-switch::after {
|
||||
transform: translateX(20px);
|
||||
}
|
||||
|
||||
.newpost-pay-price .line-form-input {
|
||||
width: 130px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
font-size: 2em;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.pay-dawnload-edit .lists-box {
|
||||
|
||||
@@ -28,7 +28,7 @@ if (!function_exists('aksrt_submit_pay_line')) {
|
||||
<div class="title-theme mb10"><?php esc_html_e('付费内容', 'aksrt'); ?></div>
|
||||
<div class="flex ac jsb padding-h10 border-bottom">
|
||||
<div class="flex ac"><?php esc_html_e('内容付费', 'aksrt'); ?></div>
|
||||
<label class="form-switch-label"><input class="hide" type="checkbox" name="pay_enabled" value="1" <?php checked($enabled); ?> data-pay-toggle><span class="form-switch flex0"></span></label>
|
||||
<label class="form-switch-label"><input class="hide" type="checkbox" name="pay_enabled" value="1" <?php checked($enabled); ?> data-pay-toggle><div class="form-switch flex0"></div></label>
|
||||
</div>
|
||||
|
||||
<div data-pay-fields <?php echo $enabled ? '' : 'hidden'; ?>>
|
||||
|
||||
@@ -75,6 +75,16 @@ test('front submit paid resources use the reference modal editor and compact lis
|
||||
assert.doesNotMatch(downloads, /shop|forum|bbs_/i);
|
||||
});
|
||||
|
||||
test('front submit paid-content prices and switch use the reference alignment rules', () => {
|
||||
const pay = read('templates/parts/submit/sidebar-pay.php');
|
||||
const submitCss = read('assets/css/frontend/pages/submit.css');
|
||||
|
||||
assert.match(pay, /<div class="form-switch flex0"><\/div>/);
|
||||
assert.match(submitCss, /\.newpost-pay-price \.line-form-input\s*{[^}]*text-align:\s*right;/);
|
||||
assert.doesNotMatch(submitCss, /\.newpost-pay-price \.line-form-input\s*{[^}]*width:\s*130px;/);
|
||||
assert.doesNotMatch(submitCss, /\.newpost-pay-box \.form-switch(?:::after)?\s*{/);
|
||||
});
|
||||
|
||||
test('front submit image and visibility actions live in the TinyMCE toolbar', () => {
|
||||
const main = read('templates/parts/submit/editor-main.php');
|
||||
const page = read('templates/pages/page-submit.php');
|
||||
|
||||
Reference in New Issue
Block a user