Commit Graph

98 Commits

Author SHA1 Message Date
Akshit Garg
a3734cc6ab
refactor(styles): move the imports to the top
- Esbuild needs css imports to be on the top of the file for
  them to resolve properly

Signed-off-by: Akshit Garg <garg.akshit@gmail.com>
2021-08-21 18:10:24 +05:30
Akshit Garg
8c99eb04a4
refactor(styles): use JetBrains Mono variable
- Remove Google fonts' "JetBrains Mono" as it didn't support variable
  and add the variable ttf for it

Signed-off-by: Akshit Garg <garg.akshit@gmail.com>
2021-08-21 18:01:27 +05:30
Akshit Garg
0ed4427322
refactor(assets): remove webpack.config.js
Signed-off-by: Akshit Garg <garg.akshit@gmail.com>
2021-08-21 17:50:45 +05:30
Akshit Garg
3f5b1d10ac
refactor(assets): swap webpack for esbuild
- Remove all webpack and babel related npm dependencies
- Add esbuild and esbuild-plugin-postcss2 as a dependency
- Add a custom `build.js` script to build css and js with esbuild
  and copy static files to the priv/static directory
- Modify `config/dev.exs` to use that build script as a watcher instead
  of webpack
- Modify `package.json` to use that build script in instead of webpack
- Modify `KetbinWeb.Endpoint` to serve the assets directory instead of
  css and js directories from static
- Modify the `app.html.eex` layout to use `assets` directory instead of
  separate css and js directories

Signed-off-by: Akshit Garg <garg.akshit@gmail.com>
2021-08-21 17:41:46 +05:30
Akshit Garg
12ec98d15e
refactor(config): use secret files in dev mode
- Refactor `config/dev.exs` to use `config/dev.secret.exs` instead of
  fetching the SMTP information from the environment and using hardcoded
  database credentials. This is useful when different developers have
  different database credentials and they use different SMTP adapters
- Add a sample `dev.secret.exs` in `config/dev.secret.sample.exs`. Also
  gitignore the origin `dev.secret.exs` file
- Add instructions on how to setup the config file for development in
  `README.md`
- Add `Plug.Swoosh.MailboxPreview` plug on "/mailbox" route in
  development mode for easier development with e-mails

Signed-off-by: Akshit Garg <garg.akshit@gmail.com>
2021-08-21 16:47:31 +05:30
74ed02c4da chore(build): remove node-sass and sass-loader
fixes freebsd builds

Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-20 07:00:07 +05:30
caf3535e74
feat(mailer): send mail asynchronously
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-20 03:00:17 +05:30
d734e8ad02
refactor(users): add styles for remaining user management templates
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-20 02:27:16 +05:30
36ad9d1000
feat(users): wire up forgot password to swoosh
closes #4

Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-20 02:09:14 +05:30
816332bdd6
chore(native): run cargo fmt
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-17 03:24:30 +05:30
92146cd3dc
fix(build): add rust and cargo dependency to builder image
fixes #1

Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-17 03:22:52 +05:30
2a8ee4cd1e
fix(ui): fix lopsided logo
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-17 03:01:29 +05:30
8b7c362611
fix(pastes): sanitize paste content while rendering
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-17 03:00:24 +05:30
182a5b1e55
feat(pastes): decide highlighting rules using extension
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-17 02:29:24 +05:30
425fb2b571
feat(pastes): use rustler for highlight NIF
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-17 02:05:58 +05:30
ed731994d7
chore(nif): add nif stubs
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-16 14:10:22 +05:30
024b8a7c64
chore: generate a rustler project
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-16 13:58:58 +05:30
478bea7efb
fix(pastes): replacing a paste with a URL now shortens the URL
fixes #5

Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-16 13:53:22 +05:30
47acc97955
fix(users): fix styles for login page
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-15 05:02:33 +05:30
7374d7189e
refactor(styles): unify look and feel across pages
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-15 04:53:50 +05:30
0618654ad5
feat(pastes): handle edit permissions using plugs
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-15 04:47:44 +05:30
58498d47d4
refactor(ui): make alerts look nicer
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-15 04:12:26 +05:30
a195688bdc
feat(pastes): implement editing for logged in users
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-15 04:05:39 +05:30
f5525d2d20
feat(paste): add user id if user is logged in
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-15 03:20:03 +05:30
c99df5e8bd
feat(user): style register page
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-15 02:18:34 +05:30
16a0c7ec98
fix(ui): fix misc ui bugs
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-15 01:25:18 +05:30
75ac6be3a6
feat(pastes): add raw paste handler
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-14 15:19:16 +05:30
40b55e47de
fix(build): prevent all styles from being purged
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-14 15:18:55 +05:30
0091de08b0
chore(build): add makefile
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-14 14:55:22 +05:30
5d05a87263
chore: prepare for prod
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-14 01:19:00 +05:30
d369c75fa8
chore(assets): migrate to yarn
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-13 14:17:33 +05:30
30bbc9b78d
chore(build): create dockerfile for release deployment
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-13 14:12:49 +05:30
aa86d9a4b9
chore(styles): clean up unused styles
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-13 12:13:59 +05:30
f411017280
feat(pastes): set up redirection routes
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-13 07:54:07 +05:30
750d62cc73
feat(pastes): add support for url pastes
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-13 07:46:10 +05:30
1b54edf7b3
feat(utils): add a phonetic key generator
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-13 07:12:13 +05:30
13728f2ef8
feat(ui): create idiomatic UI matching previous katbin iteration
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-13 06:33:43 +05:30
c6c54347a7
feat(pastes): add page to view pastes
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-13 05:47:13 +05:30
d818c7033a
fix(models): prevent IDs being empty while inserting
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-12 04:29:58 +05:30
99ad54cf68
chore: generate resources for pastes
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-12 03:28:28 +05:30
5a7bece725
feat(ui): implement header ui
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-12 02:47:23 +05:30
92ee2be4cc
chore(web): add tailwindcss
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-11 13:46:02 +05:30
127287f2f6
refactor(user): reduce password length limit to 8 characters
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-11 13:35:35 +05:30
721bb05cc1
chore(auth): generate code for auth-authz
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-11 12:27:23 +05:30
babcfd62a3
chore(mix): add phx_gen_auth to dependencies
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-11 12:25:21 +05:30
59e55ff848
Revert "feat(user): add ecto migration for user"
This reverts commit 9613fcebde.
2021-08-09 14:38:20 +05:30
supercmmetry
9613fcebde
feat(user): add ecto migration for user
Signed-off-by: supercmmetry <vishaals2000@gmail.com>
2021-08-09 14:28:53 +05:30
supercmmetry
6f81702291
chore(git): Initial commit
Signed-off-by: supercmmetry <vishaals2000@gmail.com>
2021-08-09 14:18:23 +05:30