mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
Merge branch 'master' into feature/go-backend
This commit is contained in:
commit
17807b9c8b
12 changed files with 52 additions and 27 deletions
24
README.md
24
README.md
|
@ -1,12 +1,14 @@
|
||||||
### My empty react project template
|
This is [vault48.org](https://vault48.org) frontend.
|
||||||
|
|
||||||
Includes:
|
### Installation
|
||||||
* react
|
1. Clone this repo `git clone git@github.com:muerwre/vault-frontend.git`
|
||||||
* react-redux
|
2. Run `yarn install`
|
||||||
* react-router
|
3. Copy `.env_example` to `.env`
|
||||||
* connected-react-router
|
4. Set it up. You can use https://staging.vault48.org as playground
|
||||||
* redux-saga
|
|
||||||
* redux-persist
|
### Starting
|
||||||
* less, sass (modular)
|
`yarn start`
|
||||||
* reduxsauce
|
|
||||||
* typescript
|
### Building
|
||||||
|
1. Run `yarn build`
|
||||||
|
2. Copy `./dist/*` somewhere
|
||||||
|
|
|
@ -83,7 +83,7 @@
|
||||||
"http-errors": "~1.6.2",
|
"http-errors": "~1.6.2",
|
||||||
"less": "^3.10.3",
|
"less": "^3.10.3",
|
||||||
"less-middleware": "~2.2.1",
|
"less-middleware": "~2.2.1",
|
||||||
"lodash": "^4.17.10",
|
"lodash": "^4.17.19",
|
||||||
"node-sass": "^4.11.0",
|
"node-sass": "^4.11.0",
|
||||||
"photoswipe": "^4.1.3",
|
"photoswipe": "^4.1.3",
|
||||||
"raleway-cyrillic": "^4.0.2",
|
"raleway-cyrillic": "^4.0.2",
|
||||||
|
|
|
@ -15,4 +15,5 @@
|
||||||
|
|
||||||
.subject {
|
.subject {
|
||||||
font: $font_14_regular;
|
font: $font_14_regular;
|
||||||
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
z-index: 7;
|
z-index: 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
|
|
|
@ -134,7 +134,7 @@ const Cell: FC<IProps> = ({
|
||||||
|
|
||||||
<Link className={classNames(styles.face)} to={`/post${id}`}>
|
<Link className={classNames(styles.face)} to={`/post${id}`}>
|
||||||
<div className={styles.face_content}>
|
<div className={styles.face_content}>
|
||||||
{title && !text && <div className={styles.title}>{title}</div>}
|
{!text && <div className={styles.title}>{title || '...'}</div>}
|
||||||
|
|
||||||
{!!text && !!thumbnail && (
|
{!!text && !!thumbnail && (
|
||||||
<div className={styles.text}>
|
<div className={styles.text}>
|
||||||
|
|
|
@ -30,8 +30,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
opacity: 0;
|
//opacity: 0;
|
||||||
transform: translate(0, 10px);
|
//transform: translate(-3px, 3px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@include outer_shadow();
|
@include outer_shadow();
|
||||||
|
|
|
@ -20,7 +20,7 @@ const FlowRecentItem: FC<IProps> = ({ node, has_new }) => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={styles.info}>
|
<div className={styles.info}>
|
||||||
<div className={styles.title}>{node.title}</div>
|
<div className={styles.title}>{node.title || '...'}</div>
|
||||||
<div className={styles.comment}>{getPrettyDate(node.created_at)}</div>
|
<div className={styles.comment}>{getPrettyDate(node.created_at)}</div>
|
||||||
</div>
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
|
@ -11,7 +11,6 @@ export const API = {
|
||||||
MESSAGE_SEND: (username: string) => `/user/user/${username}/messages`,
|
MESSAGE_SEND: (username: string) => `/user/user/${username}/messages`,
|
||||||
GET_UPDATES: '/user/updates',
|
GET_UPDATES: '/user/updates',
|
||||||
REQUEST_CODE: (code?: string) => `/user/restore/${code || ''}`,
|
REQUEST_CODE: (code?: string) => `/user/restore/${code || ''}`,
|
||||||
|
|
||||||
UPLOAD: (target, type) => `/upload/${target}/${type}`,
|
UPLOAD: (target, type) => `/upload/${target}/${type}`,
|
||||||
},
|
},
|
||||||
NODE: {
|
NODE: {
|
||||||
|
|
|
@ -44,14 +44,15 @@ $cols: $content_width / $cell;
|
||||||
grid-template-columns: repeat(2, 1fr);
|
grid-template-columns: repeat(2, 1fr);
|
||||||
grid-template-rows: 40vh 50vw;
|
grid-template-rows: 40vh 50vw;
|
||||||
grid-auto-rows: 50vw;
|
grid-auto-rows: 50vw;
|
||||||
|
grid-column-gap: $gap / 2;
|
||||||
|
grid-row-gap: $gap / 2;
|
||||||
|
padding: 0 $gap / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: $cell * 2) {
|
@media (max-width: $cell * 2) {
|
||||||
grid-template-columns: repeat(2, 1fr);
|
grid-template-columns: repeat(2, 1fr);
|
||||||
grid-template-rows: 40vh 50vw;
|
grid-template-rows: 40vh 50vw;
|
||||||
grid-auto-rows: 50vw;
|
grid-auto-rows: 50vw;
|
||||||
grid-column-gap: $gap;
|
|
||||||
grid-row-gap: $gap;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,9 +49,11 @@ body {
|
||||||
&:global(.double) {
|
&:global(.double) {
|
||||||
height: $spc * 2;
|
height: $spc * 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:global(.quadro) {
|
&:global(.quadro) {
|
||||||
height: $spc * 4;
|
height: $spc * 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:global(.sixty) {
|
&:global(.sixty) {
|
||||||
height: $spc * 6;
|
height: $spc * 6;
|
||||||
}
|
}
|
||||||
|
@ -83,6 +85,24 @@ body {
|
||||||
color: #555555;
|
color: #555555;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:global {
|
||||||
|
.todo, .done {
|
||||||
|
color: #333333;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 0 2px;
|
||||||
|
font: $font_14_semibold;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.todo {
|
||||||
|
background-color: $red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.done {
|
||||||
|
background-color: $green;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
:global(h2) {
|
:global(h2) {
|
||||||
font: $font_24_bold;
|
font: $font_24_bold;
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,6 +94,8 @@ export const formatText = (text: string): string =>
|
||||||
)
|
)
|
||||||
.replace(/:\/\//gim, ':|--|')
|
.replace(/:\/\//gim, ':|--|')
|
||||||
.replace(/(\/\/[^\n]+)/gim, '<span class="grey">$1</span>')
|
.replace(/(\/\/[^\n]+)/gim, '<span class="grey">$1</span>')
|
||||||
|
.replace(/\/\/\s*(todo|туду):?\s*([^\n]+)/gim, '// <span class="todo">$1</span> $2')
|
||||||
|
.replace(/\/\/\s*(done|сделано|сделал|готово|fixed|пофикшено|фиксед):?\s*([^\n]+)/gim, '// <span class="done">$1</span> $2')
|
||||||
.replace(/(\*\*[\s\S]*?\*\*)/gim, '<b class="bold white">$1</b>')
|
.replace(/(\*\*[\s\S]*?\*\*)/gim, '<b class="bold white">$1</b>')
|
||||||
.replace(/(\_\_[\s\S]*?\_\_)/gim, '<i>$1</i>')
|
.replace(/(\_\_[\s\S]*?\_\_)/gim, '<i>$1</i>')
|
||||||
.replace(/(\!\![\s\S]*?(\!\!|\n|$))/gim, '<span class="green">$1</span>')
|
.replace(/(\!\![\s\S]*?(\!\!|\n|$))/gim, '<span class="green">$1</span>')
|
||||||
|
|
14
yarn.lock
14
yarn.lock
|
@ -5991,10 +5991,10 @@ lodash.uniq@^4.5.0:
|
||||||
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
|
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
|
||||||
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
|
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
|
||||||
|
|
||||||
lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@~4.17.10:
|
lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@~4.17.10:
|
||||||
version "4.17.15"
|
version "4.17.19"
|
||||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
|
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b"
|
||||||
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
|
integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==
|
||||||
|
|
||||||
log-symbols@^2.1.0:
|
log-symbols@^2.1.0:
|
||||||
version "2.2.0"
|
version "2.2.0"
|
||||||
|
@ -10208,9 +10208,9 @@ websocket-driver@>=0.5.1:
|
||||||
websocket-extensions ">=0.1.1"
|
websocket-extensions ">=0.1.1"
|
||||||
|
|
||||||
websocket-extensions@>=0.1.1:
|
websocket-extensions@>=0.1.1:
|
||||||
version "0.1.3"
|
version "0.1.4"
|
||||||
resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29"
|
resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42"
|
||||||
integrity sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==
|
integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==
|
||||||
|
|
||||||
whet.extend@~0.9.9:
|
whet.extend@~0.9.9:
|
||||||
version "0.9.9"
|
version "0.9.9"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue