feat: enhance UI styling, add date picker, and clean up inline CSS
This commit is contained in:
@@ -11,10 +11,10 @@
|
||||
<div class="paper-search-row">
|
||||
<input type="text" name="q" value="{{ request.query_params.get('q', '') }}"
|
||||
placeholder="搜索标题 / 摘要..." class="paper-search-input" />
|
||||
<input type="date" name="date_from" value="{{ request.query_params.get('date_from', '') }}"
|
||||
class="paper-filter-input" title="起始日期" />
|
||||
<input type="date" name="date_to" value="{{ request.query_params.get('date_to', '') }}"
|
||||
class="paper-filter-input" title="结束日期" />
|
||||
<input type="text" name="date_from" value="{{ request.query_params.get('date_from', '') }}"
|
||||
class="paper-filter-input kami-date-input" placeholder="起始日期" readonly id="date-from-trigger" />
|
||||
<input type="text" name="date_to" value="{{ request.query_params.get('date_to', '') }}"
|
||||
class="paper-filter-input kami-date-input" placeholder="结束日期" readonly id="date-to-trigger" />
|
||||
<select name="summary_status" class="paper-filter-input">
|
||||
<option value="all" {% if current_status == 'all' %}selected{% endif %}>全部状态</option>
|
||||
<option value="none" {% if current_status == 'none' %}selected{% endif %}>未总结</option>
|
||||
@@ -168,4 +168,27 @@
|
||||
function closeConfirm() { document.getElementById('confirm-overlay').style.display='none'; _confirmAction=null; _confirmTarget=null; }
|
||||
document.addEventListener('keydown',e=>{if(e.key==='Escape')closeConfirm();});
|
||||
</script>
|
||||
<script src="/static/js/date-picker.js"></script>
|
||||
<script>
|
||||
(function() {
|
||||
var today = new Date().toISOString().slice(0, 10);
|
||||
var fromEl = document.getElementById('date-from-trigger');
|
||||
var toEl = document.getElementById('date-to-trigger');
|
||||
|
||||
if (fromEl) {
|
||||
new KamiDatePicker(fromEl, {
|
||||
value: fromEl.value || null,
|
||||
maxDate: today,
|
||||
onChange: function(dateStr) { fromEl.value = dateStr || ''; }
|
||||
});
|
||||
}
|
||||
if (toEl) {
|
||||
new KamiDatePicker(toEl, {
|
||||
value: toEl.value || null,
|
||||
maxDate: today,
|
||||
onChange: function(dateStr) { toEl.value = dateStr || ''; }
|
||||
});
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user