├── src ├── react-app-env.d.ts ├── assets │ ├── logo.icns │ ├── logo.ico │ ├── logo.png │ ├── open-sans-v17-latin_cyrillic-italic.woff │ ├── open-sans-v17-latin_cyrillic-regular.woff │ └── roboto-condensed-v18-latin_cyrillic-regular.woff ├── components │ ├── Header │ │ ├── logo.png │ │ ├── Header.sass │ │ └── Header.tsx │ ├── Ticker │ │ ├── Ticker.sass │ │ └── Ticker.tsx │ └── Editor │ │ ├── Editor.sass │ │ └── Editor.tsx ├── setupTests.ts ├── App.test.tsx ├── index.sass ├── reportWebVitals.ts ├── styles │ └── fonts.sass ├── index.jsx └── index.py ├── public ├── robots.txt ├── favicon.ico ├── logo192.png ├── logo512.png ├── manifest.json └── index.html ├── requirements.txt ├── .gitignore ├── tsconfig.json ├── index.spec ├── LICENSE ├── README.md └── package.json /src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzc0d3r/pywebview-react-boilerplate/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzc0d3r/pywebview-react-boilerplate/HEAD/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzc0d3r/pywebview-react-boilerplate/HEAD/public/logo512.png -------------------------------------------------------------------------------- /src/assets/logo.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzc0d3r/pywebview-react-boilerplate/HEAD/src/assets/logo.icns -------------------------------------------------------------------------------- /src/assets/logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzc0d3r/pywebview-react-boilerplate/HEAD/src/assets/logo.ico -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzc0d3r/pywebview-react-boilerplate/HEAD/src/assets/logo.png -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | setuptools 2 | pywebview 3 | pyinstaller; sys_platform != 'darwin' 4 | py2app; sys_platform == 'darwin' -------------------------------------------------------------------------------- /src/components/Header/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzc0d3r/pywebview-react-boilerplate/HEAD/src/components/Header/logo.png -------------------------------------------------------------------------------- /src/assets/open-sans-v17-latin_cyrillic-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzc0d3r/pywebview-react-boilerplate/HEAD/src/assets/open-sans-v17-latin_cyrillic-italic.woff -------------------------------------------------------------------------------- /src/assets/open-sans-v17-latin_cyrillic-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzc0d3r/pywebview-react-boilerplate/HEAD/src/assets/open-sans-v17-latin_cyrillic-regular.woff -------------------------------------------------------------------------------- /src/assets/roboto-condensed-v18-latin_cyrillic-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzc0d3r/pywebview-react-boilerplate/HEAD/src/assets/roboto-condensed-v18-latin_cyrillic-regular.woff -------------------------------------------------------------------------------- /src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /src/components/Ticker/Ticker.sass: -------------------------------------------------------------------------------- 1 | .ticker-container 2 | text-align: center 3 | margin: 3rem auto 1rem auto 4 | h1 5 | margin-bottom: 2rem 6 | em 7 | display: block 8 | max-width: 35rem 9 | margin: 2rem auto 1rem auto 10 | font-size: 12pt 11 | text-decoration: none 12 | color: initial 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.sh 3 | setup.cfg 4 | pywebview.egg-info 5 | MANIFEST 6 | build 7 | dist 8 | .cache 9 | .idea 10 | .vs 11 | bin 12 | obj 13 | node_modules 14 | dist 15 | gui 16 | .DS_Store 17 | venv* 18 | .vscode 19 | .pytest_cache 20 | __pycache__ 21 | src/__pycache__ 22 | .eggs 23 | yarn-error.log 24 | yarn.lock 25 | -------------------------------------------------------------------------------- /src/App.test.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { render, screen } from '@testing-library/react'; 3 | import App from './index'; 4 | 5 | test('renders learn react link', () => { 6 | render(); 7 | const linkElement = screen.getByText(/learn react/i); 8 | expect(linkElement).toBeInTheDocument(); 9 | }); 10 | -------------------------------------------------------------------------------- /src/index.sass: -------------------------------------------------------------------------------- 1 | @import './styles/fonts' 2 | body 3 | margin: 0 4 | padding: 0 5 | font-family: 'Open Sans', 'Helvetica Neue', sans-serif 6 | font-size: 14pt 7 | line-height: 130% 8 | color: #2c3e50 9 | background-color: white 10 | textarea 11 | font-family: 'Open Sans', 'Helvetica Neue', sans-serif 12 | font-size: 14pt 13 | padding: 0.6rem 14 | h1, h2, h3 15 | font-family: 'Roboto Condensed', 'Helvetica Neue', sans-serif 16 | -------------------------------------------------------------------------------- /src/components/Header/Header.sass: -------------------------------------------------------------------------------- 1 | .header-container 2 | border-bottom: 1px solid #eaecef 3 | padding: 0.5rem 1rem 4 | display: flex 5 | justify-content: flex-start 6 | h2 7 | font-size: 16pt 8 | margin: 6px 9 | .logo 10 | height: 2.2rem 11 | .links 12 | margin-left: auto 13 | a:link, a:visited, a:focus 14 | color: inherit 15 | font-size: 12pt 16 | text-decoration: none 17 | border-bottom: 2px solid transparent 18 | a 19 | &:hover 20 | border-bottom: 2px solid #46bd87 21 | -------------------------------------------------------------------------------- /src/reportWebVitals.ts: -------------------------------------------------------------------------------- 1 | import { ReportHandler } from 'web-vitals'; 2 | 3 | const reportWebVitals = (onPerfEntry?: ReportHandler) => { 4 | if (onPerfEntry && onPerfEntry instanceof Function) { 5 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 6 | getCLS(onPerfEntry); 7 | getFID(onPerfEntry); 8 | getFCP(onPerfEntry); 9 | getLCP(onPerfEntry); 10 | getTTFB(onPerfEntry); 11 | }); 12 | } 13 | }; 14 | 15 | export default reportWebVitals; 16 | -------------------------------------------------------------------------------- /src/components/Editor/Editor.sass: -------------------------------------------------------------------------------- 1 | .editor-container 2 | padding: 0 3rem 3 | text-align: center 4 | .textarea 5 | width: 30rem 6 | height: 10rem 7 | margin: 2rem 8 | color: #2c3e50 9 | .button 10 | display: inline-block 11 | font-size: 1.2rem 12 | color: #fff 13 | background-color: #3eaf7c 14 | padding: .8rem 1.6rem 15 | border-radius: 4px 16 | transition: background-color .1s ease 17 | box-sizing: border-box 18 | border-bottom: 1px solid #389d70 19 | &:hover 20 | background-color: #4abf8a 21 | -------------------------------------------------------------------------------- /src/components/Header/Header.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | 3 | import './Header.sass' 4 | import logo from '../../assets/logo.png' 5 | 6 | 7 | export default function Header() { 8 | return ( 9 |
10 | pywebview 11 |

