Skip to content

Commit 754054c

Browse files
committed
feat(content): enhance terminal UI with icon and styling
- Add IconTerminal import and include it in the terminal button - Improve terminal styling with better background colors and layout - Restructure terminal content with proper spacing and alignment
1 parent d1138fa commit 754054c

File tree

1 file changed

+24
-14
lines changed

1 file changed

+24
-14
lines changed

src/pages/content/[slug].astro

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { CodeEditor } from "@components/shared/editor/CodeEditor"
33
import Section from "@components/shared/sections/Section.astro"
44
import NavButtons from "@features/content/components/NavButtons.astro"
55
import LayoutContent from "@layouts/LayoutContent.astro"
6-
import { IconFile, IconGripVertical, IconPlayerPlay } from "@tabler/icons-react"
6+
import { IconFile, IconGripVertical, IconPlayerPlay, IconTerminal } from "@tabler/icons-react"
77
import { content } from "@utils/lib/content.config"
88
99
export function getStaticPaths() {
@@ -28,7 +28,10 @@ export function getStaticPaths() {
2828
---
2929

3030
<LayoutContent>
31-
<div id="main-container" class="flex flex-col gap-2 lg:gap-0 lg:flex-row mx-2 max-h-[calc(100vh-75px)] mt-0">
31+
<div
32+
id="main-container"
33+
class="flex flex-col gap-2 lg:gap-0 lg:flex-row mx-2 max-h-[calc(100vh-75px)] mt-0"
34+
>
3235
<!-- Panel izquierdo: Contenido -->
3336
<Section
3437
id="left-pane"
@@ -42,10 +45,7 @@ export function getStaticPaths() {
4245
</article>
4346
</article>
4447
<div class="flex justify-center p-3 mt-auto">
45-
<NavButtons
46-
previousPath={Astro.props.previousPath}
47-
nextPath={Astro.props.nextPath}
48-
/>
48+
<NavButtons previousPath={Astro.props.previousPath} nextPath={Astro.props.nextPath} />
4949
</div>
5050
</Section>
5151

@@ -80,20 +80,31 @@ export function getStaticPaths() {
8080

8181
<!-- Contenido -->
8282
<div class="flex flex-col flex-1 overflow-hidden">
83-
<CodeEditor client:load/>
83+
<CodeEditor client:load />
8484
<div
8585
id="horizontal-resizer"
8686
class="h-2 transition-all flex justify-center items-center cursor-row-resize bg-[#181817]"
8787
>
88-
<div class="h-0.5 w-4 bg-neutral-500/40 rounded-md"></div>
88+
<div class="h-0.5 w-4 bg-neutral-500/40 rounded-md"></div>
8989
</div>
90-
90+
9191
<div
9292
id="terminal"
93-
class="h-40 overflow-auto bg-editor-bg border-t rounded-b-2xl border-stroke-color p-2 text-sm font-mono relative"
93+
class="h-40 overflow-auto bg-editor-bg border-t border-stroke-color rounded-b-2xl text-sm font-mono bg-dark-fg"
9494
>
95-
96-
<span class="text-yellow">$ <span class="text-fg">cargo</span> run</span>
95+
<div class="flex items-center gap- border-b border-stroke-color bg-light-bg px-3 py-2">
96+
<button
97+
class="flex items-center gap-2 px-3 rounded-sm text-fg font-medium shadow-inner hover:bg-neutral-600/90 transition-colors"
98+
>
99+
<IconTerminal size={18} />
100+
<span>Terminal</span>
101+
</button>
102+
</div>
103+
104+
<div class="flex items-start p-3 text-fg">
105+
<span class="text-yellow">$&nbsp;</span>
106+
<span class="text-fg">cargo run</span>
107+
</div>
97108
</div>
98109
</div>
99110
</Section>
@@ -119,7 +130,6 @@ export function getStaticPaths() {
119130
}
120131
window.addEventListener('resize', resetLayoutOnResize)
121132

122-
123133
// 🔹 Separador vertical (desktop)
124134
verticalResizer?.addEventListener('mousedown', e => {
125135
if (window.innerWidth < 1024) return // no en móvil
@@ -195,4 +205,4 @@ export function getStaticPaths() {
195205
window.addEventListener('mousemove', onMouseMove)
196206
window.addEventListener('mouseup', onMouseUp)
197207
})
198-
</script>
208+
</script>

0 commit comments

Comments
 (0)