Set up template repository for publite project

This commit is contained in:
Dmitriy Shishkov 2021-07-12 21:01:14 +05:00
parent f9e0e77fc3
commit 36576874e2
No known key found for this signature in database
GPG Key ID: 14358F96FCDD8060
9 changed files with 170 additions and 8 deletions

View File

@ -1,17 +1,24 @@
# \<Project name\> # Publite Frontend
<p align="center"> <p align="center">
<img src="https://github.com/dm1sh/<Repo name>/raw/main/logo.svg" alt="<Logo description>" width="150px"> <img src="https://github.com/publite/frontend/raw/main/logo.svg" alt="Publite logo" width="150px">
</p> </p>
## Overview ## Overview
\<Example text\> Frontend for Publite service — E-Books reader
## Deploy ## Deploy
\<Deployment instruction\> Dev environment setup:
```bash ```bash
<Code> npm i
# Run with watch
npm run dev
# Build to test prod
npm run build
npm exec serve -s build
``` ```

4
custom.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
declare module "*.module.css" {
const classes: { [key: string]: string };
export default classes;
}

68
logo.svg Normal file
View File

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="372"
height="512"
viewBox="0 0 372 512"
version="1.1"
id="svg23656"
inkscape:version="1.1 (c4e8f9ed74, 2021-05-24)"
sodipodi:docname="logo.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview23658"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="true"
inkscape:document-units="px"
showgrid="false"
units="px"
inkscape:zoom="1.4142136"
inkscape:cx="90.863221"
inkscape:cy="228.74904"
inkscape:window-width="1916"
inkscape:window-height="1048"
inkscape:window-x="2"
inkscape:window-y="30"
inkscape:window-maximized="1"
inkscape:current-layer="layer1"
inkscape:snap-object-midpoints="true"
inkscape:snap-center="true"
showguides="true"
inkscape:guide-bbox="true"
inkscape:snap-intersection-paths="false"
height="372px" />
<defs
id="defs23653" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#feffff;fill-opacity:1;stroke:none;stroke-width:10;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect9862"
width="372"
height="512"
x="0"
y="0" />
<g
id="g9760">
<path
style="color:#000000;fill:#000000;stroke-width:1.09037;-inkscape-stroke:none;paint-order:markers stroke fill"
d="m 219.02182,320.30644 v 138.7017 c 0,10.90433 8.94048,19.85349 19.83424,19.85349 h 74.64982 c 5.6688,0 10.7715,-2.4564 14.39782,-6.31741 3.62464,3.84241 8.71703,6.28118 14.37015,6.28118 v -10.90898 c -5.04074,0 -8.92783,-3.88781 -8.93372,-8.93172 V 320.30644 h -10.8984 v 138.66761 h -0.002 c 0,0.008 0.002,0.014 0.002,0.0213 v 0.0128 c 0,5.04946 -3.89127,8.94451 -8.93585,8.94451 h -74.64982 c -5.04456,0 -8.93584,-3.89505 -8.93584,-8.94451 V 320.30644 Z"
id="path20443" />
<path
style="color:#000000;fill:#000000;fill-rule:evenodd;stroke-width:1.09037;stroke-linecap:square;-inkscape-stroke:none"
d="m 41.424628,36.114794 c -10.893763,0 -19.834248,8.94917 -19.834248,19.853488 0,10.904319 8.940485,19.85349 19.834248,19.85349 H 177.11617 V 97.230604 H 41.424628 c -10.893752,0 -19.834248,8.947036 -19.834248,19.851356 0,10.90432 8.940485,19.85349 19.834248,19.85349 H 177.11617 v 21.40887 H 41.424628 c -10.893752,0 -19.834248,8.94917 -19.834248,19.85349 0,10.90432 8.940485,19.85349 19.834248,19.85349 H 177.11617 v 21.40887 H 41.424628 c -10.893752,0 -19.834248,8.94917 -19.834248,19.85349 0,10.90432 8.940485,19.85349 19.834248,19.85349 H 177.11617 v 21.40888 H 41.424628 c -10.893752,0 -19.834248,8.94917 -19.834248,19.85348 0,10.90432 8.940485,19.85136 19.834248,19.85136 H 177.11617 v 158.5488 h 10.89841 v -248.46052 -0.004 c 53.52577,0 97.03413,-43.55056 97.03413,-97.12826 0,-53.577715 -43.50836,-97.128274 -97.03413,-97.128271 z M 188.01463,47.017336 c 47.63585,-2e-6 86.13573,38.537221 86.13573,86.219294 0,47.68205 -38.49988,86.21928 -86.13573,86.21928 z m -146.589947,0.0064 H 177.11617 V 64.91275 H 41.424628 c -5.044567,0 -8.935842,-3.895057 -8.935842,-8.944511 0,-5.049456 3.891265,-8.94451 8.935842,-8.94451 z m 0,61.115854 H 177.11617 v 17.88688 H 41.424628 c -5.044567,0 -8.935842,-3.89505 -8.935842,-8.94451 0,-5.04945 3.891265,-8.94237 8.935842,-8.94237 z m 0,61.11371 H 177.11617 v 17.88903 H 41.424628 c -5.044567,0 -8.935842,-3.89506 -8.935842,-8.94452 0,-5.04946 3.891265,-8.94451 8.935842,-8.94451 z m 0,61.11585 H 177.11617 v 17.88903 H 41.424628 c -5.044567,0 -8.935842,-3.89506 -8.935842,-8.94451 0,-5.04946 3.891265,-8.94452 8.935842,-8.94452 z m 0,61.11586 H 177.11617 v 17.88684 H 41.424628 c -5.044567,0 -8.935842,-3.89292 -8.935842,-8.94238 0,-5.04945 3.891265,-8.94451 8.935842,-8.94451 z"
id="path1187"
sodipodi:nodetypes="cssccsssccsssccsssccssscccccscccscccccsscccccsssccccsssccccsssccccsssc" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -15,6 +15,7 @@
}, },
"dependencies": { "dependencies": {
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2" "react-dom": "^17.0.2",
"serve": "^12.0.0"
} }
} }

