Commit 75e8e1f0 authored by Clark Lin's avatar Clark Lin
Browse files

optimized layout for TextToMermaid.

parent a1d0ba42
This diff is collapsed.
...@@ -15,12 +15,12 @@ ...@@ -15,12 +15,12 @@
"mermaid": "^11.9.0", "mermaid": "^11.9.0",
"svg2pdf.js": "^2.5.0", "svg2pdf.js": "^2.5.0",
"vite-plugin-vuetify": "^2.1.1", "vite-plugin-vuetify": "^2.1.1",
"vue": "^3.5.17", "vue": "^3.5.18",
"vue-router": "^4.5.1", "vue-router": "^4.5.1",
"vuetify": "^3.9.2" "vuetify": "^3.9.2"
}, },
"devDependencies": { "devDependencies": {
"@vitejs/plugin-vue": "^6.0.0", "@vitejs/plugin-vue": "^6.0.0",
"vite": "^7.0.4" "vite": "^7.0.6"
} }
} }
...@@ -21,7 +21,7 @@ import Sidebar from './components/Sidebar.vue' ...@@ -21,7 +21,7 @@ import Sidebar from './components/Sidebar.vue'
.main-content { .main-content {
flex: 1; flex: 1;
/* margin-left: 220px; */ /* margin-left: 220px; */
padding: 40px; padding: 0;
} }
* { * {
box-sizing: border-box; box-sizing: border-box;
......
<template> <template>
<div class="text-to-mermaid"> <!-- <div class="text-to-mermaid"> -->
<h1 class="page-title">Text to Mermaid Converter</h1> <v-container fluid class="text-to-mermaid">
<!-- <h1 class="page-title">Text to Mermaid Converter</h1> -->
<div class="converter-container"> <v-row>
<v-col cols="12">
<h1 class="text-h4 text-center font-weight-bold mx-3 my-3">Text to Mermaid Converter</h1>
</v-col>
</v-row>
<v-divider :thickness="1" color="white" class="border-opacity-100"></v-divider>
<!-- <div class="converter-container"> -->
<v-row class="mx-3 my-3">
<v-col cols="12" md="4" class="pa-3">
<!-- Input Section --> <!-- Input Section -->
<div class="input-section"> <div class="input-section">
<h3>Input Text</h3> <h3>Input Text</h3>
<textarea <v-textarea
v-model="inputText" v-model="inputText"
@input="handleInput" @input="handleInput"
placeholder="Enter your text here to convert to Mermaid diagram..." placeholder="Enter your text here to convert to Mermaid diagram..."
class="text-input" class="text-input"
rows="10" rows="10"
></textarea> ></v-textarea>
<div class="button-group"> <div class="button-group">
<button @click="convertNow" class="convert-btn" :disabled="isProcessing"> <button @click="convertNow" class="convert-btn" :disabled="isProcessing">
...@@ -29,7 +37,9 @@ ...@@ -29,7 +37,9 @@
<span v-else-if="currentState === 'error'">Error occurred</span> <span v-else-if="currentState === 'error'">Error occurred</span>
</div> </div>
</div> </div>
</v-col>
<v-col cols="12" md="8" class="pa-3">
<!-- Output Section --> <!-- Output Section -->
<div class="output-section"> <div class="output-section">
<h3>Mermaid Diagram</h3> <h3>Mermaid Diagram</h3>
...@@ -125,8 +135,11 @@ ...@@ -125,8 +135,11 @@
</div> </div>
</div> </div>
</div> </div>
</div> </v-col>
</div> <!-- </div> -->
</v-row>
<!-- </div> -->
</v-container>
</template> </template>
<script setup> <script setup>
...@@ -524,20 +537,21 @@ ...@@ -524,20 +537,21 @@
<style scoped> <style scoped>
.text-to-mermaid { .text-to-mermaid {
/* max-width: 2400px; */ /* max-width: 2400px; */
display: grid; /* display: grid;
grid-template-rows: 1fr; grid-template-rows: 1fr; */
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
margin: 10px; /* margin: 10px; */
padding: 0; padding: 0;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
height: 100%;
} }
.converter-container { /* .converter-container {
display: grid; display: grid;
grid-template-columns: 1fr 1.5fr; grid-template-columns: 1fr 1.5fr;
grid-template-rows: 1fr; grid-template-rows: 1fr;
gap: 40px; gap: 40px;
margin: 40px; margin: 40px;
} } */
.input-section, .output-section { .input-section, .output-section {
background: #f8f9fa; background: #f8f9fa;
padding: 20px; padding: 20px;
...@@ -1283,23 +1297,6 @@ ...@@ -1283,23 +1297,6 @@
background: #545b62; 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;
}
} */
.page-title { .page-title {
font-size: 2.4rem; /* Larger, more prominent */ font-size: 2.4rem; /* Larger, more prominent */
font-weight: 700; /* Bold */ font-weight: 700; /* Bold */
......
...@@ -60,6 +60,8 @@ button:focus-visible { ...@@ -60,6 +60,8 @@ button:focus-visible {
#app { #app {
/* max-width: 1280px; */ /* max-width: 1280px; */
width: 100%;
height: 100%;
margin: 0 auto; margin: 0 auto;
padding: 2rem; padding: 2rem;
text-align: center; text-align: center;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment