fix: clean rewrite with span icons, remove important
This commit is contained in:
parent
93a514b8ac
commit
226196d90e
@ -170,7 +170,7 @@ main{padding:24px 28px 36px;max-width:1440px}
|
||||
|
||||
.btn,button,input,select,textarea{font:inherit}
|
||||
.btn,button{display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:5px 10px;border-radius:var(--radius);border:1px solid var(--border-strong);background:var(--button-soft);color:var(--button-soft-text);cursor:pointer;font-size:11px;font-weight:500;line-height:1.15;min-height:30px;transition:background-color .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease}
|
||||
.btn-icon{display:inline-flex;align-items:center;justify-content:center;gap:0;padding:0!important;width:22px!important;height:22px!important;min-height:0!important;border-radius:var(--radius);border:1px solid var(--border-strong);background:var(--button-soft);color:var(--button-soft-text);cursor:pointer;font-size:11px;font-weight:500;line-height:1;flex-shrink:0;transition:background-color .16s ease}
|
||||
.btn-icon{display:inline-flex;align-items:center;justify-content:center;gap:0;padding:0;width:22px;height:22px;min-height:0;border-radius:var(--radius);border:1px solid var(--border-strong);background:var(--button-soft);color:var(--button-soft-text);cursor:pointer;font-size:11px;font-weight:500;line-height:1;flex-shrink:0;transition:background-color .16s ease}
|
||||
.btn-icon:hover{background:var(--button-soft-hover)}
|
||||
.btn:hover,button:hover{background:var(--button-soft-hover);border-color:#c3ccd6}
|
||||
.btn.primary,button.primary{background:var(--primary-strong);border-color:var(--primary-strong);color:#f8fafc}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{{define "face_gallery"}}
|
||||
<div id="modal" class="modal-overlay" style="display:none">
|
||||
<div class="card" style="max-width:500px;width:90%;max-height:80vh;overflow-y:auto;position:relative">
|
||||
<button class="btn ghost" type="button" onclick="closeModal()" style="position:absolute;top:8px;right:8px;font-size:16px;padding:2px 8px;line-height:1">×</button>
|
||||
<span class="btn-icon ghost" style="position:absolute;top:8px;right:8px;font-size:14px" title="关闭" onclick="closeModal()">×</span>
|
||||
<div id="modal-body"></div>
|
||||
</div>
|
||||
</div>
|
||||
@ -25,8 +25,8 @@
|
||||
{{if .Photos}}
|
||||
<img src="/ui/face-photo/{{index .Photos 0}}" style="width:100%;height:100%;object-fit:cover" id="img-{{.ID}}" />
|
||||
{{if gt .PhotoCount 1}}
|
||||
<button class="btn ghost nav-btn" id="prev-{{.ID}}" style="position:absolute;left:2px;top:50%;transform:translateY(-50%);padding:2px 4px;font-size:10px;opacity:0.7;display:none" onclick="navPhoto({{.ID}},-1)">◀</button>
|
||||
<button class="btn ghost nav-btn" id="next-{{.ID}}" style="position:absolute;right:2px;top:50%;transform:translateY(-50%);padding:2px 4px;font-size:10px;opacity:0.7" onclick="navPhoto({{.ID}},1)">▶</button>
|
||||
<span class="btn-icon ghost nav-btn" id="prev-{{.ID}}" style="position:absolute;left:2px;top:50%;transform:translateY(-50%);font-size:10px;opacity:0.7;display:none" onclick="navPhoto({{.ID}},-1)">◀</span>
|
||||
<span class="btn-icon ghost nav-btn" id="next-{{.ID}}" style="position:absolute;right:2px;top:50%;transform:translateY(-50%);font-size:10px;opacity:0.7" onclick="navPhoto({{.ID}},1)">▶</span>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<div class="muted" style="display:flex;align-items:center;justify-content:center;height:100%">无照片</div>
|
||||
@ -35,10 +35,10 @@
|
||||
<div style="margin-top:6px;display:flex;justify-content:space-between;align-items:center">
|
||||
<div><span style="font-weight:500;font-size:13px">{{.Name}}</span> <span class="muted small">{{.PhotoCount}}张</span></div>
|
||||
<div class="actions compact" style="gap:2px">
|
||||
<span class="btn-icon ghost" title="编辑" onclick="showEdit({{.ID}},'{{.Name}}',[{{range $i,$p := .Photos}}{{if $i}},{{end}}'/ui/face-photo/{{$p}}'{{end}}])">">✎</button>#9998;</span>
|
||||
<span class="btn-icon ghost" title="编辑" onclick="showEdit({{.ID}},'{{.Name}}',[{{range $i,$p := .Photos}}{{if $i}},{{end}}'/ui/face-photo/{{$p}}'{{end}}])">✎</span>
|
||||
<form method="post" action="/ui/face-gallery/delete" style="display:inline" onsubmit="return confirm('确定删除 {{.Name}}?')">
|
||||
<input type="hidden" name="id" value="{{.ID}}">
|
||||
<span class="btn-icon ghost" style="color:var(--danger-soft-text)" title="删除" onclick="this.closest('form').submit()"><button class="btn-icon ghost" type="submit" style="color:var(--danger-soft-text)" title="删除">✕</button>#10005;</span>
|
||||
<span class="btn-icon ghost" style="color:var(--danger-soft-text)" title="删除" onclick="this.closest('form').submit()">✕</span>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@ -79,7 +79,7 @@ function showEdit(id,name,photos){
|
||||
html+='<button class="btn" type="submit" style="margin-bottom:1px">保存</button></form>';
|
||||
html+='<div style="display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px">';
|
||||
photos.forEach(function(p){
|
||||
html+='<div style="position:relative;width:80px;height:100px"><img src="'+p+'" style="width:100%;height:100%;object-fit:cover;border-radius:4px"><button class="btn ghost" style="position:absolute;top:2px;right:2px;font-size:10px;padding:1px 3px;color:red;background:rgba(0,0,0,0.5)" onclick="this.parentElement.remove()">×</button></div>';
|
||||
html+='<div style="position:relative;width:80px;height:100px"><img src="'+p+'" style="width:100%;height:100%;object-fit:cover;border-radius:4px"><span class="btn-icon ghost" style="position:absolute;top:2px;right:2px;font-size:10px;padding:1px 3px;color:red;background:rgba(0,0,0,0.5)" onclick="this.parentElement.remove()">×</span></div>';
|
||||
});
|
||||
html+='</div>';
|
||||
html+='<form method="post" action="/ui/face-gallery/add-photo" enctype="multipart/form-data" style="display:flex;gap:8px;align-items:flex-end">';
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>{{.Title}}</title>
|
||||
<link rel="stylesheet" href="/ui/assets/vendor/tabler.min.css" />
|
||||
<link rel="stylesheet" href="/ui/assets/style.css?v=20260508-ia05" />
|
||||
<link rel="stylesheet" href="/ui/assets/style.css?v=20260508-ia06" />
|
||||
<link rel="stylesheet" href="/ui/assets/graph_editor.css?v=20260429-ia01" />
|
||||
</head>
|
||||
<body data-theme="blue-dark">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user