Skip to content

Commit fdc05ed

Browse files
committed
标签云、开关ui优化
1 parent 45a182f commit fdc05ed

8 files changed

Lines changed: 976 additions & 81 deletions

File tree

App/edit_external_links.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ module.exports = function () {
3333
langdata.PLEASE_INPUT_EXTERNAL_LINK_URL[lang_name]
3434
}" id="external_link_url">
3535
</div>
36-
<div class="mb-3 form-check">
36+
<div class="mb-3 form-check form-switch">
3737
<input type="checkbox" class="form-check-input" id="external_link_open_in_new_tab">
3838
<label class="form-check-label" for="external_link_open_in_new_tab">${
3939
langdata.OPEN_IN_NEW_TAB[lang_name]

App/i18n

App/manage.html

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,22 @@ <h5 class="modal-title" id="edit_external_links_dialog_title"></h5>
174174
</div>
175175
</div>
176176

177+
<div class="modal fade" tabindex="-1" id="article_tag_cloud_dialog">
178+
<div class="modal-dialog modal-lg">
179+
<div class="modal-content">
180+
<div class="modal-header">
181+
<h5 class="modal-title" id="article_tag_cloud_dialog_title"></h5>
182+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
183+
</div>
184+
<div class="modal-body" id="article_tag_cloud_dialog_content">
185+
</div>
186+
<div class="modal-footer">
187+
<button type="button" class="primary_btn" id="close_article_tag_cloud_btn" data-bs-dismiss="modal"></button>
188+
</div>
189+
</div>
190+
</div>
191+
</div>
192+
177193

178194

179195

@@ -184,4 +200,4 @@ <h5 class="modal-title" id="edit_external_links_dialog_title"></h5>
184200
<script src="./manage.js"></script>
185201
</body>
186202

187-
</html>
203+
</html>

App/render_article_manager.js

Lines changed: 555 additions & 77 deletions
Large diffs are not rendered by default.

App/start.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ function open_customize_bbg_ui_dialog() {
558558
<div class="container-fluid">
559559
<h3>${langdata["SETTING_OF_CUSTOM_UI"][lang_name]}</h3>
560560
<br />
561-
<div class="form-check">
561+
<div class="form-check form-switch">
562562
<input class="form-check-input" type="checkbox" value="" id="enable_custom_ui">
563563
<label class="form-check-label" for="enable_custom_ui">
564564
${langdata["ENABLE_CUSTOM_UI"][lang_name]}

App/stylesheets/DarkMode.css

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -889,3 +889,66 @@ details > *:not(summary) {
889889
margin-top: 0.5em;
890890
padding-bottom: 0.5em;
891891
}
892+
893+
.form-check.form-switch {
894+
min-height: 18px;
895+
padding-left: 42px;
896+
}
897+
898+
.form-switch .form-check-input {
899+
width: 34px;
900+
height: 18px;
901+
margin-top: 0;
902+
margin-left: -42px;
903+
cursor: pointer;
904+
border: none;
905+
border-radius: 999px;
906+
background-color: rgba(255, 255, 255, 0.28);
907+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-2 -2 16 16'%3E%3Ccircle cx='6' cy='6' r='6' fill='%23ffffff'/%3E%3C/svg%3E");
908+
background-position: 2px center;
909+
background-size: 14px 14px;
910+
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
911+
transition: background-color 0.2s ease, background-position 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
912+
}
913+
914+
.form-switch .form-check-input:hover {
915+
background-color: rgba(255, 255, 255, 0.38);
916+
}
917+
918+
.form-switch .form-check-input:focus {
919+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-2 -2 16 16'%3E%3Ccircle cx='6' cy='6' r='6' fill='%23ffffff'/%3E%3C/svg%3E");
920+
box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.28);
921+
}
922+
923+
.form-switch .form-check-input:checked {
924+
background-color: #1677ff;
925+
background-position: calc(100% - 2px) center;
926+
}
927+
928+
.form-switch .form-check-input:checked:hover {
929+
background-color: #4096ff;
930+
}
931+
932+
.form-switch .form-check-input:disabled {
933+
cursor: not-allowed;
934+
opacity: 0.55;
935+
}
936+
937+
.form-switch .form-check-label {
938+
padding-left: 8px;
939+
cursor: pointer;
940+
user-select: none;
941+
}
942+
943+
.tag-cloud-order-toggle.form-switch {
944+
padding-left: 0;
945+
gap: 10px;
946+
}
947+
948+
.tag-cloud-order-toggle.form-switch .form-check-input {
949+
margin-left: 0;
950+
}
951+
952+
.tag-cloud-order-toggle.form-switch .form-check-label {
953+
padding-left: 0;
954+
}

0 commit comments

Comments
 (0)