pywebview

12 | 13 |
14 | Documentation 15 |
16 |
17 | ); 18 | }; 19 | -------------------------------------------------------------------------------- /src/styles/fonts.sass: -------------------------------------------------------------------------------- 1 | @font-face 2 | font-family: 'Open Sans' 3 | font-style: normal 4 | font-weight: 400 5 | src: url('../assets/open-sans-v17-latin_cyrillic-regular.woff') format('woff'), 6 | font-family: 'Open Sans' 7 | font-style: italic 8 | font-weight: 400 9 | src: url('../assets/open-sans-v17-latin_cyrillic-italic.woff') format('woff'), 10 | font-family: 'Roboto Condensed' 11 | font-style: normal 12 | font-weight: 400 13 | src: url('../assets/roboto-condensed-v18-latin_cyrillic-regular.woff') format('woff'), 14 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": [ 5 | "dom", 6 | "dom.iterable", 7 | "esnext" 8 | ], 9 | "allowJs": true, 10 | "skipLibCheck": true, 11 | "esModuleInterop": true, 12 | "allowSyntheticDefaultImports": true, 13 | "strict": true, 14 | "forceConsistentCasingInFileNames": true, 15 | "noFallthroughCasesInSwitch": true, 16 | "module": "esnext", 17 | "moduleResolution": "node", 18 | "resolveJsonModule": true, 19 | "isolatedModules": true, 20 | "noEmit": true, 21 | "jsx": "react-jsx" 22 | }, 23 | "include": [ 24 | "src" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /src/components/Editor/Editor.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | 3 | import './Editor.sass' 4 | 5 | 6 | export default function Header() { 7 | const [content, saveContent] = 8 | React.useState('Using Python as backend, you can perform operations that are not allowed in Javascript, for example disk access. Click button below to save this content to hard drive.') 9 | 10 | return ( 11 |
12 |