iqijun_obsidian-image-share/styles.css
2025-02-06 23:36:47 +08:00

181 lines
3.7 KiB
CSS

/*
This CSS file will be included with your plugin, and
available in the app when your plugin is enabled.
If your plugin does not need CSS, delete this file.
*/
.image-share-modal {
max-width: none;
max-height: none;
}
.image-share-modal .resizable-container {
position: relative;
min-width: 400px;
min-height: 300px;
width: 600px;
height: 500px;
resize: both;
overflow: auto;
background: var(--background-primary);
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.image-share-modal .resize-handle {
position: absolute;
right: 0;
bottom: 0;
width: 20px;
height: 20px;
cursor: se-resize;
background: var(--interactive-accent);
clip-path: polygon(100% 0, 100% 100%, 0 100%);
opacity: 0.6;
transition: opacity 0.2s ease;
}
.image-share-modal .resize-handle:hover {
opacity: 1;
}
.image-share-modal .image-preview-container {
height: 100%;
display: flex;
flex-direction: column;
padding: 16px;
box-sizing: border-box;
}
.image-share-modal .canvas-container {
flex: 1;
overflow: auto;
margin-bottom: 16px;
display: flex;
justify-content: center;
align-items: flex-start;
}
.image-share-modal h2 {
margin-bottom: 16px;
color: var(--text-normal);
font-size: 1.2em;
font-weight: 600;
}
.image-share-modal .download-button {
background: var(--interactive-accent);
border: none;
border-radius: 50%;
width: 40px;
height: 40px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s ease;
padding: 10px;
color: var(--text-on-accent);
}
.image-share-modal .download-button:hover {
background: var(--interactive-accent-hover);
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.image-share-modal .download-button svg {
width: 20px;
height: 20px;
}
.image-share-modal canvas {
max-width: 100%;
height: auto;
object-fit: contain;
}
.image-share-modal .template-selector {
display: flex;
gap: 8px;
margin-bottom: 16px;
}
.image-share-modal .template-button {
padding: 6px 12px;
border: 1px solid var(--interactive-accent);
border-radius: 4px;
background: transparent;
color: var(--interactive-accent);
cursor: pointer;
transition: all 0.2s ease;
font-size: 0.9em;
}
.image-share-modal .template-button:hover {
background: var(--interactive-accent);
color: var(--text-on-accent);
}
.image-share-modal .template-button.active {
background: var(--interactive-accent);
color: var(--text-on-accent);
}
.markdown-preview-view {
font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
line-height: 1.6;
overflow: visible;
word-break: break-word;
white-space: pre-wrap;
}
.markdown-preview-view h1,
.markdown-preview-view h2,
.markdown-preview-view h3 {
margin: 0.5em 0;
font-weight: 600;
}
.markdown-preview-view h1 { font-size: 1.5em; }
.markdown-preview-view h2 { font-size: 1.3em; }
.markdown-preview-view h3 { font-size: 1.1em; }
.markdown-preview-view p {
margin: 0.5em 0;
}
.markdown-preview-view strong {
font-weight: 600;
}
.markdown-preview-view em {
font-style: italic;
}
.markdown-preview-view ul,
.markdown-preview-view ol {
margin: 0.5em 0;
padding-left: 1.5em;
}
.markdown-preview-view li {
margin: 0.2em 0;
}
.markdown-preview-view code {
font-family: monospace;
background: rgba(0,0,0,0.1);
padding: 0.2em 0.4em;
border-radius: 3px;
}
.markdown-preview-view blockquote {
border-left: 3px solid currentColor;
margin: 0.5em 0;
padding-left: 1em;
opacity: 0.8;
}