Skip to content

Commit b358580

Browse files
committed
Restructure
1 parent 1dcdf35 commit b358580

16 files changed

Lines changed: 36 additions & 29 deletions

File tree

public/icon.png

-2.23 KB
Loading

src/assets/icon.png

6.26 KB
Loading

src/Header.css renamed to src/components/Header.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ header {
1515

1616
header img {
1717
margin-inline-end: 0.5em;
18+
width: 1em;
19+
height: 1em;
1820
}
1921

2022
header img, header h1 {
@@ -24,6 +26,7 @@ header img, header h1 {
2426

2527
header h1 {
2628
margin: 0;
29+
font-size: 24pt;
2730
}
2831

2932
/* QVGA */

src/Header.jsx renamed to src/components/Header.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import PropTypes from 'prop-types'
22
import './Header.css'
3+
import icon from '../assets/icon.png?inline'
34

45
function Header({ title }) {
56
return (
67
<>
78
<title>{title}</title>
89
<header>
9-
<img src="/icon.png" alt="Cloud Phone logo" draggable="false" />
10+
<img src={icon} alt="Cloud Phone logo" draggable="false" width="1em" height="1em" />
1011
<h1>{title}</h1>
1112
</header>
1213
</>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import PropTypes from 'prop-types'
22
import './OptionsMenu.css'
33
import React, { useEffect, useRef, useState } from 'react'
4-
import { autoFocusFirstFocusable } from './focus';
4+
import { autoFocusFirstFocusable } from '../utils/focus';
55
import { useNavigate } from 'react-router';
66

77
function OptionsMenu({
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import PropTypes from 'prop-types'
22
import { useEffect } from 'react'
3-
import MenuIcon from './assets/icons/menu.svg?react'
4-
import BackIcon from './assets/icons/back.svg?react'
5-
import SelectIcon from './assets/icons/select.svg?react'
3+
import MenuIcon from '../assets/icons/menu.svg?react'
4+
import BackIcon from '../assets/icons/back.svg?react'
5+
import SelectIcon from '../assets/icons/select.svg?react'
66
import './SoftKeyBar.css'
77

88
function getIconFromName(name) {

src/main.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import { StrictMode } from 'react'
22
import { createRoot } from 'react-dom/client'
33
import { HashRouter, Route, Routes } from 'react-router'
4-
import './i18n'
4+
import './utils/i18n.js'
55
import './index.css'
6-
import App from './App.jsx'
7-
import Settings from './Settings.jsx'
8-
import About from './About.jsx'
6+
import Home from './pages/Home.jsx'
7+
import Settings from './pages/Settings.jsx'
8+
import About from './pages/About.jsx'
99

1010
// HashRouter is needed for GitHub pages
1111
createRoot(document.getElementById('root')).render(
1212
<StrictMode>
1313
<HashRouter basename='' hashType='noslash'>
1414
<Routes>
15-
<Route index element={<App />} />
15+
<Route index element={<Home />} />
1616
<Route path='settings' element={<Settings />} />
1717
<Route path='about' element={<About />} />
1818
</Routes>

src/About.jsx renamed to src/pages/About.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { useNavigate } from 'react-router';
2-
import './App.css'
3-
import { autoFocus } from './focus';
4-
import Header from './Header'
5-
import SoftKeyBar from './SoftKeyBar'
2+
import './Home.css'
3+
import { autoFocus } from '../utils/focus';
4+
import Header from '../components/Header'
5+
import SoftKeyBar from '../components/SoftKeyBar'
66
import { t } from 'i18next'
77

88
function About() {

0 commit comments

Comments
 (0)