Ce dépôt git contient le code source de la web app d'HETIC Newsroom, heticiens.news
.
hetic-newsroom / heticiens.news Goto Github PK
View Code? Open in Web Editor NEWWeb app pour HETIC Newsroom.
Home Page: https://heticiens.news
Web app pour HETIC Newsroom.
Home Page: https://heticiens.news
Sur les navigateurs qui ne supportent pas Navigator.share()
, il n'y a pas de fallback pour partager articles ou auteurs.
Voir #20
Hi guys,
I think may be an error with the filter function because on the /about
page, I don't see the categories inside the menu.
Lines 59 to 62 in b456989
At first, I thought about L47-49, but SSR is working well on this page.
It's maybe a bug elsewhere, but I didn't try to make tests in local, I didn't find the install readme 😛
Have fun!
Currently you can directly access an unpublished article using the /article/[id]
route.
It would be great to display a small warning message at the top indicating that it is a preview of unpublished material.
Insert unbreakable spaces (French punctuation)
/api/auth
:
?token=[token]
200 OK
=> {token: newtoken}
400 BAD INPUT
404 NOT FOUND
410 EXPIRED
{
"email": "email address",
"password": "cleartext password"
}
201 CREATED
=> {token: newToken}
400 BAD INPUT
=> {error: 'Bad email format' || 'Bad password format'}
404 NOT FOUND
403 UNAUTHORIZED
/api/contributor/[id]
:
?token=[token]
200 OK
=> Contributor404 NOT FOUND
403 UNAUTHORIZED
/api/contributor/[id]/articles
:
?count=[number]
)200 OK
=> {articles: article[]}
404 NOT FOUND
/api/contributor/[id]/drafts
:
?token=[token]
(optional: &count=[number]
)200 OK
=> {drafts: article[]}
404 NOT FOUND
/api/contributor/[id]/drafts/new
:
{
"token": "token",
"draft": {
authors: Array<authorId | email>,
title: string,
category: string,
intro: string,
content: HTMLstring,
image: "base64-encoded image"
}
}
201 CREATED
=> {draft: 'articleId'}
400 BAD INPUT
=>
{
error: 'Missing or incorrect fields' |
'Could not find contributor [id | email]' |
'Bad image format'
}
404 NOT FOUND
403 UNAUTHORIZED
/api/contributor/[id]/edit
:
{
"token": "token",
"new": {
"name": string?,
"email": string?,
"picture": base64?,
"bio": string?,
"password": string?,
"social": Object<Name, URL>
}
}
200 OK
400 BAD INPUT
=> {error: 'error message'}
404 NOT FOUND
403 UNAUTHORIZED
/api/article/[id]/edit
:
{
"token": "token",
"article": {
authors: Array<authorId | email>,
title: string,
category: string,
intro: string,
content: HTMLstring,
image: "base64-encoded image | url"
}
}
200 OK
400 BAD INPUT
=> {error: 'error message'}
404 NOT FOUND
403 UNAUTHORIZED
/api/article/latest
:
?count=[number]
)200 OK
=> {articles: article[]}
404 NOT FOUND
/api/article/latest/[category]
:
?count=[number]
)200 OK
=> {articles: article[]}
404 NOT FOUND
/api/article/drafts
:
?token=[token]
(optional: &count=[number]
)200 OK
=> {drafts: article[]}
/api/article/[id]/approve
:
?token=[token]
200 OK
201 CREATED
- this was the last approval needed, article has been published400 BAD INPUT
=> {error: 'Not a draft'}
404 NOT FOUND
403 UNAUTHORIZED
/api/article/[id]/edit
:
{
"token": "token",
"article": Partial<Article>
}
200 OK
400 BAD INPUT
404 NOT FOUND
403 UNAUTHORIZED
/api/article/[id]/remove
:
?token=[token]
200 OK
404 NOT FOUND
403 UNAUTHORIZED
Requested icons: ✅ 👁️
see #34
The file is sent to the correct endpoint using POST request with a FormData.
The endpoint currently expects a base64 string.
child of #12
Provide an endpoint to create new contributors (eg. api/contributor/new
) accessible to moderators with level 2.
Provide an UI.
Probable refactor: some if statement compares if moderator status level strictly equals 1 (instead of >=).
When editing an article or a draft, adding/removing a contributor isn't reflected to the contributors table.
Add JSON-LD Schema tags to improve ranking.
Suggested tags: Article, Organization
Look at schema.org
Cf.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.