Skip to content

Commit 751154a

Browse files
feat: add basic text editor functionality to TerminalCanvas
- Introduced an "editor" mode to the TerminalCanvas component. - Implemented editor state management including cursor position, selection, and buffer. - Added commands for saving, quitting, and manipulating text (insert, delete, copy, cut, paste). - Enhanced keyboard navigation and command execution within the editor. - Updated rendering logic to display the editor interface with line numbers and status messages. - Refactored existing code for improved readability and maintainability.
1 parent ddbcf18 commit 751154a

File tree

3 files changed

+951
-111
lines changed

3 files changed

+951
-111
lines changed

src/app/globals.css

Lines changed: 75 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
--terminal-text: #f7c87a;
1313
--terminal-dim: #c89a58;
1414
--content-bg: #14110c;
15+
--content-bg-alt: #17130d;
16+
--reveal-bg: var(--hero-bg-deep);
1517
--content-ink: #f5e6cf;
1618
--content-muted: #c2a87f;
1719
--content-border: rgba(243, 161, 67, 0.2);
@@ -44,6 +46,8 @@
4446
--terminal-text: #e2a85b;
4547
--terminal-dim: #b87d3f;
4648
--content-bg: #f0e0c6;
49+
--content-bg-alt: #f7eed9;
50+
--reveal-bg: var(--hero-bg-mid);
4751
--content-ink: #2a1b0f;
4852
--content-muted: #8b6a46;
4953
--content-border: rgba(216, 131, 40, 0.35);
@@ -134,7 +138,7 @@ textarea {
134138
content: "";
135139
position: fixed;
136140
inset: 0;
137-
background: var(--content-bg);
141+
background: var(--reveal-bg);
138142
opacity: var(--content-reveal);
139143
pointer-events: none;
140144
z-index: 1;
@@ -1769,22 +1773,42 @@ textarea {
17691773
background:
17701774
radial-gradient(
17711775
circle at 10% 10%,
1772-
rgba(var(--hero-accent-rgb), 0.12),
1776+
var(--section-overlay-a, rgba(var(--hero-accent-rgb), 0.12)),
17731777
transparent 48%
17741778
),
17751779
radial-gradient(
17761780
circle at 90% 0%,
1777-
rgba(255, 211, 138, 0.08),
1781+
var(--section-overlay-b, rgba(255, 211, 138, 0.08)),
17781782
transparent 52%
17791783
),
1780-
linear-gradient(180deg, rgba(10, 8, 6, 0.6), transparent 40%),
1781-
var(--content-bg);
1784+
linear-gradient(
1785+
180deg,
1786+
var(--section-overlay-c, rgba(10, 8, 6, 0.6)),
1787+
transparent 40%
1788+
),
1789+
var(--section-bg, var(--content-bg));
1790+
}
1791+
1792+
.site-content > section.section {
1793+
--section-bg: var(--content-bg);
1794+
--section-overlay-a: rgba(var(--hero-accent-rgb), 0.12);
1795+
--section-overlay-b: rgba(255, 211, 138, 0.08);
1796+
--section-overlay-c: rgba(10, 8, 6, 0.6);
1797+
}
1798+
1799+
:root[data-theme="dark"] .site-content > section.section:nth-of-type(even),
1800+
:root[data-theme="light"] .site-content > section.section:nth-of-type(even) {
1801+
--section-bg: var(--content-bg-alt);
17821802
}
17831803

17841804
.section + .section {
17851805
border-top: 1px solid var(--content-border);
17861806
}
17871807

1808+
.site-content > #projects.section {
1809+
background: transparent;
1810+
}
1811+
17881812
.section-inner {
17891813
max-width: 1200px;
17901814
margin: 0 auto;
@@ -1876,7 +1900,7 @@ textarea {
18761900
}
18771901

18781902
.section-featured {
1879-
background: var(--content-bg);
1903+
background: var(--section-bg, var(--content-bg));
18801904
min-height: 0;
18811905
position: relative;
18821906
overflow-x: visible;
@@ -1885,12 +1909,6 @@ textarea {
18851909
padding-bottom: clamp(56px, 8vw, 96px);
18861910
}
18871911

1888-
.section-featured + .section,
1889-
.section-featured ~ .section,
1890-
.section-featured ~ .site-footer {
1891-
background: var(--content-bg);
1892-
}
1893-
18941912
.featured-layout {
18951913
display: grid;
18961914
grid-template-columns: minmax(260px, 1fr) minmax(0, 1.2fr);
@@ -2067,11 +2085,55 @@ textarea {
20672085
width: 100%;
20682086
}
20692087

2088+
@media (max-width: 768px) {
2089+
.featured-slider {
2090+
/* Mobilde kartları daha da incelt (daha dikey form) */
2091+
--featured-card-width: 72vw;
2092+
/* Kartların birbirine açıklığını ayarla */
2093+
--featured-offset-1: 65vw;
2094+
}
2095+
2096+
.featured-card {
2097+
/* Dikey oranı artır, daha modern mobil kart görünümü */
2098+
min-height: 520px;
2099+
padding: 28px 24px;
2100+
display: flex;
2101+
flex-direction: column;
2102+
justify-content: space-between;
2103+
}
2104+
2105+
/* Başlık fontunu biraz daha dengeli yap */
2106+
.featured-card h3 {
2107+
font-size: 20px;
2108+
margin-bottom: 8px;
2109+
}
2110+
2111+
.featured-summary {
2112+
/* Mobilde açıklamayı biraz kısalt */
2113+
-webkit-line-clamp: 5;
2114+
line-clamp: 5;
2115+
font-size: 14px;
2116+
}
2117+
2118+
.featured-links {
2119+
justify-content: space-between;
2120+
padding-top: 16px;
2121+
border-top: 1px dashed rgba(var(--hero-accent-rgb), 0.2);
2122+
}
2123+
2124+
/* Mobilde ortalamayı garantiye al */
2125+
.featured-track {
2126+
place-items: center;
2127+
justify-content: center;
2128+
}
2129+
}
2130+
20702131
.featured-controls {
20712132
display: flex;
20722133
align-items: center;
20732134
justify-content: center;
2074-
gap: 12px;
2135+
gap: 16px;
2136+
margin-top: 10px;
20752137
}
20762138

20772139
.featured-controls .featured-dots {

src/components/hero/HeroScene.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1968,10 +1968,9 @@ function SceneContent({
19681968
parallax.current.lerp(parallaxZeroRef.current, 0.12);
19691969
}
19701970
const rotY = allowParallax ? parallax.current.x * 0.18 * parallaxDamp : 0;
1971-
const rotZ =
1972-
allowParallax ? parallax.current.y * 0.14 * parallaxDamp : 0;
1971+
const rotX = allowParallax ? parallax.current.y * 0.14 * parallaxDamp : 0;
19731972
group.rotation.y = rotY;
1974-
group.rotation.z = -rotZ;
1973+
group.rotation.x = rotX;
19751974
}
19761975

19771976
const palette = bgPaletteRef.current;

0 commit comments

Comments
 (0)