Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preact Version #4

Merged
merged 44 commits into from
Nov 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
bbb2895
update gulp tooling
Reeywhaar Nov 2, 2018
c3b6d82
working process
Reeywhaar Nov 3, 2018
3683c87
hide feed label from regular users
Reeywhaar Nov 5, 2018
63b2b36
improve header filters
Reeywhaar Nov 5, 2018
683bd5d
full articles cached
Reeywhaar Nov 6, 2018
c1b1019
improve feedback on article controls
Reeywhaar Nov 6, 2018
ea6a403
makefile mention
Reeywhaar Nov 7, 2018
c8cbf07
touch devices drag'n'drop enabled
Reeywhaar Nov 7, 2018
fc51d0d
light version of article view for regular users
Reeywhaar Nov 8, 2018
6c5cc93
fix typo
Reeywhaar Nov 8, 2018
7ef3d2e
manual add form submit on ctrl/cmd enter in textarea
Reeywhaar Nov 8, 2018
8d72752
increased performance of listing with help of intersection observer
Reeywhaar Nov 8, 2018
3ead1ea
scss style
Reeywhaar Nov 9, 2018
50d3ffc
post type custom select
Reeywhaar Nov 9, 2018
4f2a9ad
minimalistic theme switch icons
Reeywhaar Nov 9, 2018
db798a4
improved back/forward navigation with articleCache
Reeywhaar Nov 10, 2018
e78133a
decomposition of article views listings
Reeywhaar Nov 10, 2018
b44d359
fix authorization via cookies fail
Reeywhaar Nov 10, 2018
73a7e8f
minor autoupdate fix
Reeywhaar Nov 10, 2018
0cda696
adjust geek title
Reeywhaar Nov 10, 2018
bff6ebe
fix false logout
Reeywhaar Nov 10, 2018
9f897e9
check for system theme if not defined in localstorage. experimental
Reeywhaar Nov 10, 2018
5346b17
sticky detailed close button
Reeywhaar Nov 10, 2018
96e08dc
fix dragging the whole element
Reeywhaar Nov 10, 2018
d9959a2
safari smooth scroll
Reeywhaar Nov 10, 2018
d82a79f
retry on cookie login
Reeywhaar Nov 11, 2018
ade10e1
polish error handling
Reeywhaar Nov 11, 2018
649628f
change route /news/:slug to /post/:slug
Reeywhaar Nov 11, 2018
600e6f2
add docker images and remove public from git index
Reeywhaar Nov 11, 2018
f64fd28
minor style fix
Reeywhaar Nov 12, 2018
84b7f9f
fix incorrent drag/drop events subscribe/unsubscribe
Reeywhaar Nov 12, 2018
411969f
adjust remark comment urls
Reeywhaar Nov 12, 2018
c318d56
comb package.json
Reeywhaar Nov 12, 2018
710b5b7
dockerfile logic
Reeywhaar Nov 12, 2018
0a6f8f5
html formatting
Reeywhaar Nov 12, 2018
7c1d1b3
useless code + package.* files mounted with .host postfix, because np…
Reeywhaar Nov 12, 2018
b082de2
fix dragging article elements causes applying drop-item class and so on
Reeywhaar Nov 12, 2018
3bb6108
fix remark component
Reeywhaar Nov 13, 2018
170c905
enable treeshaking to reduce bundle size
Reeywhaar Nov 14, 2018
e681ed2
feeds input autofocus
Reeywhaar Nov 15, 2018
b399b62
reduced padding for article popout for mobile
Reeywhaar Nov 15, 2018
af955e4
better autofocus for add article
Reeywhaar Nov 15, 2018
a927faa
article content taming
Reeywhaar Nov 15, 2018
7013130
better autofocus for login
Reeywhaar Nov 15, 2018
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
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
./node_modules
./public
./src
./.git
./.gitignore
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
dev/_blocks/
node_modules/
*.sublime-*
dev/html/test
public/test
public/*
!public/.gitkeep
*.sublime-*
30 changes: 12 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
FROM node:4.2.3

ENV DISQUS=test \
APIPATH=/api

ADD . /srv/rtnews-ui

FROM node:10-alpine AS rtnews_deps
COPY ./package.json ./package-lock.json /app/
RUN \
cd /srv/rtnews-ui && \
npm i -g gulpjs/gulp#4.0 && \
npm i && \
npm run build && \
mkdir -p /var/www && \
mv ./public /var/www/webapp && \
mv /srv/rtnews-ui/dockerinit.sh /init.sh && \
chmod +x /init.sh
cd /app && \
npm ci --loglevel error


VOLUME ["/var/www/webapp"]
FROM node:10-alpine as rtnews_base
RUN apk add --update --no-cache make

ENTRYPOINT ["/init.sh"]

CMD ["sleep", "100"]
FROM rtnews_base
COPY --from=rtnews_deps /app /app
EXPOSE 9000
WORKDIR /app
ENTRYPOINT ["/bin/ash"]
31 changes: 27 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@

Полное описание задачи можно [подсмотреть здесь](http://p.umputun.com/2015/11/26/vsiem-mirom-dlia-obshchiei-polzy/)

----
### Разработка
Таски описаны в `makefile`

#### Build
```
# modes are: production|development
npm install && ./node_modules/.bin/webpack --mode "development"
```

После билда, все нужные файлы будут в папке `public`. Для работы нужен реврайт несуществующих урлов на index.html.

#### Dev Server
```
./node_modules/.bin/webpack-dev-server --mode "development"
```

#### С помощью Docker
В makefile продублированы команды для docker

#### ENVIRONMENT
**RTHOST**: Ссылка на api. По умолчанию используется `https://news.radio-t.com/api/v1` для продакшна и `http://jess.umputun.com:8780/api/v1` для дева

----
### Feeds API

Expand All @@ -17,7 +40,7 @@
"id": "566283bd4e1ad997adf3f532",
"updated": "2015-12-05T06:27:09.449Z"
}
```
```
----
### News API

Expand All @@ -37,7 +60,7 @@
* `GET /api/v1/news/archive` - get list of archives articles

* move
* `PUT /api/v1/news/move/:pos/:offset` - move from pos with +/- offset
* `PUT /api/v1/news/move/:pos/:offset` - move from pos with +/- offset
* `PUT /api/v1/news/moveid/:id/:offset` - move from id with +/- offset
* `GET /api/v1/news/positions` - get positions as {id:pos, id1:pos1 ...}

Expand All @@ -54,14 +77,14 @@
* marking
* `PUT /api/v1/news/nogeek/:id` - mark as geek-article by id
* `PUT /api/v1/news/geek/:id` - mark as regular (non-geek) by id

* miscs
* `GET /api/v1/news/rss/:count` - get rss feed with last (by time) :count
* `PUT /api/v1/news/reload` - force reprocessing of all RSS feeds
* `PUT /api/v1/show/start` - save start time (used by markdown request)
* `GET /api/v1/show/start` - return saved start time

## _article (news) records_
## _article (news) records_

```
{
Expand Down
166 changes: 0 additions & 166 deletions dev/blocks/add/add.js

This file was deleted.

37 changes: 0 additions & 37 deletions dev/blocks/add/add.scss

This file was deleted.

9 changes: 0 additions & 9 deletions dev/blocks/common/__clearfix/common__clearfix.scss

This file was deleted.

10 changes: 0 additions & 10 deletions dev/blocks/common/__justify/common__justify.scss

This file was deleted.

6 changes: 0 additions & 6 deletions dev/blocks/common/__list-nostyle/common__list-nostyle.scss

This file was deleted.

11 changes: 0 additions & 11 deletions dev/blocks/common/__middler-parent/common__middler-parent.scss

This file was deleted.

11 changes: 0 additions & 11 deletions dev/blocks/common/__table-nostyle/common__table-nostyle.scss

This file was deleted.

Loading