Skip to content

Commit

Permalink
⬆️ 升级bootstrap版本为5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Licoy committed Dec 15, 2022
1 parent 6e9bdbf commit 49b7021
Show file tree
Hide file tree
Showing 20 changed files with 156 additions and 127 deletions.
137 changes: 66 additions & 71 deletions assets/dist/js/libs.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/dist/js/puock.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/dist/style/common.min.css

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions assets/dist/style/libs.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/dist/style/style.min.css

Large diffs are not rendered by default.

19 changes: 13 additions & 6 deletions assets/js/puock.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class Puock {
this.eventPostMainBoxResize()
this.swiperOnceEvent()
this.initModalToggle()
layer.config({shade:0.5})
layer.config({shade: 0.5})
}

pageInit() {
Expand Down Expand Up @@ -396,7 +396,9 @@ class Puock {
if (this.data.params.use_post_menu) {
this.generatePostMenuHTML()
}
$('[data-toggle="tooltip"]').tooltip({placement: 'auto', trigger: 'hover'});
[...document.querySelectorAll('[data-toggle="tooltip"]')].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl, {
placement: 'bottom', trigger: 'hover'
}))
$(".entry-content").viewer({
navbar: false,
url: this.data.params.main_lazy_img ? 'data-src' : 'src'
Expand Down Expand Up @@ -1096,8 +1098,13 @@ class Puock {

}

$(() => {
window.Puock = new Puock()
window.Puock.onceInit()
})
$(
() => {
window
.Puock = new Puock()
window
.Puock
.onceInit()
}
)

7 changes: 7 additions & 0 deletions assets/libs/basic/bootstrap/bootstrap.bundle.min.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions assets/libs/basic/bootstrap/bootstrap.min.css

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions assets/libs/basic/bootstrap/bootstrap.min.js

This file was deleted.

2 changes: 1 addition & 1 deletion assets/libs/basic/fontawesome/all.min.css

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions assets/libs/basic/popper.js

This file was deleted.

44 changes: 33 additions & 11 deletions assets/style/common.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@

a {
color: var(--pk-c-primary);
text-decoration: none;
}

.wh100 {
width: 100%;
height: 100%;
}

.form-group {
margin-bottom: 1rem;
}

.text-2line {
overflow: hidden;
text-overflow: ellipsis;
Expand Down Expand Up @@ -116,6 +121,10 @@ a {
text-align: right;
}

.ml-1 {
margin-left: 0.25rem !important;
}

.--dynamic-distance(@pre,@attr,@step,@start,@end) when (@start<=@end) {
.--dynamic-distance(@pre, @attr, @step, @start + @step, @end);
.@{pre}@{start} {
Expand All @@ -133,14 +142,14 @@ a {

.--each-btn(@i:1) when (@i =< length(@colors)) {
@item: extract(@colors, @i);
.btn-@{item},.btn-@{item}:hover {
.btn-@{item}, .btn-@{item}:hover {
background-color: ~"var(--pk-c-@{item})" !important;
color: var(--pk-c-light);
border-color: ~"var(--pk-c-@{item})" !important;
}
.btn-@{item}:hover:hover{
opacity: .8;
}
.btn-@{item}:hover:hover {
opacity: .8;
}
.--each-btn(@i+1);
}

Expand Down Expand Up @@ -196,6 +205,16 @@ a {
}
}

.form-check-input:checked {
}

.form-check-input {
&:checked {
background-color: var(--pk-c-primary) !important;
border-color: var(--pk-c-primary) !important;
}
}

.btn {
transition: all .3s;

Expand Down Expand Up @@ -329,7 +348,7 @@ a {
}
}

.p-flex-center{
.p-flex-center {
display: flex;
justify-content: center;
align-items: center;
Expand Down Expand Up @@ -444,11 +463,12 @@ a {
}
}

.t-separator{
display:flex;
.t-separator {
display: flex;
justify-content: center;
align-items: center;
&:before,&:after{

&:before, &:after {
flex: 1;
content: "";
background: var(--pk-c-border);
Expand All @@ -458,18 +478,20 @@ a {
}
}

.pk-badge{
.pk-badge {
display: inline-block;
padding: 5px 10px;
cursor: pointer;
border-radius: 2px;
background-color: var(--pk-bg-box-content);
color: var(--pk-c-sub) !important;
&:hover{

&:hover {
background-color: var(--pk-c-primary);
color: var(--pk-c-light) !important;
}
&.pk-badge-sm{

&.pk-badge-sm {
padding: 3px 6px;
font-size: 12px;
}
Expand Down
9 changes: 7 additions & 2 deletions assets/style/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,11 @@ body.pre-mac pre {
.fs16;
}

& > button {
border: none;
background: transparent;
}

.close {
i {
display: inline-block;
Expand Down Expand Up @@ -640,7 +645,7 @@ a:hover {
}

.btn:hover,
.btn:focus, .form-control:hover, .form-control:focus, button:focus, .abc-checkbox label:focus {
.btn:focus, .form-control:hover, .form-control:focus, button:focus, .abc-checkbox label:focus,.form-check-input:focus {
outline: none;
box-shadow: none;
}
Expand Down Expand Up @@ -1420,7 +1425,7 @@ a:hover {
#search {
position: fixed;
top: 90px;
z-index: 1041;
z-index: 9999;
width: 100%;

#search-main {
Expand Down
2 changes: 1 addition & 1 deletion footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title puock-text" id="infoToastTitle"></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
<span aria-hidden="true"><i class="fa fa-close t-md"></i></span>
</button>
</div>
Expand Down
5 changes: 4 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ gulp.task('style', function () {

gulp.task('lib_style', function () {
return gulp.src(_libs_style)
.pipe(concatCss("libs.min.css"))
.pipe(concatCss("libs.min.css",{
// inlineImports:false,
rebaseUrls:false
}))
.pipe(minifyCSS({
format: 'keep-breaks',
semicolonAfterLastProperty: true,
Expand Down
5 changes: 3 additions & 2 deletions inc/ajax/page-front-login.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,9 @@ class="form-control form-control-sm t-sm" name="vd"
</div>
</div>
<?php endif; ?>
<div class="mb15">
<label><input type="checkbox" name="remember"> 记住我</label>
<div class="mb15 form-check form-switch">
<input class="form-check-input" name="remember" type="checkbox" role="switch" id="front-login-remember-me">
<label class="form-check-label" for="front-login-remember-me"> 记住我</label>
</div>
<div class="mb15 d-flex justify-content-center wh100">
<button class="btn btn-ssm btn-primary mr5" type="submit"><i class="fa fa-right-to-bracket"></i> 立即登录
Expand Down
2 changes: 1 addition & 1 deletion templates/module-reward.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title puock-text">打赏</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
<span aria-hidden="true"><i class="fa fa-close t-md"></i></span>
</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/module-smiley.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title puock-text">选择表情</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
<span aria-hidden="true"><i class="fa fa-close t-md"></i></span>
</button>
</div>
Expand Down
4 changes: 2 additions & 2 deletions templates/post-actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<i class="fa-regular fa-thumbs-up t-md"></i>&nbsp;<span
class="t-sm"><?php echo get_post_meta($post->ID, 'puock_like', true) ?></span></div>
<?php if (pk_is_checked('post_reward')): ?>
<div class="circle-button puock-bg text-center" data-toggle="modal" data-target="#rewardModal">
<div class="circle-button puock-bg text-center" data-bs-toggle="modal" data-bs-target="#rewardModal">
<span>赏</span></div>
<?php endif; ?>
<div class="circle-button puock-bg text-center" data-toggle="modal" data-target="#shareModal"><i
<div class="circle-button puock-bg text-center" data-bs-toggle="modal" data-bs-target="#shareModal"><i
class="fa fa-share-from-square t-md"></i></div>
<?php if(pk_is_checked('post_poster_open')):?>
<div class="circle-button puock-bg text-center pk-modal-toggle"
Expand Down
2 changes: 1 addition & 1 deletion templates/post-share.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title puock-text"><?php _e('分享至', PUOCK) ?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
<span aria-hidden="true"><i class="fa fa-close t-md"></i></span>
</button>
</div>
Expand Down

0 comments on commit 49b7021

Please sign in to comment.