Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap" rel="stylesheet">
<title>CleanType - Modern Text Editor</title>

<!-- Favicons -->
Expand Down
12 changes: 11 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"date-fns": "^4.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hot-toast": "^2.4.1"
"react-hot-toast": "^2.4.1",
"react-icons": "^5.5.0"
},
"devDependencies": {
"@tauri-apps/cli": "^1.6.3",
Expand Down
44 changes: 22 additions & 22 deletions src/App.module.css
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
.app {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
.container {
min-height: 100vh;
width: 100%;
background: var(--bg-primary);
color: var(--color-primary);
transition: var(--transition-base);
display: flex;
flex-direction: column;
overflow: hidden;
transition: all 0.15s ease;
}

.darkTheme {
background-color: #1a1a1a;
color: rgba(255, 255, 255, 0.9);
--bg-color: #1a1a1a;
--text-color: rgba(255, 255, 255, 0.9);
--nav-bg: rgba(0, 0, 0, 0.85);
--border-color: rgba(255, 255, 255, 0.1);
.nav {
position: sticky;
top: 0;
z-index: 10;
background: var(--nav-bg);
backdrop-filter: blur(8px);
border-bottom: 1px solid var(--border-color);
padding: var(--spacing-md);
}

.lightTheme {
background-color: rgb(255, 252, 242);
color: rgba(0, 0, 0, 0.9);
--bg-color: rgb(255, 252, 242);
--text-color: rgba(0, 0, 0, 0.9);
--nav-bg: rgba(255, 252, 242, 0.95);
--border-color: rgba(0, 0, 0, 0.1);
.main {
flex: 1;
padding: var(--spacing-lg);
max-width: 1200px;
margin: 0 auto;
width: 100%;
}

/* Remove theme-specific classes as we're using data-theme now */

/* Mobile styles */
@media (max-width: 768px) {
.app {
Expand Down
4 changes: 3 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { FullscreenEditor } from "./components/FullscreenEditor";
import { ErrorBoundary } from "./components/ErrorBoundary";
import KeyboardShortcuts from './components/KeyboardShortcuts';
import styles from './App.module.css';
import './styles/theme.css';

function App() {
const [isDarkTheme, setIsDarkTheme] = useState(() => {
Expand All @@ -15,6 +16,7 @@ function App() {
// Save theme changes to localStorage
useEffect(() => {
localStorage.setItem('cleantype-theme', isDarkTheme ? 'dark' : 'light');
document.documentElement.setAttribute('data-theme', isDarkTheme ? 'dark' : 'light');
}, [isDarkTheme]);

useEffect(() => {
Expand All @@ -31,7 +33,7 @@ function App() {

return (
<ErrorBoundary>
<div className={`${styles.app} ${isDarkTheme ? styles.darkTheme : styles.lightTheme}`}>
<div className={styles.app}>
<FullscreenEditor
isDarkTheme={isDarkTheme}
onThemeToggle={() => setIsDarkTheme(prev => !prev)}
Expand Down
44 changes: 21 additions & 23 deletions src/components/ConfirmDialog.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,67 +39,65 @@
.actions {
display: flex;
justify-content: flex-end;
gap: 12px;
gap: 16px;
margin-top: 24px;
}

.cancelButton,
.confirmButton {
all: unset;
cursor: pointer;
background: transparent;
border: none;
padding: 8px 16px;
border-radius: 6px;
cursor: pointer;
font-size: 14px;
font-weight: 500;
transition: all 0.2s ease;
}

.cancelButton {
background: rgba(255, 255, 255, 0.1);
color: rgba(255, 255, 255, 0.8);
color: rgba(255, 255, 255, 0.6);
}

.cancelButton:hover {
background: rgba(255, 255, 255, 0.15);
color: rgba(255, 255, 255, 0.9);
}

.confirmButton {
background: rgba(255, 59, 48, 0.15);
color: #ff3b30;
color: rgba(255, 59, 48, 0.8);
}

.confirmButton:hover {
background: rgba(255, 59, 48, 0.25);
color: rgba(255, 59, 48, 1);
}

/* Light theme */
.lightTheme {
/* Properly scoped light theme styling */
[data-theme="light"] .dialog {
background: rgba(255, 255, 255, 0.95);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.lightTheme h3 {
[data-theme="light"] .dialog h3 {
color: rgba(0, 0, 0, 0.9);
}

.lightTheme p {
[data-theme="light"] .dialog p {
color: rgba(0, 0, 0, 0.7);
}

.lightTheme .cancelButton {
background: rgba(0, 0, 0, 0.05);
color: rgba(0, 0, 0, 0.8);
[data-theme="light"] .dialog .cancelButton {
color: rgba(0, 0, 0, 0.6);
}

.lightTheme .cancelButton:hover {
background: rgba(0, 0, 0, 0.1);
[data-theme="light"] .dialog .cancelButton:hover {
color: rgba(0, 0, 0, 0.9);
}

.lightTheme .confirmButton {
background: rgba(255, 59, 48, 0.1);
[data-theme="light"] .dialog .confirmButton {
color: rgba(255, 59, 48, 0.8);
}

.lightTheme .confirmButton:hover {
background: rgba(255, 59, 48, 0.15);
[data-theme="light"] .dialog .confirmButton:hover {
color: rgba(255, 59, 48, 1);
}

@keyframes dialogAppear {
Expand Down
Loading
Loading