雨霖铃
2025-11-25 01:07:46 +08:00
parent a4c331bd8b
commit ed6053473d
9 changed files with 400 additions and 143 deletions
+219
View File
@@ -0,0 +1,219 @@
/* sidepanel/style.css */
#app {
display: flex;
flex-direction: column;
height: 100%;
}
.navbar {
display: flex;
background-color: #f8f9fa;
border-bottom: 1px solid #dee2e6;
padding: 0.5rem;
}
.nav-button {
flex: 1;
padding: 0.5rem 1rem;
background-color: transparent;
border: none;
cursor: pointer;
text-align: center;
transition: all 0.3s ease;
}
.nav-button:hover {
background-color: #e9ecef;
}
.nav-button.active {
background-color: #007bff;
color: white;
transform: translateY(-2px);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.close-button {
padding: 0.25rem 0.75rem;
background-color: #dc3545;
color: white;
border: none;
border-radius: 0.25rem;
cursor: pointer;
margin-left: auto;
transition: all 0.3s ease;
}
.close-button:hover {
background-color: #c82333;
transform: scale(1.05);
}
#current-timestamp {
p a {
box-sizing: border-box;
color: #2b2b2b;
font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;
}
button {
padding: 0.5rem 1rem;
background-color: #28a745;
color: white;
border: none;
border-radius: 0.25rem;
cursor: pointer;
height: 2rem;
align-self: flex-start;
transition: all 0.3s ease;
}
button:active {
transform: scale(0.95);
}
button:hover {
background-color: #218838;
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
}
.datetime-box {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 0.5rem;
transition: all 0.3s ease;
}
.input-group {
display: flex;
gap: 1rem;
align-items: center;
transition: all 0.3s ease;
}
.input-text {
width: 200px;
padding: 0.5rem;
box-sizing: border-box;
border: 1px solid #ced4da;
border-radius: 0.25rem;
transition: all 0.3s ease;
}
.input-text:focus {
border-color: #007bff;
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
outline: none;
}
.select-box {
min-width: 150px;
padding: 0.5rem;
box-sizing: border-box;
border: 1px solid #ced4da;
border-radius: 0.25rem;
transition: all 0.3s ease;
}
.select-box:focus {
border-color: #007bff;
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
outline: none;
}
.convert-button {
padding: 0.5rem 1rem;
background-color: #28a745;
color: white;
border: none;
border-radius: 0.25rem;
cursor: pointer;
height: 2rem;
width: 4rem;
align-self: flex-start;
transition: all 0.3s ease;
}
.convert-button:hover {
background-color: #218838;
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.content {
padding: 1rem;
position: relative;
flex: 1;
overflow: hidden;
}
/* 页面切换动画 */
.page {
display: none;
position: absolute;
top: 0;
left: 0;
width: 100%;
padding: 1rem;
opacity: 0;
transform: translateX(20px);
transition: opacity 0.3s ease, transform 0.3s ease;
}
.page.active {
display: block;
position: relative;
opacity: 1;
transform: translateX(0);
transition: opacity 0.3s ease, transform 0.3s ease;
}
/* 按钮点击效果 */
.button:active,
.convert-button:active,
.nav-button:active,
.close-button:active {
transform: scale(0.95);
}
/* 输入框动画 */
.input-text,
.select-box {
transition: all 0.2s ease-in-out;
}
.input-text:hover,
.select-box:hover {
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* 结果显示动画 */
#timestamp-conversion-result,
#date-conversion-result,
#current-timestamp-value {
transition: all 0.3s ease;
}
#timestamp-conversion-result:focus,
#date-conversion-result:focus,
#current-timestamp-value:focus {
transform: scale(1.02);
}
@media screen and (max-width: 900px) {
.input-group {
width: 100%;
}
.input-text {
width: 100%;
}
.page {
padding: 0.5rem;
}
}