Commit 3f1a277c authored by Administrator's avatar Administrator
Browse files

added navigation bar; layout to be further refined.

parent c945649a
......@@ -5,6 +5,7 @@
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Vue</title>
<link href="https://cdn.jsdelivr.net/npm/@mdi/font/css/materialdesignicons.min.css" rel="stylesheet">
</head>
<body>
<div id="app"></div>
......
This diff is collapsed.
......@@ -9,11 +9,14 @@
"preview": "vite preview"
},
"dependencies": {
"@mdi/font": "^7.4.47",
"jspdf": "^3.0.1",
"mermaid": "^11.9.0",
"svg2pdf.js": "^2.5.0",
"vite-plugin-vuetify": "^2.1.1",
"vue": "^3.5.17",
"vue-router": "^4.5.1"
"vue-router": "^4.5.1",
"vuetify": "^3.9.0-beta.1"
},
"devDependencies": {
"@vitejs/plugin-vue": "^6.0.0",
......
......@@ -3,12 +3,12 @@ import Sidebar from './components/Sidebar.vue'
</script>
<template>
<div id="app">
<v-app>
<Sidebar />
<div class="main-content">
<v-main>
<router-view />
</div>
</div>
</v-main>
</v-app>
</template>
<style>
......@@ -21,7 +21,7 @@ import Sidebar from './components/Sidebar.vue'
.main-content {
flex: 1;
/* margin-left: 220px; */
padding: 20px;
padding: 40px;
}
* {
box-sizing: border-box;
......
<template>
<nav :class="['sidebar', { collapsed }]">
<div class="sidebar-header">
<span class="logo">🛠️</span>
<span v-if="!collapsed" class="title">Utilities</span>
<button class="toggle-btn" @click="collapsed = !collapsed" :aria-label="collapsed ? 'Expand sidebar' : 'Collapse sidebar'">
<span v-if="collapsed"></span>
<span v-else></span>
</button>
</div>
<ul>
<li>
<router-link to="/text-to-mermaid" active-class="active-link">
<span class="nav-icon">TM</span>
<span v-if="!collapsed">Text to Mermaid</span>
</router-link>
</li>
<li>
<router-link to="/text-to-markdown" active-class="active-link">
<span class="nav-icon">MD</span>
<span v-if="!collapsed">Text to Markdown</span>
</router-link>
</li>
</ul>
</nav>
<v-app-bar>
<v-app-bar-nav-icon @click="drawerActive = !drawerActive"></v-app-bar-nav-icon>
</v-app-bar>
<v-navigation-drawer v-model="drawerActive" app width="250">
<v-list-item title="Vue Utilities" subtitle="powered by vuetify"></v-list-item>
<v-divider></v-divider>
<v-list>
<!-- Navigation Links -->
<v-list-item
to="/text-to-mermaid"
router
exact
active-class="v-list-item--active"
prepend-icon="mdi-chart-bar"
>
<v-list-item-title>Text to Mermaid</v-list-item-title>
</v-list-item>
<v-list-item
to="/text-to-markdown"
router
exact
active-class="v-list-item--active"
prepend-icon="mdi-language-markdown-outline"
>
<v-list-item-title>Text to Markdown</v-list-item-title>
</v-list-item>
</v-list>
</v-navigation-drawer>
</template>
<script setup>
import { ref } from 'vue'
const collapsed = ref(false)
const drawerActive = ref(true)
</script>
<style scoped>
.sidebar {
width: 220px;
min-width: 220px;
min-height: 100vh;
background: #fff;
box-shadow: 2px 0 8px rgba(0,0,0,0.04);
padding: 0;
position: fixed;
top: 0;
left: 0;
display: flex;
flex-direction: column;
transition: width 0.2s cubic-bezier(.4,2,.6,1), min-width 0.2s cubic-bezier(.4,2,.6,1);
z-index: 10;
}
.sidebar.collapsed {
width: 60px;
min-width: 60px;
}
.sidebar-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1.5em 1em 1em 1em;
border-bottom: 1px solid #eee;
}
.logo {
font-size: 1.6em;
margin-right: 0.5em;
}
.title {
font-weight: bold;
font-size: 1.1em;
letter-spacing: 1px;
}
.toggle-btn {
background: none;
border: none;
font-size: 1.2em;
cursor: pointer;
outline: none;
margin-left: 0.5em;
color: #764ba2;
transition: color 0.2s;
}
.toggle-btn:hover {
color: #667eea;
}
ul {
list-style: none;
padding: 1.5em 0 0 0;
margin: 0;
flex: 1;
}
li {
margin-bottom: 1.5em;
display: flex;
align-items: center;
justify-content: flex-start;
}
.router-link-exact-active,
.active-link {
font-weight: bold;
color: #667eea;
text-decoration: underline;
}
.router-link-exact-active .nav-icon,
.active-link .nav-icon {
color: #667eea;
}
.router-link {
display: flex;
align-items: center;
padding: 0.7em 1.2em;
border-radius: 8px;
color: #333;
text-decoration: none;
transition: background 0.2s, color 0.2s;
}
.router-link:hover {
background: #f0f4ff;
color: #764ba2;
}
.nav-icon {
font-size: 1.2em;
margin-right: 1em;
transition: margin 0.2s;
font-family: monospace;
font-weight: bold;
}
.sidebar.collapsed .nav-icon {
margin-right: 0;
display: flex;
justify-content: center;
width: 100%;
}
.sidebar.collapsed .title,
.sidebar.collapsed .router-link span:not(.nav-icon) {
display: none;
}
</style>
\ No newline at end of file
/* No custom styles yet */
</style>
\ No newline at end of file
<template>
<div class="text-to-mermaid">
<h1>Text to Mermaid Converter</h1>
<h1 class="page-title">Text to Mermaid Converter</h1>
<div class="converter-container">
<!-- Input Section -->
......@@ -537,6 +537,7 @@
/* justify-content: start; */
/* max-width: 1200px; */
/* margin-left: 0; */
margin-top: 24px;
}
.input-section, .output-section {
background: #f8f9fa;
......@@ -849,7 +850,7 @@
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
z-index: 2000;
backdrop-filter: blur(5px);
}
......@@ -1302,4 +1303,17 @@
gap: 80px;
}
} */
.page-title {
margin-bottom: 32px; /* Adds space below the heading */
font-size: 2.4rem; /* Larger, more prominent */
font-weight: 700; /* Bold */
letter-spacing: 1px;
text-align: center;
line-height: 1.2;
/* Optional: add a subtle shadow for depth */
text-shadow: 0 2px 8px rgba(76, 110, 245, 0.08);
/* Optional: add a divider line below */
border-bottom: 1px solid black;
padding-bottom: 12px;
}
</style>
\ No newline at end of file
......@@ -3,4 +3,18 @@ import './style.css'
import App from './App.vue'
import router from './router'
createApp(App).use(router).mount('#app')
// Add these Vuetify imports:
import 'vuetify/styles'
import { createVuetify } from 'vuetify'
import * as components from 'vuetify/components'
import * as directives from 'vuetify/directives'
const vuetify = createVuetify({
components,
directives,
})
const app = createApp(App)
app.use(router)
app.use(vuetify) // <-- This line is required!
app.mount('#app')
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