mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
This adds consistency: The mention links with `@` was implemented that way already. Instead of parsing the URL, we add some redundancy and add another attribute: data-hashtag-id So, what characters are valid for html attributes? Read: https://stackoverflow.com/questions/925994/what-characters-are-allowed-in-an-html-attribute-name Thanks to @Tirokk, who added some validations on the hahstag ids, I think we are all set. If you try to write a hashtag with a `"` double quotation mark for example, it gets automatically replaced with a valid hashtag. If someone wants to send us invalid hashtag ids to the backend directly, the regex there would filter it out.
Webapp
Installation
# install all dependencies
$ yarn install
Copy:
cp .env.template .env
cp cypress.env.template.json cypress.env.json
Configure the files according to your needs and your local setup.
Build for Development
# serve with hot reload at localhost:3000
$ yarn dev
Build for Production
# build for production and launch server
$ yarn build
$ yarn start
Styleguide
All reusable Components for example avatar should be done inside the Nitro-Styleguide repository.
More information can be found here: https://github.com/Human-Connection/Nitro-Styleguide
If you need to change something in the styleguide and want to see the effects on the frontend immediately, then we have you covered. You need to clone the styleguide to the parent directory ../Nitro-Styleguide and run yarn && yarn run dev. After that you run yarn run dev:styleguide instead of yarn run dev and you will see your changes reflected inside the frontend!