View File

@ -4,7 +4,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>React application</title> <title>Publite</title>
</head> </head>
<body> <body>

68
public/logo.svg Normal file
View File

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="372"
height="512"
viewBox="0 0 372 512"
version="1.1"
id="svg23656"
inkscape:version="1.1 (c4e8f9ed74, 2021-05-24)"
sodipodi:docname="logo.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview23658"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="true"
inkscape:document-units="px"
showgrid="false"
units="px"
inkscape:zoom="1.4142136"
inkscape:cx="90.863221"
inkscape:cy="228.74904"
inkscape:window-width="1916"
inkscape:window-height="1048"
inkscape:window-x="2"
inkscape:window-y="30"
inkscape:window-maximized="1"
inkscape:current-layer="layer1"
inkscape:snap-object-midpoints="true"
inkscape:snap-center="true"
showguides="true"
inkscape:guide-bbox="true"
inkscape:snap-intersection-paths="false"
height="372px" />
<defs
id="defs23653" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#feffff;fill-opacity:1;stroke:none;stroke-width:10;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect9862"
width="372"
height="512"
x="0"
y="0" />
<g
id="g9760">
<path
style="color:#000000;fill:#000000;stroke-width:1.09037;-inkscape-stroke:none;paint-order:markers stroke fill"
d="m 219.02182,320.30644 v 138.7017 c 0,10.90433 8.94048,19.85349 19.83424,19.85349 h 74.64982 c 5.6688,0 10.7715,-2.4564 14.39782,-6.31741 3.62464,3.84241 8.71703,6.28118 14.37015,6.28118 v -10.90898 c -5.04074,0 -8.92783,-3.88781 -8.93372,-8.93172 V 320.30644 h -10.8984 v 138.66761 h -0.002 c 0,0.008 0.002,0.014 0.002,0.0213 v 0.0128 c 0,5.04946 -3.89127,8.94451 -8.93585,8.94451 h -74.64982 c -5.04456,0 -8.93584,-3.89505 -8.93584,-8.94451 V 320.30644 Z"
id="path20443" />
<path
style="color:#000000;fill:#000000;fill-rule:evenodd;stroke-width:1.09037;stroke-linecap:square;-inkscape-stroke:none"
d="m 41.424628,36.114794 c -10.893763,0 -19.834248,8.94917 -19.834248,19.853488 0,10.904319 8.940485,19.85349 19.834248,19.85349 H 177.11617 V 97.230604 H 41.424628 c -10.893752,0 -19.834248,8.947036 -19.834248,19.851356 0,10.90432 8.940485,19.85349 19.834248,19.85349 H 177.11617 v 21.40887 H 41.424628 c -10.893752,0 -19.834248,8.94917 -19.834248,19.85349 0,10.90432 8.940485,19.85349 19.834248,19.85349 H 177.11617 v 21.40887 H 41.424628 c -10.893752,0 -19.834248,8.94917 -19.834248,19.85349 0,10.90432 8.940485,19.85349 19.834248,19.85349 H 177.11617 v 21.40888 H 41.424628 c -10.893752,0 -19.834248,8.94917 -19.834248,19.85348 0,10.90432 8.940485,19.85136 19.834248,19.85136 H 177.11617 v 158.5488 h 10.89841 v -248.46052 -0.004 c 53.52577,0 97.03413,-43.55056 97.03413,-97.12826 0,-53.577715 -43.50836,-97.128274 -97.03413,-97.128271 z M 188.01463,47.017336 c 47.63585,-2e-6 86.13573,38.537221 86.13573,86.219294 0,47.68205 -38.49988,86.21928 -86.13573,86.21928 z m -146.589947,0.0064 H 177.11617 V 64.91275 H 41.424628 c -5.044567,0 -8.935842,-3.895057 -8.935842,-8.944511 0,-5.049456 3.891265,-8.94451 8.935842,-8.94451 z m 0,61.115854 H 177.11617 v 17.88688 H 41.424628 c -5.044567,0 -8.935842,-3.89505 -8.935842,-8.94451 0,-5.04945 3.891265,-8.94237 8.935842,-8.94237 z m 0,61.11371 H 177.11617 v 17.88903 H 41.424628 c -5.044567,0 -8.935842,-3.89506 -8.935842,-8.94452 0,-5.04946 3.891265,-8.94451 8.935842,-8.94451 z m 0,61.11585 H 177.11617 v 17.88903 H 41.424628 c -5.044567,0 -8.935842,-3.89506 -8.935842,-8.94451 0,-5.04946 3.891265,-8.94452 8.935842,-8.94452 z m 0,61.11586 H 177.11617 v 17.88684 H 41.424628 c -5.044567,0 -8.935842,-3.89292 -8.935842,-8.94238 0,-5.04945 3.891265,-8.94451 8.935842,-8.94451 z"
id="path1187"
sodipodi:nodetypes="cssccsssccsssccsssccssscccccscccscccccsscccccsssccccsssccccsssccccsssc" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -1 +0,0 @@
export const App = () => <div>Hello, world</div>;

6
src/App/App.module.css Normal file
View File

@ -0,0 +1,6 @@
.centredBlock {
display: flex;
align-items: center;
flex-direction: column;
width: 100%;
}

9
src/App/index.tsx Normal file
View File

@ -0,0 +1,9 @@
import React from "react";
import styles from "./App.module.css";
export const App = () => (
<div className={styles.centredBlock}>
<p>Hello, Publite</p>
<img src="/logo.svg" alt="Publite logo" width="100px" />
</div>
);