Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Clark Lin
vue-utility
Commits
6d672f31
Commit
6d672f31
authored
Jul 29, 2025
by
Administrator
Browse files
Changed TextToMarkdown layout to same to TextToMermaid.
parent
1a530b08
Changes
1
Show whitespace changes
Inline
Side-by-side
src/components/TextToMarkdown.vue
View file @
6d672f31
...
@@ -52,33 +52,45 @@
...
@@ -52,33 +52,45 @@
<!-- Output Section -->
<!-- Output Section -->
<v-col
cols=
"12"
md=
"8"
class=
"pa-3"
>
<v-col
cols=
"12"
md=
"8"
class=
"pa-3"
>
<h3>
Markdown Preview
</h3>
<!-- Output Section -->
<div
elevation=
"2"
class=
"output-section"
>
<!--
<h3>
Markdown Preview
</h3>
-->
<v-card-title
class=
"text-h6 pa-0 ma-2"
>
Markdown Preview
</v-card-title>
<!-- Preview Section -->
<!-- Preview Section -->
<div
class=
"diagram-section"
>
<v-card-text
>
<div
class=
"diagram-header"
>
<div
class=
"diagram-header"
>
<h4>
Visual Preview:
</h4>
<!--
<h4>
Visual Preview:
</h4>
-->
<v-card-subtitle
class=
"text-subtitle-1 pa-0"
>
Visual Preview:
</v-card-subtitle>
<!-- Preview Controls -->
<!-- Preview Controls -->
<div
class=
"diagram-controls"
>
<div
class=
"diagram-controls"
>
<div
class=
"zoom-controls"
>
<div
class=
"zoom-controls"
>
<label
for=
"zoom-slider"
class=
"zoom-label"
>
Zoom:
</label>
<label
for=
"zoom-slider"
class=
"zoom-label"
>
Zoom:
</label>
<input
<v-slider
id=
"zoom-slider"
id=
"zoom-slider"
type=
"range"
v-model=
"zoomLevel"
v-model=
"zoomLevel"
@
input=
"updateZoom
"
:min=
"0.5
"
min=
"0.5"
:max=
"3"
max=
"3"
:step=
"0.1"
step=
"0.1"
hide-details
class=
"zoom-slider"
class=
"zoom-slider"
/>
/>
<span
class=
"zoom-level"
>
{{
Math
.
round
(
zoomLevel
*
100
)
}}
%
</span>
<span
class=
"zoom-level"
>
{{
Math
.
round
(
zoomLevel
*
100
)
}}
%
</span>
<button
@
click=
"resetZoom"
class=
"zoom-btn reset-btn"
>
Reset
</button>
<v-btn
@
click=
"resetZoom"
color=
"secondary"
variant=
"outlined"
>
Reset
</v-btn>
</div>
</div>
<button
@
click=
"toggleFullscreen"
class=
"fullscreen-btn"
v-if=
"markdownCode"
>
<v-btn
@
click=
"toggleFullscreen"
color=
"primary"
variant=
"flat"
v-if=
"markdownCode"
>
Fullscreen
Fullscreen
</butto
n>
</v-bt
n>
</div>
</div>
</div>
</div>
<div
class=
"markdown-container"
ref=
"markdownContainerWrapper"
>
<div
class=
"markdown-container"
ref=
"markdownContainerWrapper"
>
...
@@ -93,21 +105,7 @@
...
@@ -93,21 +105,7 @@
<p>
Your Markdown preview will appear here
</p>
<p>
Your Markdown preview will appear here
</p>
</div>
</div>
</div>
</div>
</div>
</v-card-text>
<!-- Generated Markdown Section -->
<div
class=
"code-section"
>
<div
class=
"diagram-header"
>
<h4>
Generated Markdown:
</h4>
<div
class=
"diagram-controls"
>
<button
@
click=
"copyToClipboard"
class=
"copy-btn"
:disabled=
"!markdownCode"
>
{{
copyButtonText
}}
</button>
</div>
</div>
<div
class=
"code-container"
>
<pre><code>
{{
markdownCode
||
'
Your generated markdown will appear here...
'
}}
</code></pre>
</div>
</div>
</div>
<!-- Fullscreen Modal -->
<!-- Fullscreen Modal -->
...
@@ -118,26 +116,41 @@
...
@@ -118,26 +116,41 @@
<div
class=
"modal-controls"
>
<div
class=
"modal-controls"
>
<div
class=
"zoom-controls"
>
<div
class=
"zoom-controls"
>
<label
for=
"fullscreen-zoom-slider"
class=
"zoom-label"
>
Zoom:
</label>
<label
for=
"fullscreen-zoom-slider"
class=
"zoom-label"
>
Zoom:
</label>
<
input
<
v-slider
id=
"fullscreen-zoom-slider"
id=
"fullscreen-zoom-slider"
type=
"range"
v-model=
"fullscreenZoomLevel"
v-model=
"fullscreenZoomLevel"
@
input=
"updateFullscreenZoom
"
:min=
"0.5
"
min=
"0.5"
:max=
"3"
max=
"3"
:step=
"0.1"
step=
"0.1"
hide-details
class=
"zoom-slider"
class=
"zoom-slider"
/>
/>
<span
class=
"zoom-level"
>
{{
Math
.
round
(
fullscreenZoomLevel
*
100
)
}}
%
</span>
<span
class=
"zoom-level"
>
{{
Math
.
round
(
fullscreenZoomLevel
*
100
)
}}
%
</span>
<button
@
click=
"resetFullscreenZoom"
class=
"zoom-btn reset-btn"
>
Reset
</button>
<v-btn
@
click=
"resetFullscreenZoom"
color=
"secondary"
variant=
"outlined"
>
Reset
</v-btn>
</div>
</div>
<!-- Single Download Button -->
<!-- Single Download Button -->
<button
@
click=
"downloadPreview"
class=
"download-btn"
v-if=
"markdownCode"
>
<v-btn
@
click=
"downloadPreview"
v-if=
"markdownCode"
color=
"primary"
variant=
"flat"
>
Download
Download
</
butto
n>
</
v-bt
n>
<button
@
click=
"closeFullscreen"
class=
"close-btn"
>
×
</button>
<v-btn
@
click=
"closeFullscreen"
icon
>
<v-icon>
mdi-close
</v-icon>
</v-btn>
</div>
</div>
</div>
</div>
<div
<div
...
@@ -170,8 +183,6 @@
...
@@ -170,8 +183,6 @@
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Generated Markdown Section -->
</v-col>
</v-col>
</v-row>
</v-row>
</v-container>
</v-container>
...
@@ -452,29 +463,17 @@ onUnmounted(() => {
...
@@ -452,29 +463,17 @@ onUnmounted(() => {
font-family
:
'Segoe UI'
,
Tahoma
,
Geneva
,
Verdana
,
sans-serif
;
font-family
:
'Segoe UI'
,
Tahoma
,
Geneva
,
Verdana
,
sans-serif
;
height
:
100%
;
height
:
100%
;
}
}
.converter-container
{
display
:
grid
;
grid-template-columns
:
1
fr
1.5
fr
;
grid-template-rows
:
1
fr
;
gap
:
40px
;
margin
:
40px
;
}
.input-section
,
.output-section
{
background
:
#f8f9fa
;
padding
:
20px
;
border-radius
:
8px
;
border
:
1px
solid
#e9ecef
;
}
.output-section
{
.output-section
{
/* background: #f8f9fa; */
background
:
#f8f9fa
;
padding
:
20px
;
border-radius
:
8px
;
border-radius
:
8px
;
border
:
1px
solid
#e9ecef
;
border
:
1px
solid
#e9ecef
;
max-width
:
100%
;
max-width
:
100%
;
}
}
.text-input
{
.text-input
{
width
:
100%
;
width
:
100%
;
max-width
:
100%
;
/* Increased maximum width */
max-width
:
100%
;
padding
:
12px
;
padding
:
12px
;
border
:
1px
solid
#ced4da
;
border
:
1px
solid
#ced4da
;
border-radius
:
4px
;
border-radius
:
4px
;
...
@@ -483,11 +482,13 @@ onUnmounted(() => {
...
@@ -483,11 +482,13 @@ onUnmounted(() => {
resize
:
vertical
;
resize
:
vertical
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.button-group
{
.button-group
{
margin-top
:
15px
;
margin-top
:
15px
;
display
:
flex
;
display
:
flex
;
gap
:
10px
;
gap
:
10px
;
}
}
.convert-btn
,
.clear-btn
{
.convert-btn
,
.clear-btn
{
padding
:
10px
20px
;
padding
:
10px
20px
;
border
:
none
;
border
:
none
;
...
@@ -496,85 +497,47 @@ onUnmounted(() => {
...
@@ -496,85 +497,47 @@ onUnmounted(() => {
font-weight
:
500
;
font-weight
:
500
;
transition
:
background-color
0.2s
;
transition
:
background-color
0.2s
;
}
}
.convert-btn
{
.convert-btn
{
background-color
:
#007bff
;
background-color
:
#007bff
;
color
:
white
;
color
:
white
;
}
}
.convert-btn
:disabled
{
.convert-btn
:disabled
{
background-color
:
#6c757d
;
background-color
:
#6c757d
;
cursor
:
not-allowed
;
cursor
:
not-allowed
;
}
}
.clear-btn
{
.clear-btn
{
background-color
:
#6c757d
;
background-color
:
#6c757d
;
color
:
white
;
color
:
white
;
}
}
.clear-btn
:hover
{
.clear-btn
:hover
{
background-color
:
#545b62
;
background-color
:
#545b62
;
}
}
.status
{
margin-top
:
10px
;
font-size
:
14px
;
padding
:
8px
12px
;
border-radius
:
4px
;
font-weight
:
500
;
display
:
inline-block
;
min-width
:
100px
;
text-align
:
center
;
}
.status.typing
{
background-color
:
#e2f0ff
;
color
:
#007bff
;
border
:
1px
solid
#b8daff
;
}
.status.processing
{
background-color
:
#fff3cd
;
color
:
#856404
;
border
:
1px
solid
#ffeaa7
;
}
.status.ready
{
background-color
:
#d4edda
;
color
:
#155724
;
border
:
1px
solid
#c3e6cb
;
}
.status.error
{
/* Diagram Section */
background-color
:
#f8d7da
;
color
:
#721c24
;
border
:
1px
solid
#f5c6cb
;
}
/* Diagram Section (now first) */
.diagram-section
{
.diagram-section
{
background
:
#f8f9fa
;
background
:
#f8f9fa
;
border-radius
:
8px
;
border-radius
:
8px
;
border
:
1px
solid
#e9ecef
;
border
:
1px
solid
#e9ecef
;
margin-bottom
:
20px
;
/* Add space between diagram and code */
margin-bottom
:
20px
;
}
}
/* Code Section
(now second)
*/
/* Code Section */
.code-section
{
.code-section
{
background
:
#f8f9fa
;
background
:
#f8f9fa
;
border-radius
:
8px
;
border-radius
:
8px
;
border
:
1px
solid
#e9ecef
;
border
:
1px
solid
#e9ecef
;
overflow
:
hidden
;
overflow
:
hidden
;
margin-bottom
:
0
;
/* No bottom margin since it's last */
margin-bottom
:
0
;
}
.code-section
h4
{
margin
:
0
;
padding
:
15px
20px
;
background
:
#e9ecef
;
color
:
#495057
;
border-bottom
:
1px
solid
#dee2e6
;
}
}
.code-container
{
.code-container
{
max-height
:
300px
;
/* Limit height */
max-height
:
300px
;
overflow-y
:
auto
;
/* Vertical scroll */
overflow-y
:
auto
;
overflow-x
:
auto
;
/* Horizontal scroll for long lines */
overflow-x
:
auto
;
padding
:
15px
20px
;
padding
:
15px
20px
;
}
}
...
@@ -592,7 +555,7 @@ onUnmounted(() => {
...
@@ -592,7 +555,7 @@ onUnmounted(() => {
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
align-items
:
center
;
align-items
:
center
;
padding
:
15px
32px
;
/* Increased right/left padding */
padding
:
15px
32px
;
background
:
#e9ecef
;
background
:
#e9ecef
;
border-bottom
:
1px
solid
#dee2e6
;
border-bottom
:
1px
solid
#dee2e6
;
max-width
:
100%
;
max-width
:
100%
;
...
@@ -610,8 +573,8 @@ onUnmounted(() => {
...
@@ -610,8 +573,8 @@ onUnmounted(() => {
align-items
:
center
;
align-items
:
center
;
gap
:
15px
;
gap
:
15px
;
flex-shrink
:
0
;
flex-shrink
:
0
;
min-width
:
320px
;
/* Ensure enough width for controls */
min-width
:
320px
;
flex-wrap
:
nowrap
;
/* Prevent wrapping */
flex-wrap
:
nowrap
;
max-width
:
100%
;
max-width
:
100%
;
overflow-x
:
auto
;
overflow-x
:
auto
;
}
}
...
@@ -630,64 +593,9 @@ onUnmounted(() => {
...
@@ -630,64 +593,9 @@ onUnmounted(() => {
white-space
:
nowrap
;
white-space
:
nowrap
;
}
}
/* Optimized slider styling - only width for Vuetify sliders */
.zoom-slider
{
.zoom-slider
{
width
:
100px
;
width
:
100px
;
height
:
8px
;
/* Slightly taller */
border-radius
:
4px
;
background
:
#dee2e6
;
/* Darker background */
outline
:
none
;
-webkit-appearance
:
none
;
appearance
:
none
;
cursor
:
pointer
;
border
:
1px
solid
#adb5bd
;
/* Darker border */
}
/* Webkit browsers (Chrome, Safari, Edge) */
.zoom-slider
::-webkit-slider-thumb
{
-webkit-appearance
:
none
;
appearance
:
none
;
width
:
18px
;
height
:
18px
;
border-radius
:
50%
;
background
:
#007bff
;
cursor
:
pointer
;
border
:
2px
solid
white
;
box-shadow
:
0
2px
4px
rgba
(
0
,
0
,
0
,
0.2
);
transition
:
background-color
0.2s
;
}
.zoom-slider
::-webkit-slider-thumb:hover
{
background
:
#0056b3
;
}
.zoom-slider
::-webkit-slider-track
{
height
:
8px
;
border-radius
:
4px
;
background
:
#dee2e6
;
border
:
1px
solid
#adb5bd
;
}
/* Firefox */
.zoom-slider
::-moz-range-thumb
{
width
:
18px
;
height
:
18px
;
border-radius
:
50%
;
background
:
#007bff
;
cursor
:
pointer
;
border
:
2px
solid
white
;
box-shadow
:
0
2px
4px
rgba
(
0
,
0
,
0
,
0.2
);
transition
:
background-color
0.2s
;
}
.zoom-slider
::-moz-range-thumb:hover
{
background
:
#0056b3
;
}
.zoom-slider
::-moz-range-track
{
height
:
8px
;
border-radius
:
4px
;
background
:
#dee2e6
;
border
:
1px
solid
#adb5bd
;
}
}
.zoom-level
{
.zoom-level
{
...
@@ -698,65 +606,6 @@ onUnmounted(() => {
...
@@ -698,65 +606,6 @@ onUnmounted(() => {
font-size
:
14px
;
font-size
:
14px
;
}
}
.reset-btn
{
padding
:
6px
12px
;
background
:
#6c757d
;
color
:
white
;
border
:
none
;
border-radius
:
4px
;
cursor
:
pointer
;
font-size
:
12px
;
transition
:
background-color
0.2s
;
}
.reset-btn
:hover
{
background
:
#545b62
;
}
.fullscreen-btn
{
padding
:
8px
16px
;
background
:
#28a745
;
color
:
white
;
border
:
none
;
border-radius
:
4px
;
cursor
:
pointer
;
font-size
:
14px
;
transition
:
background-color
0.2s
;
}
.fullscreen-btn
:hover
{
background
:
#218838
;
}
.fullscreen-btn
:disabled
{
opacity
:
0.5
;
cursor
:
not-allowed
;
}
/* Update mermaid container for zoom */
.markdown-container
{
min-height
:
100px
;
/* Very small minimum */
height
:
auto
;
/* Let content determine height */
max-height
:
400px
;
/* Still limit maximum */
padding
:
15px
;
/* Reduce padding */
background
:
white
;
overflow
:
auto
;
position
:
relative
;
}
/* Target journey diagrams specifically */
.markdown-container
:has
(
svg
[
data-diagram-type
=
"journey"
])
{
max-height
:
350px
;
/* Smaller max for journey diagrams */
}
.markdown-preview
{
text-align
:
left
;
width
:
100%
;
max-width
:
100%
;
transform-origin
:
top
center
;
transition
:
transform
0.2s
ease
;
}
/* Custom scrollbar for code container */
/* Custom scrollbar for code container */
.code-container
::-webkit-scrollbar
{
.code-container
::-webkit-scrollbar
{
width
:
8px
;
width
:
8px
;
...
@@ -776,6 +625,7 @@ onUnmounted(() => {
...
@@ -776,6 +625,7 @@ onUnmounted(() => {
.code-container
::-webkit-scrollbar-thumb:hover
{
.code-container
::-webkit-scrollbar-thumb:hover
{
background
:
#a8a8a8
;
background
:
#a8a8a8
;
}
}
.placeholder
{
.placeholder
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
@@ -784,6 +634,26 @@ onUnmounted(() => {
...
@@ -784,6 +634,26 @@ onUnmounted(() => {
color
:
#6c757d
;
color
:
#6c757d
;
font-style
:
italic
;
font-style
:
italic
;
}
}
/* Markdown container */
.markdown-container
{
min-height
:
100px
;
height
:
auto
;
max-height
:
400px
;
padding
:
15px
;
background
:
white
;
overflow
:
auto
;
position
:
relative
;
}
.markdown-preview
{
text-align
:
left
;
width
:
100%
;
max-width
:
100%
;
transform-origin
:
top
center
;
transition
:
transform
0.2s
ease
;
}
/* Fullscreen Modal */
/* Fullscreen Modal */
.fullscreen-modal
{
.fullscreen-modal
{
position
:
fixed
;
position
:
fixed
;
...
@@ -815,8 +685,8 @@ onUnmounted(() => {
...
@@ -815,8 +685,8 @@ onUnmounted(() => {
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
gap
:
20px
;
gap
:
20px
;
flex
:
1
;
/* Take available space */
flex
:
1
;
justify-content
:
flex-end
;
/* Align to the right */
justify-content
:
flex-end
;
}
}
.modal-header
{
.modal-header
{
...
@@ -832,75 +702,50 @@ onUnmounted(() => {
...
@@ -832,75 +702,50 @@ onUnmounted(() => {
.modal-header
h3
{
.modal-header
h3
{
margin
:
0
;
margin
:
0
;
color
:
#495057
;
color
:
#495057
;
flex-shrink
:
0
;
/* Prevent title from shrinking */
flex-shrink
:
0
;
}
}
.modal-header
.zoom-controls
{
.modal-header
.zoom-controls
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
gap
:
10px
;
gap
:
10px
;
flex-shrink
:
0
;
/* Prevent zoom controls from shrinking */
flex-shrink
:
0
;
}
/* Update close button positioning */
.close-btn
{
background
:
#dc3545
;
border
:
none
;
font-size
:
18px
;
cursor
:
pointer
;
color
:
white
;
padding
:
8px
12px
;
width
:
auto
;
height
:
auto
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
border-radius
:
4px
;
transition
:
background-color
0.2s
;
position
:
static
;
/* Remove absolute positioning */
top
:
auto
;
right
:
auto
;
z-index
:
auto
;
font-weight
:
bold
;
flex-shrink
:
0
;
/* Prevent close button from shrinking */
}
}
.close-btn
:hover
{
/* Optimized fullscreen slider styling - only width for Vuetify sliders */
background
:
#c82333
;
.modal-header
.zoom-slider
{
color
:
white
;
width
:
120px
;
}
}
/* Ensure proper spacing */
.modal-header
.zoom-label
{
.modal-header
.reset-btn
{
font-size
:
14px
;
padding
:
6px
12px
;
color
:
#495057
;
background
:
#6c757d
;
font-weight
:
500
;
color
:
white
;
white-space
:
nowrap
;
border
:
none
;
border-radius
:
4px
;
cursor
:
pointer
;
font-size
:
12px
;
transition
:
background-color
0.2s
;
margin-right
:
10px
;
/* Add space between reset and close */
}
}
.modal-header
.reset-btn
:hover
{
.modal-header
.zoom-level
{
background
:
#545b62
;
min-width
:
50px
;
text-align
:
center
;
font-weight
:
500
;
color
:
#495057
;
font-size
:
14px
;
}
}
/* Modal body for drag */
/* Modal body for drag */
.modal-body
{
.modal-body
{
flex
:
1
;
flex
:
1
;
padding
:
20px
;
padding
:
20px
;
overflow
:
hidden
;
/* Hide overflow for drag */
overflow
:
hidden
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
position
:
relative
;
position
:
relative
;
user-select
:
none
;
/* Prevent text selection during drag */
user-select
:
none
;
will-change
:
transform
;
will-change
:
transform
;
}
}
/*
Optimize fullscreen diagram for smooth zoom
*/
/*
Fullscreen preview
*/
.fullscreen-preview
{
.fullscreen-preview
{
text-align
:
left
;
text-align
:
left
;
width
:
100%
;
width
:
100%
;
...
@@ -919,342 +764,12 @@ onUnmounted(() => {
...
@@ -919,342 +764,12 @@ onUnmounted(() => {
.fullscreen-preview-inner
{
.fullscreen-preview-inner
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
/* The transform is applied here via :style binding */
}
}
.fullscreen-preview
:active
{
.fullscreen-preview
:active
{
cursor
:
grabbing
;
cursor
:
grabbing
;
}
}
.fullscreen-preview
svg
{
max-width
:
100%
;
max-height
:
100%
;
width
:
auto
;
height
:
auto
;
pointer-events
:
none
;
will-change
:
transform
;
}
/* Add visual feedback for drag state */
.modal-body.dragging
{
cursor
:
grabbing
;
}
/* Optional: Add drag instructions */
.modal-header
::after
{
content
:
"Drag to pan • Scroll to zoom • Ctrl+Scroll for fine zoom"
;
font-size
:
12px
;
color
:
#6c757d
;
margin-left
:
20px
;
font-style
:
italic
;
}
/* Modal Controls Layout */
.modal-header
.zoom-label
{
font-size
:
14px
;
color
:
#495057
;
font-weight
:
500
;
white-space
:
nowrap
;
}
.modal-header
.zoom-slider
{
width
:
120px
;
/* Slightly wider for fullscreen */
height
:
8px
;
border-radius
:
4px
;
background
:
#dee2e6
;
outline
:
none
;
-webkit-appearance
:
none
;
appearance
:
none
;
cursor
:
pointer
;
border
:
1px
solid
#adb5bd
;
}
/* Apply the same slider styling for fullscreen */
.modal-header
.zoom-slider
::-webkit-slider-thumb
{
-webkit-appearance
:
none
;
appearance
:
none
;
width
:
18px
;
height
:
18px
;
border-radius
:
50%
;
background
:
#007bff
;
cursor
:
pointer
;
border
:
2px
solid
white
;
box-shadow
:
0
2px
4px
rgba
(
0
,
0
,
0
,
0.2
);
transition
:
background-color
0.2s
;
}
.modal-header
.zoom-slider
::-webkit-slider-thumb:hover
{
background
:
#0056b3
;
}
.modal-header
.zoom-slider
::-webkit-slider-track
{
height
:
8px
;
border-radius
:
4px
;
background
:
#dee2e6
;
border
:
1px
solid
#adb5bd
;
}
.modal-header
.zoom-slider
::-moz-range-thumb
{
width
:
18px
;
height
:
18px
;
border-radius
:
50%
;
background
:
#007bff
;
cursor
:
pointer
;
border
:
2px
solid
white
;
box-shadow
:
0
2px
4px
rgba
(
0
,
0
,
0
,
0.2
);
transition
:
background-color
0.2s
;
}
.modal-header
.zoom-slider
::-moz-range-thumb:hover
{
background
:
#0056b3
;
}
.modal-header
.zoom-slider
::-moz-range-track
{
height
:
8px
;
border-radius
:
4px
;
background
:
#dee2e6
;
border
:
1px
solid
#adb5bd
;
}
.modal-header
.zoom-level
{
min-width
:
50px
;
text-align
:
center
;
font-weight
:
500
;
color
:
#495057
;
font-size
:
14px
;
}
.modal-header
.reset-btn
{
padding
:
6px
12px
;
background
:
#6c757d
;
color
:
white
;
border
:
none
;
border-radius
:
4px
;
cursor
:
pointer
;
font-size
:
12px
;
transition
:
background-color
0.2s
;
}
.modal-header
.reset-btn
:hover
{
background
:
#545b62
;
}
/* Keyboard shortcut hint */
.modal-header
::after
{
display
:
none
;
}
/* Add smooth zoom transitions */
.fullscreen-preview
{
text-align
:
left
;
width
:
100%
;
height
:
100%
;
display
:
flex
;
align-items
:
flex-start
;
justify-content
:
flex-start
;
transform-origin
:
center
center
;
transition
:
transform
0.1s
ease
;
/* Smooth zoom and drag */
cursor
:
grab
;
user-select
:
none
;
}
/* Optional: Add zoom indicator */
.modal-body
::before
{
content
:
attr
(
data-zoom
);
position
:
absolute
;
top
:
10px
;
left
:
10px
;
background
:
rgba
(
0
,
0
,
0
,
0.7
);
color
:
white
;
padding
:
5px
10px
;
border-radius
:
4px
;
font-size
:
12px
;
pointer-events
:
none
;
opacity
:
0
;
transition
:
opacity
0.3s
;
}
.modal-body.zooming
::before
{
opacity
:
1
;
}
/* Zoom indicator styles */
.zoom-indicator
{
position
:
absolute
;
background
:
rgba
(
0
,
0
,
0
,
0.8
);
color
:
white
;
padding
:
5px
10px
;
border-radius
:
4px
;
font-size
:
12px
;
pointer-events
:
none
;
z-index
:
1000
;
transition
:
opacity
0.3s
;
opacity
:
0
;
}
/* Download button in fullscreen - same size as reset button */
.modal-header
.download-btn
{
padding
:
6px
12px
;
background
:
#007bff
;
color
:
white
;
border
:
none
;
border-radius
:
4px
;
cursor
:
pointer
;
font-size
:
12px
;
transition
:
background-color
0.2s
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
width
:
auto
;
height
:
auto
;
font-weight
:
bold
;
flex-shrink
:
0
;
/* Ensure same dimensions as reset button */
min-width
:
80px
;
/* Slightly wider for "Download" text */
min-height
:
32px
;
position
:
relative
;
/* For dropdown positioning */
}
.modal-header
.download-btn
:hover
{
background
:
#5a6268
;
}
/* Button group for consistent sizing */
.modal-header
.button-group
{
display
:
flex
;
align-items
:
center
;
gap
:
10px
;
flex-shrink
:
0
;
}
.modal-header
.button-group
.download-btn
,
.modal-header
.button-group
.reset-btn
{
padding
:
6px
12px
;
background
:
#6c757d
;
color
:
white
;
border
:
none
;
border-radius
:
4px
;
cursor
:
pointer
;
font-size
:
12px
;
transition
:
background-color
0.2s
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
width
:
60px
;
height
:
32px
;
font-weight
:
bold
;
flex-shrink
:
0
;
}
.modal-header
.button-group
.download-btn
:hover
,
.modal-header
.button-group
.reset-btn
:hover
{
background
:
#5a6268
;
}
/* Ensure reset button has same dimensions for consistency */
.modal-header
.reset-btn
{
padding
:
6px
12px
;
background
:
#6c757d
;
color
:
white
;
border
:
none
;
border-radius
:
4px
;
cursor
:
pointer
;
font-size
:
12px
;
transition
:
background-color
0.2s
;
min-width
:
60px
;
min-height
:
32px
;
font-weight
:
bold
;
flex-shrink
:
0
;
}
.modal-header
.reset-btn
:hover
{
background
:
#545b62
;
}
/* Fullscreen button in normal window - same size as reset button */
.fullscreen-btn
{
padding
:
6px
12px
;
background
:
#007bff
;
color
:
white
;
border
:
none
;
border-radius
:
4px
;
cursor
:
pointer
;
font-size
:
12px
;
transition
:
background-color
0.2s
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
width
:
auto
;
height
:
auto
;
font-weight
:
bold
;
flex-shrink
:
0
;
/* Ensure same dimensions as reset button */
min-width
:
80px
;
/* Slightly wider for "Fullscreen" text */
min-height
:
32px
;
}
.fullscreen-btn
:hover
{
background
:
#0056b3
;
}
/* Ensure reset button in normal window has consistent styling */
.reset-btn
{
padding
:
6px
12px
;
background
:
#6c757d
;
color
:
white
;
border
:
none
;
border-radius
:
4px
;
cursor
:
pointer
;
font-size
:
12px
;
transition
:
background-color
0.2s
;
min-width
:
60px
;
min-height
:
32px
;
font-weight
:
bold
;
flex-shrink
:
0
;
}
.reset-btn
:hover
{
background
:
#545b62
;
}
/* Ensure zoom controls have consistent button styling */
.zoom-controls
.zoom-btn
{
padding
:
6px
12px
;
background
:
#6c757d
;
color
:
white
;
border
:
none
;
border-radius
:
4px
;
cursor
:
pointer
;
font-size
:
12px
;
transition
:
background-color
0.2s
;
min-width
:
60px
;
min-height
:
32px
;
font-weight
:
bold
;
flex-shrink
:
0
;
}
.zoom-controls
.zoom-btn
:hover
{
background
:
#545b62
;
}
/* @media (max-width: 768px) {
.converter-container {
grid-template-columns: 1fr;
}
.button-group {
flex-direction: column;
}
}
@media (min-width: 1920px) {
.text-to-mermaid {
max-width: 2800px;
}
.converter-container {
gap: 80px;
}
} */
/* Markdown content styles */
/* Markdown content styles */
.markdown-preview
,
.markdown-preview
,
.fullscreen-preview
{
.fullscreen-preview
{
...
@@ -1370,14 +885,6 @@ onUnmounted(() => {
...
@@ -1370,14 +885,6 @@ onUnmounted(() => {
padding-left
:
1.5em
;
padding-left
:
1.5em
;
}
}
.markdown-preview
ul
,
.fullscreen-preview-inner
ul
,
.markdown-preview
ol
,
.fullscreen-preview-inner
ol
{
margin-left
:
1.5em
;
list-style-position
:
inside
;
}
.markdown-preview
pre
,
.markdown-preview
pre
,
.fullscreen-preview-inner
pre
{
.fullscreen-preview-inner
pre
{
background
:
#f4f4f4
;
background
:
#f4f4f4
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment