fix post generate

This commit is contained in:
2026-01-15 19:46:01 +09:00
parent 162072d980
commit fbd1a978b1
12 changed files with 1705 additions and 118 deletions

View File

@@ -429,9 +429,139 @@ body {
.post-content {
font-size: 16px;
line-height: 1.8;
white-space: pre-wrap;
}
/* Markdown Styles */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
margin-top: 1.5em;
margin-bottom: 0.5em;
font-weight: 600;
line-height: 1.3;
}
.post-content h1 { font-size: 1.75em; }
.post-content h2 { font-size: 1.5em; }
.post-content h3 { font-size: 1.25em; }
.post-content h4 { font-size: 1.1em; }
.post-content p {
margin-bottom: 1em;
}
.post-content ul,
.post-content ol {
margin-bottom: 1em;
padding-left: 1.5em;
}
.post-content li {
margin-bottom: 0.25em;
}
.post-content a {
color: var(--btn-color);
text-decoration: none;
}
.post-content a:hover {
text-decoration: underline;
}
.post-content blockquote {
margin: 1em 0;
padding: 0.5em 1em;
border-left: 4px solid #ddd;
background: #f9f9f9;
color: #666;
}
.post-content code {
font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
font-size: 0.9em;
padding: 0.15em 0.4em;
background: #f0f0f0;
border-radius: 4px;
}
.post-content pre {
margin: 1em 0;
padding: 1em;
background: #1e1e1e;
border-radius: 8px;
overflow-x: auto;
}
.post-content pre code {
display: block;
padding: 0;
background: transparent;
color: #d4d4d4;
font-size: 14px;
line-height: 1.5;
}
.post-content img {
max-width: 100%;
height: auto;
border-radius: 8px;
}
.post-content hr {
margin: 2em 0;
border: none;
border-top: 1px solid #eee;
}
.post-content table {
width: 100%;
margin: 1em 0;
border-collapse: collapse;
}
.post-content th,
.post-content td {
padding: 0.5em;
border: 1px solid #ddd;
text-align: left;
}
.post-content th {
background: #f5f5f5;
font-weight: 600;
}
/* Highlight.js Theme Overrides */
.hljs-keyword,
.hljs-selector-tag,
.hljs-built_in,
.hljs-name,
.hljs-tag { color: #569cd6; }
.hljs-string,
.hljs-title,
.hljs-section,
.hljs-attribute,
.hljs-literal,
.hljs-template-tag,
.hljs-template-variable,
.hljs-type,
.hljs-addition { color: #ce9178; }
.hljs-comment,
.hljs-quote,
.hljs-deletion,
.hljs-meta { color: #6a9955; }
.hljs-number,
.hljs-regexp,
.hljs-symbol,
.hljs-variable,
.hljs-link { color: #b5cea8; }
.hljs-function { color: #dcdcaa; }
.hljs-attr { color: #9cdcfe; }
.post-footer {
margin-top: 32px;
padding-top: 16px;
@@ -460,6 +590,96 @@ body {
padding: 40px;
text-align: center;
color: #666;
display: flex;
flex-direction: column;
align-items: center;
gap: 12px;
}
.loading-spinner {
width: 24px;
height: 24px;
border: 3px solid #e0e0e0;
border-top-color: var(--btn-color);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* Skeleton UI */
.browser-skeleton {
padding: 16px 0;
}
.skeleton-header {
margin-bottom: 16px;
}
.skeleton-title {
width: 120px;
height: 20px;
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
background-size: 200% 100%;
animation: shimmer 1.5s infinite;
border-radius: 4px;
}
.skeleton-list {
list-style: none;
}
.skeleton-item {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 8px;
border-bottom: 1px solid #eee;
}
.skeleton-icon {
width: 24px;
height: 24px;
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
background-size: 200% 100%;
animation: shimmer 1.5s infinite;
border-radius: 4px;
}
.skeleton-text {
flex: 1;
height: 16px;
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
background-size: 200% 100%;
animation: shimmer 1.5s infinite;
border-radius: 4px;
max-width: 200px;
}
@keyframes shimmer {
0% {
background-position: -200% 0;
}
100% {
background-position: 200% 0;
}
}
@media (prefers-color-scheme: dark) {
.skeleton-title,
.skeleton-icon,
.skeleton-text {
background: linear-gradient(90deg, #2a2a2a 25%, #333 50%, #2a2a2a 75%);
background-size: 200% 100%;
animation: shimmer 1.5s infinite;
}
.skeleton-item {
border-color: #333;
}
}
/* Footer */
@@ -776,4 +996,122 @@ body {
.delete-btn:hover {
background: #c82333;
}
/* Dark mode markdown */
.post-content blockquote {
border-color: #444;
background: #1a1a1a;
color: #aaa;
}
.post-content code {
background: #2a2a2a;
}
.post-content th {
background: #2a2a2a;
}
.post-content th,
.post-content td {
border-color: #444;
}
.post-content hr {
border-color: #333;
}
}
/* Modal */
.modal {
position: fixed;
inset: 0;
z-index: 1000;
display: flex;
align-items: center;
justify-content: center;
}
.modal[hidden] {
display: none;
}
.modal-backdrop {
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.5);
}
.modal-container {
position: relative;
width: 90%;
max-width: 800px;
max-height: 85vh;
background: #fff;
border-radius: 12px;
display: flex;
flex-direction: column;
overflow: hidden;
}
.modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 20px;
border-bottom: 1px solid #eee;
}
.modal-header h2 {
font-size: 18px;
font-weight: 600;
margin: 0;
}
.modal-close {
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
background: none;
border: none;
font-size: 24px;
color: #666;
cursor: pointer;
border-radius: 6px;
}
.modal-close:hover {
background: #f0f0f0;
color: #333;
}
.modal-body {
flex: 1;
overflow-y: auto;
padding: 20px;
}
/* Browser tab button styling */
button.tab {
background: none;
border: none;
cursor: pointer;
font-family: inherit;
}
/* Dark mode modal */
@media (prefers-color-scheme: dark) {
.modal-container {
background: #1a1a1a;
}
.modal-header {
border-color: #333;
}
.modal-header h2 {
color: #e0e0e0;
}
.modal-close {
color: #888;
}
.modal-close:hover {
background: #333;
color: #e0e0e0;
}
}