fix(album): 样式改用 design-tokens(字号/间距/中性色),过插件主题与尺度双守卫
This commit is contained in:
1 parent
e97c9beb0d
commit
37c7c4b666
2 files changed
+19
-20
No files matched your search
@@ -535,7 +535,6 @@
|
||||
title: '相册',
|
||||
width: 300,
|
||||
height: 470,
|
||||
color: '#8a8a8a',
|
||||
ports: { in: true, out: true },
|
||||
defaults: { outKind: 'images', items: [], albumMode: 'per-image', density: 'S', page: 0, onlyPage: false, keepOriginal: ctx.settings.get('keepOriginal') !== false },
|
||||
render: function (node, props, host) {
|
||||
|
||||
+19
-19
@@ -4,45 +4,45 @@
|
||||
*/
|
||||
.iwb-album { display: flex; flex-direction: column; height: 100%; overflow: hidden; font-size: 11px; color: var(--iwb-node-text); }
|
||||
.iwb-album-bar, .iwb-album-tools, .iwb-album-pager, .iwb-album-onepage {
|
||||
display: flex; align-items: center; gap: 6px; padding: 4px 8px; flex: 0 0 auto;
|
||||
display: flex; align-items: center; gap: var(--iwb-space-6); padding: var(--iwb-space-4) var(--iwb-space-8); flex: 0 0 auto;
|
||||
}
|
||||
.iwb-album-bar { border-bottom: 1px solid var(--iwb-line-weak); height: 26px; }
|
||||
.iwb-album-tools { padding-top: 3px; padding-bottom: 3px; }
|
||||
.iwb-album-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: var(--iwb-node-text2); white-space: nowrap; cursor: pointer; }
|
||||
.iwb-album-tools { padding-top: var(--iwb-space-2); padding-bottom: var(--iwb-space-2); }
|
||||
.iwb-album-toggle { display: inline-flex; align-items: center; gap: var(--iwb-space-4); font-size: var(--iwb-font-2xs); color: var(--iwb-node-text2); white-space: nowrap; cursor: pointer; }
|
||||
.iwb-album-track { width: 22px; height: 12px; border-radius: 999px; background: var(--iwb-line); position: relative; flex: 0 0 auto; transition: background .15s; }
|
||||
.iwb-album-track i { position: absolute; top: 1.5px; left: 1.5px; width: 9px; height: 9px; border-radius: 50%; background: var(--iwb-panel); transition: left .15s; }
|
||||
.iwb-album-track.on { background: var(--iwb-brand); }
|
||||
.iwb-album-track.on i { left: 11.5px; }
|
||||
.iwb-album-count { margin-left: auto; font-size: 10px; color: var(--iwb-node-text2); white-space: nowrap; }
|
||||
.iwb-album-count { margin-left: auto; font-size: var(--iwb-font-2xs); color: var(--iwb-node-text2); white-space: nowrap; }
|
||||
.iwb-album-count b { color: var(--iwb-node-text); font-weight: 600; }
|
||||
.iwb-album-btn { height: 21px; padding: 0 7px; border: 1px solid var(--iwb-line); border-radius: var(--iwb-radius-chip); background: var(--iwb-panel); color: var(--iwb-node-text2); font-size: 10px; display: inline-flex; align-items: center; gap: 3px; cursor: pointer; white-space: nowrap; }
|
||||
.iwb-album-btn { height: 21px; padding: 0 var(--iwb-space-8); border: 1px solid var(--iwb-line); border-radius: var(--iwb-radius-chip); background: var(--iwb-panel); color: var(--iwb-node-text2); font-size: var(--iwb-font-2xs); display: inline-flex; align-items: center; gap: var(--iwb-space-4); cursor: pointer; white-space: nowrap; }
|
||||
.iwb-album-btn:hover { border-color: var(--iwb-brand); color: var(--iwb-node-text); }
|
||||
.iwb-album-btn.on { border-color: var(--iwb-brand); color: var(--iwb-node-text); }
|
||||
.iwb-album-seg { margin-left: auto; display: inline-flex; border: 1px solid var(--iwb-line); border-radius: var(--iwb-radius-chip); overflow: hidden; }
|
||||
.iwb-album-seg span { width: 21px; height: 21px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; color: var(--iwb-node-text2); background: var(--iwb-panel); cursor: pointer; }
|
||||
.iwb-album-seg span { width: 21px; height: 21px; display: inline-flex; align-items: center; justify-content: center; font-size: var(--iwb-font-2xs); color: var(--iwb-node-text2); background: var(--iwb-panel); cursor: pointer; }
|
||||
.iwb-album-seg span.on { background: var(--iwb-brand); color: var(--iwb-on-brand); }
|
||||
.iwb-album-grid { display: grid; gap: 5px; padding: 2px 8px 6px; overflow: hidden; align-content: start; flex: 1 1 auto; min-height: 0; }
|
||||
.iwb-album-grid { display: grid; gap: var(--iwb-space-4); padding: var(--iwb-space-2) var(--iwb-space-8) var(--iwb-space-6); overflow: hidden; align-content: start; flex: 1 1 auto; min-height: 0; }
|
||||
.iwb-album-cell { position: relative; border-radius: var(--iwb-radius-chip); overflow: hidden; background: var(--iwb-line-weak); border: 1px solid var(--iwb-line); cursor: grab; }
|
||||
.iwb-album-cell img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; }
|
||||
.iwb-album-cell.off img { opacity: .38; }
|
||||
.iwb-album-cell.sel { outline: 2px solid var(--iwb-brand); outline-offset: -2px; }
|
||||
.iwb-album-cell.missing { outline: 2px dashed #c0392b; outline-offset: -2px; }
|
||||
.iwb-album-cell.missing::after { content: '失联'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #c0392b; background: rgba(255,255,255,.72); }
|
||||
.iwb-album-cell.missing::after { content: '失联'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: var(--iwb-font-2xs); color: #c0392b; background: rgba(255,255,255,.72); }
|
||||
.iwb-album-cell.dragging { opacity: .45; }
|
||||
.iwb-album-cell.dropbefore { box-shadow: -3px 0 0 0 var(--iwb-brand); }
|
||||
.iwb-album-idx { position: absolute; left: 3px; top: 3px; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-size: 9px; display: flex; align-items: center; justify-content: center; }
|
||||
.iwb-album-batch { position: absolute; right: 3px; top: 3px; padding: 0 4px; height: 14px; border-radius: 999px; background: rgba(107,114,128,.92); color: #fff; font-size: 9px; display: flex; align-items: center; }
|
||||
.iwb-album-del { position: absolute; right: 3px; bottom: 3px; width: 15px; height: 15px; border-radius: 50%; background: rgba(255,255,255,.92); color: #666; font-size: 11px; line-height: 1; display: flex; align-items: center; justify-content: center; opacity: 0; cursor: pointer; }
|
||||
.iwb-album-idx { position: absolute; left: var(--iwb-space-2); top: var(--iwb-space-2); min-width: 14px; height: 14px; padding: 0 var(--iwb-space-4); border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-size: var(--iwb-font-2xs); display: flex; align-items: center; justify-content: center; }
|
||||
.iwb-album-batch { position: absolute; right: var(--iwb-space-2); top: var(--iwb-space-2); padding: 0 var(--iwb-space-4); height: 14px; border-radius: 999px; background: rgba(107,114,128,.92); color: #fff; font-size: var(--iwb-font-2xs); display: flex; align-items: center; }
|
||||
.iwb-album-del { position: absolute; right: var(--iwb-space-2); bottom: 3px; width: 15px; height: 15px; border-radius: 50%; background: var(--iwb-panel); color: var(--iwb-node-text2); font-size: 11px; line-height: 1; display: flex; align-items: center; justify-content: center; opacity: 0; cursor: pointer; }
|
||||
.iwb-album-cell:hover .iwb-album-del { opacity: 1; }
|
||||
.iwb-album-add { border: 1px dashed var(--iwb-line); background: transparent; color: var(--iwb-node-text2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; border-radius: var(--iwb-radius-chip); cursor: pointer; }
|
||||
.iwb-album-add { border: 1px dashed var(--iwb-line); background: transparent; color: var(--iwb-node-text2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--iwb-space-2); font-size: var(--iwb-font-2xs); border-radius: var(--iwb-radius-chip); cursor: pointer; }
|
||||
.iwb-album-add b { font-size: 15px; line-height: 1; font-weight: 600; }
|
||||
.iwb-album-pager { border-top: 1px solid var(--iwb-line-weak); height: 26px; }
|
||||
.iwb-album-onepage { border-top: 1px solid var(--iwb-line-weak); height: 26px; color: var(--iwb-node-text2); font-size: 10px; }
|
||||
.iwb-album-onepage { border-top: 1px solid var(--iwb-line-weak); height: 26px; color: var(--iwb-node-text2); font-size: var(--iwb-font-2xs); }
|
||||
.iwb-album-pg { display: inline-flex; align-items: center; border: 1px solid var(--iwb-line); border-radius: var(--iwb-radius-chip); background: var(--iwb-panel); }
|
||||
.iwb-album-pg span { width: 17px; height: 17px; display: flex; align-items: center; justify-content: center; font-size: 10px; cursor: pointer; color: var(--iwb-node-text2); }
|
||||
.iwb-album-pg b { font-weight: 600; color: var(--iwb-node-text); padding: 0 2px; font-size: 10px; }
|
||||
.iwb-album-mini { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: 10px; color: var(--iwb-node-text2); white-space: nowrap; }
|
||||
.iwb-album-hint { margin: 0 8px 4px; padding: 4px 6px; border-radius: var(--iwb-radius-chip); background: rgba(107,114,128,.10); border: 1px solid rgba(107,114,128,.22); color: var(--iwb-node-text2); font-size: 10px; line-height: 1.45; }
|
||||
.iwb-album-pg span { width: 17px; height: 17px; display: flex; align-items: center; justify-content: center; font-size: var(--iwb-font-2xs); cursor: pointer; color: var(--iwb-node-text2); }
|
||||
.iwb-album-pg b { font-weight: 600; color: var(--iwb-node-text); padding: 0 2px; font-size: var(--iwb-font-2xs); }
|
||||
.iwb-album-mini { display: inline-flex; align-items: center; gap: var(--iwb-space-4); margin-left: auto; font-size: var(--iwb-font-2xs); color: var(--iwb-node-text2); white-space: nowrap; }
|
||||
.iwb-album-hint { margin: 0 8px 4px; padding: 4px 6px; border-radius: var(--iwb-radius-chip); background: rgba(107,114,128,.10); border: 1px solid rgba(107,114,128,.22); color: var(--iwb-node-text2); font-size: var(--iwb-font-2xs); line-height: 1.45; }
|
||||
.iwb-album-hint b { color: var(--iwb-node-text); }
|
||||
.iwb-album-empty { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--iwb-node-text2); font-size: 11px; text-align: center; padding: 0 14px; }
|
||||
.iwb-album-empty .box { width: 66px; height: 50px; border: 1.5px dashed var(--iwb-line); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--iwb-node-text2); }
|
||||
.iwb-album-empty { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--iwb-space-6); color: var(--iwb-node-text2); font-size: 11px; text-align: center; padding: 0 var(--iwb-space-12); }
|
||||
.iwb-album-empty .box { width: 66px; height: 50px; border: 1.5px dashed var(--iwb-line); border-radius: var(--iwb-radius-chip); display: flex; align-items: center; justify-content: center; font-size: var(--iwb-font-xl); color: var(--iwb-node-text2); }
|
||||
Reference in new issue
Block a user