1
0
mirror of https://github.com/danbee/chess synced 2025-03-04 08:39:06 +00:00

Compare commits

...

125 Commits

Author SHA1 Message Date
8c5073ba5d Redesigned King piece 2023-01-30 23:17:44 -06:00
5cd457bc62 Switch default domain 2023-01-30 12:19:36 -06:00
27f5fc6730 Switch to Config module 2023-01-30 12:19:22 -06:00
d6ca73e4bd Will this work? 2023-01-30 11:52:33 -06:00
9909abd17f NodeJS version 14.20.1 2023-01-30 11:52:33 -06:00
6eb2a53695 Is this the right format? 2022-10-12 20:41:50 -05:00
9b0c75c2ce Update NodeJS version 2022-10-12 20:40:23 -05:00
7bf2312106 Update Elixir 2022-10-12 20:40:11 -05:00
1de19ae6c9 Mix buildpacks 2022-02-15 21:28:49 -06:00
fc83a1e16d 23.3.2 2022-02-15 21:07:16 -06:00
909d04f2a1 Add Gigalixir asset deploy script 2022-02-15 21:05:07 -06:00
6c51aa113f OTP? 2022-02-15 21:04:29 -06:00
a893dd3e85 Upgrade to latest Elixir/Erlang 2022-02-15 21:00:29 -06:00
c3e1206b58 Add :ssl to extra applications 2022-02-15 18:42:58 -06:00
14952a5d6c Add Runtime config 2022-02-15 18:37:53 -06:00
a83ee57e7b Switch to ESBuild and Dart-Sass 2022-02-15 18:37:33 -06:00
cfa472e13a Compatible Node version 2022-02-15 18:36:27 -06:00
1d7fb6c87b Migrate SASS to use new math.div function 2022-02-15 18:36:10 -06:00
d56502a001 Upgrade Phoenix 2022-02-15 12:46:08 -06:00
c766ecb63e Upgrade NodeJS buildpack 2021-07-22 10:30:25 -05:00
d2f646bb3d Upgrade Elixir and Erlang 2021-07-22 10:26:00 -05:00
c0d1ffee3a Get Webpack compiling the Sass 2021-07-12 11:14:49 -05:00
c5c78379b4 Upgrade stuff and switch to Webpack! 2021-06-24 16:41:09 -04:00
f62727bb1d Update Erlang version 2021-06-22 11:58:55 -04:00
dependabot[bot]
4922a736a7 Bump acorn from 5.7.3 to 5.7.4 in /assets
Bumps [acorn](https://github.com/acornjs/acorn) from 5.7.3 to 5.7.4.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/5.7.3...5.7.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-21 15:20:11 -04:00
dependabot[bot]
d80be5dbee Bump mixin-deep from 1.3.1 to 1.3.2 in /assets
Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](https://github.com/jonschlinkert/mixin-deep/compare/1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-21 14:00:57 -04:00
dependabot[bot]
f831cd79b3 Bump lodash.mergewith from 4.6.1 to 4.6.2 in /assets
Bumps [lodash.mergewith](https://github.com/lodash/lodash) from 4.6.1 to 4.6.2.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-21 14:00:41 -04:00
5a2daaf502
Fix some more upgrade issues 2021-01-05 13:08:38 -05:00
9993bd850e
Get Ecto working 2021-01-05 13:07:52 -05:00
c61b716728
Upgrade deps, fix a bunch of deprecations 2021-01-04 16:41:48 -05:00
ab69fce4c8
Config tweaks 2021-01-04 15:02:05 -05:00
794dbe1a8e
Upgrade Elixir 2021-01-04 15:00:00 -05:00
dependabot[bot]
73643983ab Bump lodash-es from 4.17.11 to 4.17.14 in /assets
Bumps [lodash-es](https://github.com/lodash/lodash) from 4.17.11 to 4.17.14.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.14)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-12 11:37:18 -04:00
dependabot[bot]
dbe8af26e7 Bump fstream from 1.0.11 to 1.0.12 in /assets
Bumps [fstream](https://github.com/npm/fstream) from 1.0.11 to 1.0.12.
- [Release notes](https://github.com/npm/fstream/releases)
- [Commits](https://github.com/npm/fstream/compare/v1.0.11...v1.0.12)
2020-08-12 11:37:00 -04:00
4be36943de
Oh FFS 2020-08-11 17:13:25 -04:00
6fceaadda5
Blegh 2020-08-11 17:08:08 -04:00
334e9b6ef8
Remove Procfile 2020-08-11 15:59:13 -04:00
c8b3516d62
Re-add Distillery 2020-08-11 15:55:13 -04:00
7a81ffad0b
Can we deploy without Distillery? 2020-08-11 15:49:54 -04:00
639771295c
Fix deploy 2020-08-11 14:59:34 -04:00
1656bd482d
Update Distillery 2020-08-04 11:20:41 -04:00
dependabot-preview[bot]
1c1505e14b
Merge pull request #229 from danbee/dependabot/hex/credo-1.4.0 2020-04-20 05:59:00 +00:00
dependabot-preview[bot]
9950abc459
Bump credo from 1.3.1 to 1.4.0
Bumps [credo](https://github.com/rrrene/credo) from 1.3.1 to 1.4.0.
- [Release notes](https://github.com/rrrene/credo/releases)
- [Changelog](https://github.com/rrrene/credo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rrrene/credo/compare/v1.3.1...v1.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-20 05:52:20 +00:00
dependabot-preview[bot]
20be172991
Merge pull request #219 from danbee/dependabot/hex/credo-1.3.1 2020-03-16 05:31:58 +00:00
dependabot-preview[bot]
fbab45f84d
Bump credo from 1.3.0 to 1.3.1
Bumps [credo](https://github.com/rrrene/credo) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/rrrene/credo/releases)
- [Changelog](https://github.com/rrrene/credo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rrrene/credo/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-16 05:22:27 +00:00
dependabot-preview[bot]
537c5f0d17
Merge pull request #216 from danbee/dependabot/hex/credo-1.3.0 2020-03-10 05:23:26 +00:00
dependabot-preview[bot]
93c7c23bc0
Bump credo from 1.2.3 to 1.3.0
Bumps [credo](https://github.com/rrrene/credo) from 1.2.3 to 1.3.0.
- [Release notes](https://github.com/rrrene/credo/releases)
- [Changelog](https://github.com/rrrene/credo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rrrene/credo/compare/v1.2.3...v1.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-10 05:15:24 +00:00
dependabot-preview[bot]
1cc7eafde7
Merge pull request #209 from danbee/dependabot/hex/credo-1.2.3 2020-03-02 05:45:32 +00:00
dependabot-preview[bot]
335239aba1
Bump credo from 1.2.2 to 1.2.3
Bumps [credo](https://github.com/rrrene/credo) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/rrrene/credo/releases)
- [Changelog](https://github.com/rrrene/credo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rrrene/credo/compare/v1.2.2...v1.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 05:29:37 +00:00
dependabot-preview[bot]
803386f759
Merge pull request #202 from danbee/dependabot/hex/credo-1.2.2 2020-02-03 05:47:50 +00:00
dependabot-preview[bot]
b26b0320af
Bump credo from 1.2.1 to 1.2.2
Bumps [credo](https://github.com/rrrene/credo) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/rrrene/credo/releases)
- [Changelog](https://github.com/rrrene/credo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rrrene/credo/compare/v1.2.1...v1.2.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-03 05:40:36 +00:00
dependabot-preview[bot]
4241dc150a
Merge pull request #198 from danbee/dependabot/hex/credo-1.2.1 2020-01-29 05:21:24 +00:00
dependabot-preview[bot]
5f6bd37c11
Bump credo from 1.2.0 to 1.2.1
Bumps [credo](https://github.com/rrrene/credo) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/rrrene/credo/releases)
- [Changelog](https://github.com/rrrene/credo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rrrene/credo/compare/v1.2.0...v1.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-29 05:12:34 +00:00
dependabot-preview[bot]
1cd3f19372
Merge pull request #197 from danbee/dependabot/hex/credo-1.2.0 2020-01-28 05:19:41 +00:00
dependabot-preview[bot]
2778b9d163
Bump credo from 1.1.5 to 1.2.0
Bumps [credo](https://github.com/rrrene/credo) from 1.1.5 to 1.2.0.
- [Release notes](https://github.com/rrrene/credo/releases)
- [Changelog](https://github.com/rrrene/credo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rrrene/credo/compare/v1.1.5...v1.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-28 05:11:52 +00:00
dependabot-preview[bot]
4dca323001
Merge pull request #178 from danbee/dependabot/hex/credo-1.1.5 2019-10-10 06:11:05 +00:00
dependabot-preview[bot]
6cfc423677
Bump credo from 1.1.4 to 1.1.5
Bumps [credo](https://github.com/rrrene/credo) from 1.1.4 to 1.1.5.
- [Release notes](https://github.com/rrrene/credo/releases)
- [Changelog](https://github.com/rrrene/credo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rrrene/credo/compare/v1.1.4...v1.1.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-10 06:04:37 +00:00
dependabot-preview[bot]
ae45f2a67b
Merge pull request #174 from danbee/dependabot/hex/credo-1.1.4 2019-09-02 05:31:15 +00:00
dependabot-preview[bot]
aa3dc24a8a
Bump credo from 1.1.3 to 1.1.4
Bumps [credo](https://github.com/rrrene/credo) from 1.1.3 to 1.1.4.
- [Release notes](https://github.com/rrrene/credo/releases)
- [Changelog](https://github.com/rrrene/credo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rrrene/credo/compare/v1.1.3...v1.1.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-02 05:25:30 +00:00
dependabot-preview[bot]
092c037f92
Merge pull request #171 from danbee/dependabot/hex/credo-1.1.3 2019-08-21 05:39:30 +00:00
dependabot-preview[bot]
9aef28f10e
Bump credo from 1.1.1 to 1.1.3
Bumps [credo](https://github.com/rrrene/credo) from 1.1.1 to 1.1.3.
- [Release notes](https://github.com/rrrene/credo/releases)
- [Changelog](https://github.com/rrrene/credo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rrrene/credo/compare/v1.1.1...v1.1.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-21 05:32:16 +00:00
dependabot-preview[bot]
f0ba63a849
Merge pull request #161 from danbee/dependabot/hex/credo-1.1.1 2019-07-17 05:25:36 +00:00
dependabot-preview[bot]
092001eb72
Bump credo from 1.1.0 to 1.1.1
Bumps [credo](https://github.com/rrrene/credo) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/rrrene/credo/releases)
- [Changelog](https://github.com/rrrene/credo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rrrene/credo/compare/v1.1.0...v1.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-17 05:18:01 +00:00
dependabot-preview[bot]
4592deaeea
Merge pull request #152 from danbee/dependabot/hex/timex_ecto-3.4.0 2019-07-02 05:49:59 +00:00
dependabot-preview[bot]
3ad3b4756b
Bump timex_ecto from 3.3.0 to 3.4.0
Bumps [timex_ecto](https://github.com/bitwalker/timex_ecto) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/bitwalker/timex_ecto/releases)
- [Changelog](https://github.com/bitwalker/timex_ecto/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bitwalker/timex_ecto/compare/3.3.0...3.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-02 05:25:22 +00:00
dependabot-preview[bot]
7f90359e84
Merge pull request #151 from danbee/dependabot/hex/distillery-2.1.1 2019-07-02 05:23:45 +00:00
dependabot-preview[bot]
8ca9778121
Bump distillery from 2.1.0 to 2.1.1
Bumps [distillery](https://github.com/bitwalker/distillery) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/bitwalker/distillery/releases)
- [Changelog](https://github.com/bitwalker/distillery/blob/master/docs/changelog.md)
- [Commits](https://github.com/bitwalker/distillery/compare/2.1.0...2.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-02 05:16:12 +00:00
dependabot-preview[bot]
8ba33a27c6
Merge pull request #148 from danbee/dependabot/hex/distillery-2.1.0 2019-06-25 05:32:14 +00:00
dependabot-preview[bot]
60874d1247
Bump distillery from 2.0.14 to 2.1.0
Bumps [distillery](https://github.com/bitwalker/distillery) from 2.0.14 to 2.1.0.
- [Release notes](https://github.com/bitwalker/distillery/releases)
- [Changelog](https://github.com/bitwalker/distillery/blob/master/docs/changelog.md)
- [Commits](https://github.com/bitwalker/distillery/compare/2.0.14...2.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-25 05:19:41 +00:00
dependabot-preview[bot]
485e97396b
Merge pull request #142 from danbee/dependabot/hex/credo-1.1.0 2019-06-11 06:42:23 +00:00
dependabot-preview[bot]
b19358e37a
Bump credo from 1.0.5 to 1.1.0
Bumps [credo](https://github.com/rrrene/credo) from 1.0.5 to 1.1.0.
- [Release notes](https://github.com/rrrene/credo/releases)
- [Changelog](https://github.com/rrrene/credo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rrrene/credo/compare/v1.0.5...v1.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-11 06:35:51 +00:00
e319dda506
Set NodeJS version and fix FOBST 2019-06-06 22:13:14 -04:00
a60d7404d8
Ignore .elixir_ls 2019-06-06 21:27:09 -04:00
a82d739f19
Update tzdata 2019-06-06 21:26:20 -04:00
dependabot-preview[bot]
c749a5e9fe
Merge pull request #134 from danbee/dependabot/hex/distillery-2.0.14 2019-05-31 12:48:52 +00:00
dependabot[bot]
f30a9895d1
Bump distillery from 2.0.12 to 2.0.14
Bumps [distillery](https://github.com/bitwalker/distillery) from 2.0.12 to 2.0.14.
- [Release notes](https://github.com/bitwalker/distillery/releases)
- [Changelog](https://github.com/bitwalker/distillery/blob/master/docs/changelog.md)
- [Commits](https://github.com/bitwalker/distillery/compare/2.0.12...2.0.14)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-20 05:30:13 +00:00
dependabot[bot]
031fe6a8c5 Bump credo from 1.0.0 to 1.0.5
Bumps [credo](https://github.com/rrrene/credo) from 1.0.0 to 1.0.5.
- [Release notes](https://github.com/rrrene/credo/releases)
- [Changelog](https://github.com/rrrene/credo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rrrene/credo/compare/v1.0.0...v1.0.5)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-13 09:06:37 -04:00
dependabot[bot]
330290708e Bump wallaby from 0.21.0 to 0.22.0
Bumps [wallaby](https://github.com/keathley/wallaby) from 0.21.0 to 0.22.0.
- [Release notes](https://github.com/keathley/wallaby/releases)
- [Changelog](https://github.com/keathley/wallaby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/keathley/wallaby/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-13 09:06:27 -04:00
dependabot[bot]
1b99c5e996 Bump phoenix_pubsub from 1.1.1 to 1.1.2
Bumps [phoenix_pubsub](https://github.com/phoenixframework/phoenix_pubsub) from 1.1.1 to 1.1.2.
- [Release notes](https://github.com/phoenixframework/phoenix_pubsub/releases)
- [Changelog](https://github.com/phoenixframework/phoenix_pubsub/blob/master/CHANGELOG.md)
- [Commits](https://github.com/phoenixframework/phoenix_pubsub/compare/v1.1.1...v1.1.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-13 09:06:12 -04:00
9304ba44cb
Use Yarn to install JS dependencies
I thought I was already doing this?!?
2019-05-09 08:51:31 -04:00
dependabot[bot]
950b72b697 Bump comeonin from 4.1.1 to 4.1.2
Bumps [comeonin](https://github.com/riverrun/comeonin) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/riverrun/comeonin/releases)
- [Changelog](https://github.com/riverrun/comeonin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/riverrun/comeonin/compare/v4.1.1...v4.1.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-17 17:36:40 -05:00
dependabot[bot]
07a81be9a7 Bump distillery from 2.0.10 to 2.0.12
Bumps [distillery](https://github.com/bitwalker/distillery) from 2.0.10 to 2.0.12.
- [Release notes](https://github.com/bitwalker/distillery/releases)
- [Changelog](https://github.com/bitwalker/distillery/blob/master/docs/changelog.md)
- [Commits](https://github.com/bitwalker/distillery/compare/2.0.10...2.0.12)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-12 17:09:43 -05:00
dependabot[bot]
0d08d4b59e Bump wallaby from 0.20.0 to 0.21.0
Bumps [wallaby](https://github.com/keathley/wallaby) from 0.20.0 to 0.21.0.
- [Release notes](https://github.com/keathley/wallaby/releases)
- [Changelog](https://github.com/keathley/wallaby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/keathley/wallaby/compare/v0.20.0...v0.21.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-12 14:45:06 -05:00
dependabot[bot]
84529fd7bb Bump credo from 0.10.2 to 1.0.0
Bumps [credo](https://github.com/rrrene/credo) from 0.10.2 to 1.0.0.
- [Release notes](https://github.com/rrrene/credo/releases)
- [Changelog](https://github.com/rrrene/credo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rrrene/credo/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-12 14:44:56 -05:00
dependabot[bot]
5606c141bd Bump argon2_elixir from 1.3.1 to 1.3.3
Bumps [argon2_elixir](https://github.com/riverrun/argon2_elixir) from 1.3.1 to 1.3.3.
- [Release notes](https://github.com/riverrun/argon2_elixir/releases)
- [Changelog](https://github.com/riverrun/argon2_elixir/blob/master/CHANGELOG.md)
- [Commits](https://github.com/riverrun/argon2_elixir/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-12 14:44:46 -05:00
dependabot[bot]
6b57ae068a Bump gettext from 0.16.0 to 0.16.1
Bumps [gettext](https://github.com/elixir-lang/gettext) from 0.16.0 to 0.16.1.
- [Release notes](https://github.com/elixir-lang/gettext/releases)
- [Changelog](https://github.com/elixir-lang/gettext/blob/master/CHANGELOG.md)
- [Commits](https://github.com/elixir-lang/gettext/compare/v0.16.0...v0.16.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-12 14:44:36 -05:00
dependabot[bot]
73595eaa07 Bump phoenix_pubsub from 1.1.0 to 1.1.1
Bumps [phoenix_pubsub](https://github.com/phoenixframework/phoenix_pubsub) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/phoenixframework/phoenix_pubsub/releases)
- [Changelog](https://github.com/phoenixframework/phoenix_pubsub/blob/master/CHANGELOG.md)
- [Commits](https://github.com/phoenixframework/phoenix_pubsub/compare/v1.1.0...v1.1.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-12 14:34:15 -05:00
dependabot[bot]
33c268d733 Bump phoenix_live_reload from 1.1.5 to 1.1.7
Bumps [phoenix_live_reload](https://github.com/phoenixframework/phoenix_live_reload) from 1.1.5 to 1.1.7.
- [Release notes](https://github.com/phoenixframework/phoenix_live_reload/releases)
- [Changelog](https://github.com/phoenixframework/phoenix_live_reload/blob/master/CHANGELOG.md)
- [Commits](https://github.com/phoenixframework/phoenix_live_reload/compare/v1.1.5...v1.1.7)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-11 14:13:23 -05:00
60d6888507
'bout time we bumped the version number 2018-10-12 17:16:05 -04:00
d618bfd05b
Specify NodeJS version 2018-10-12 17:12:05 -04:00
8ca3d7fc86
Add Babel core 2018-10-12 16:35:15 -04:00
bab4520f86
Some cleanup 2018-10-12 16:21:10 -04:00
ba0c1c5f47
Align Babel targets with browsers that have CSS grid support 2018-10-12 16:21:10 -04:00
d02ec2b377
Add search icon to player finder 2018-10-12 16:21:10 -04:00
5aedecc9d5
Don't need to target anything but PhantomJS in test 2018-10-12 16:21:10 -04:00
9534abffc8
Handle up/down arrow keys for selecting opponent 2018-10-12 16:21:10 -04:00
e21042c35b
Adjust Javascript build config 2018-10-12 16:21:10 -04:00
41c9e28457
Fix up specs for opponent finder 2018-10-12 16:21:10 -04:00
ecf87aa632
Add queries for finding opponents 2018-10-12 16:21:10 -04:00
9349af64a0
We are treating name as more like a username
Therefore it should be a unique way of identifying a user.
2018-10-12 16:21:10 -04:00
bc95773c8f
Update Elixir version in buildpack 2018-10-12 13:07:53 -04:00
b5e0d41756
Sign in a newly registered user 2018-09-28 13:47:28 -04:00
dependabot[bot]
c06493e896 Bump credo from 0.10.1 to 0.10.2
Bumps [credo](https://github.com/rrrene/credo) from 0.10.1 to 0.10.2.
- [Release notes](https://github.com/rrrene/credo/releases)
- [Changelog](https://github.com/rrrene/credo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rrrene/credo/compare/v0.10.1...v0.10.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-09-26 16:44:54 -04:00
dependabot[bot]
8f33d47727 Bump distillery from 2.0.9 to 2.0.10
Bumps [distillery](https://github.com/bitwalker/distillery) from 2.0.9 to 2.0.10.
- [Release notes](https://github.com/bitwalker/distillery/releases)
- [Changelog](https://github.com/bitwalker/distillery/blob/master/docs/changelog.md)
- [Commits](https://github.com/bitwalker/distillery/compare/2.0.9...2.0.10)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-09-21 09:28:34 -04:00
dependabot[bot]
4922c9ef22 Bump credo from 0.10.0 to 0.10.1
Bumps [credo](https://github.com/rrrene/credo) from 0.10.0 to 0.10.1.
- [Release notes](https://github.com/rrrene/credo/releases)
- [Changelog](https://github.com/rrrene/credo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rrrene/credo/compare/v0.10.0...v0.10.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-09-21 09:28:25 -04:00
922edd0093
Fix URL configuration for emails 2018-09-16 17:19:19 -04:00
bedd6605ef
Redesign whole site in B&W
* Forms and board tweaks for small screen sizes
* Re-style game status indicators
* Re-style viewing/offline indicator
* Better eyecons 👁
* Re-organise CSS according to ITCSS principles
* Pick new font from Google Fonts
* Fix up tests
* Move some things into partials
2018-09-16 14:02:52 -04:00
bcb6e40ee7
Merge pull request #81 from danbee/dependabot/hex/gettext-0.16.0
Bump gettext from 0.15.0 to 0.16.0
2018-09-11 14:18:54 -04:00
4982707355
Redirect to canonical domain 2018-09-10 20:21:48 -04:00
dependabot[bot]
8d0c861820
Bump gettext from 0.15.0 to 0.16.0
Bumps [gettext](https://github.com/elixir-lang/gettext) from 0.15.0 to 0.16.0.
- [Release notes](https://github.com/elixir-lang/gettext/releases)
- [Changelog](https://github.com/elixir-lang/gettext/blob/master/CHANGELOG.md)
- [Commits](https://github.com/elixir-lang/gettext/compare/v0.15.0...v0.16.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-09-09 23:45:18 +00:00
a39a7e7cc9
Use ENV vars for Mailgun config 2018-09-09 19:44:17 -04:00
e5575c42f4
Use Mailgun adapter in production 2018-09-09 19:40:19 -04:00
45a40e0900
💄 2018-09-09 19:36:55 -04:00
c059d4c13d
Some tidy up 2018-09-09 19:28:31 -04:00
ae3ecefcf7
Move Presences to their own class 2018-09-09 15:48:03 -04:00
8538aad2f6
Address the Hound 2018-09-09 10:08:22 -04:00
27a4492432
The password "ganonsucks" was causing Argon2 errors
No idea why this was!
2018-09-08 16:57:42 -04:00
6ee029fa23
Send opponent an email if they're offline 2018-09-08 16:57:20 -04:00
3f1241e3a7
🤓 2018-09-08 16:57:19 -04:00
7280c98cc9
Show user status 2018-09-08 16:57:19 -04:00
eb28da621e
Add first few channel tests 2018-09-08 16:56:52 -04:00
b500ac5068
Add socket authentication tests 2018-09-08 16:56:52 -04:00
95b565231a
Adjust email and test for subject 2018-09-08 16:56:52 -04:00
2bf71e882f
Send email to opponent when new game is created 2018-09-08 16:56:52 -04:00
4fa3babaa0
Add Bamboo 2018-09-08 16:56:52 -04:00
180 changed files with 2609 additions and 4869 deletions

View File

@ -1,4 +1,3 @@
https://github.com/gigalixir/gigalixir-buildpack-clean-cache.git
https://github.com/HashNuke/heroku-buildpack-elixir
https://github.com/gjaldon/heroku-buildpack-phoenix-static
https://github.com/gigalixir/gigalixir-buildpack-distillery.git
https://github.com/gigalixir/gigalixir-buildpack-mix.git

1
.gitignore vendored
View File

@ -3,6 +3,7 @@
/db
/deps
/*.ez
/.elixir_ls
# Generated on crash by the VM
erl_crash.dump

View File

@ -1,2 +1,4 @@
elixir 1.6.6
python 2.7.14
elixir 1.14.1
python 3.9.1
nodejs 16.14.0
erlang 24.2.1

3
assets/.babelrc Normal file
View File

@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-react"]
}

View File

@ -1,70 +0,0 @@
exports.config = {
// See http://brunch.io/#documentation for docs.
files: {
javascripts: {
joinTo: {
"js/app.js": /^js/,
"js/vendor.js": /^(?!js)/,
},
},
stylesheets: {
joinTo: "css/app.css",
order: {
after: ["web/static/css/app.css"], // concat app.css last
},
},
templates: {
joinTo: "js/app.js",
},
},
conventions: {
// This option sets where we should place non-css and non-js assets in.
// By default, we set this to "/assets/static". Files in this directory
// will be copied to `paths.public`, which is "priv/static" by default.
assets: /^(static)/,
},
// Phoenix paths configuration
paths: {
// Dependencies and current project directories to watch
watched: ["static", "css", "js", "vendor"],
// Where to compile files to
public: "../priv/static",
},
// Configure your plugins
plugins: {
sass: {
mode: "native",
},
babel: {
plugins: [
"transform-object-rest-spread",
"transform-class-properties",
],
presets: [
[
"env", {
"browsers": ["> 5% in US"],
"useBuiltIns": true,
},
],
"es2015",
"react",
],
ignore: [/vendor/],
},
},
modules: {
autoRequire: {
"js/app.js": ["js/app"],
},
},
npm: {
enabled: true,
},
};

View File

@ -1,222 +0,0 @@
@mixin move-indicator {
border-radius: 50%;
content: "";
display: block;
height: 2%;
position: absolute;
right: 2%;
width: 2%;
}
.board {
background: lighten($black-square-color, 7%);
border-collapse: unset;
border-radius: 2.8%;
border-spacing: 1px;
box-shadow: 0 calc(var(--board-size) / 200) calc(var(--board-size) / 40) $board-shadow-color;
color: $white-square-color;
grid-area: board;
height: var(--board-size);
padding: calc(var(--board-size) / 20);
position: relative;
width: var(--board-size);
&.white-to-move::before {
@include move-indicator;
background: $white;
}
&.black-to-move::before {
@include move-indicator;
background: $black;
}
&.player-is-white.white-to-move::before,
&.player-is-black.black-to-move::before {
bottom: 2%;
}
&.player-is-white.black-to-move::before,
&.player-is-black.white-to-move::before {
top: 2%;
}
.board-rank-labels,
.board-file-labels {
display: none;
}
&.player-is-white {
.board-rank-labels {
display: flex;
flex-direction: column-reverse;
}
.board-file-labels {
display: flex;
flex-direction: row;
}
}
&.player-is-black {
.board-rank-labels {
display: flex;
flex-direction: column;
}
.board-file-labels {
display: flex;
flex-direction: row-reverse;
}
}
}
.board-rank-labels {
display: flex;
height: 90%;
left: 0;
position: absolute;
width: 5%;
}
.board-file-labels {
display: flex;
height: 5%;
position: absolute;
top: 0;
width: 90%;
}
.board-game-state {
align-items: center;
background-color: $game-state-background-color;
border-radius: calc(var(--board-size) / 75);
bottom: -2.5%;
box-shadow: 0 calc(var(--board-size) / 200) calc(var(--board-size) / 40) $board-shadow-color, inset 0 0 0 calc(var(--board-size) / 300) $white-square-color;
color: $foreground-color;
display: none;
font-size: calc(var(--board-size) / 40);
height: 6%;
justify-content: center;
position: absolute;
right: 5%;
width: 15%;
&.check,
&.checkmate,
&.stalemate {
display: block; // So PhantomJS will display it.
display: flex;
}
&.checkmate,
&.stalemate {
font-size: calc(var(--board-size) / 30);
height: 7.5%;
left: calc(50% - 15%);
top: calc(50% - 3.5%);
width: 30%;
}
}
.board-label {
align-items: center;
display: flex;
flex-grow: 1;
justify-content: center;
}
.board-body {
display: grid;
grid-template-columns: repeat(8, 1fr);
grid-template-rows: repeat(8, 1fr);
height: 100%;
width: 100%;
}
%black-square {
background-color: $black-square-color;
&.selected {
background-color: mix($black-square-color, $selected-square-color, 60%);
box-shadow: inset 0 0 0 calc(var(--board-size) / 400) $selected-outline-color;
}
&.available {
background-color: mix($black-square-color, $available-square-color, 80%);
box-shadow: inset 0 0 0 calc(var(--board-size) / 400) $available-outline-color;
}
}
%white-square {
background-color: $white-square-color;
&.selected {
background-color: mix($white-square-color, $selected-square-color, 60%);
box-shadow: inset 0 0 0 calc(var(--board-size) / 400) $selected-outline-color;
}
&.available {
background-color: mix($white-square-color, $available-square-color, 80%);
box-shadow: inset 0 0 0 calc(var(--board-size) / 400) $available-outline-color;
}
}
.board-square {
background-position: center;
background-repeat: no-repeat;
background-size: 100%;
border-radius: 2%;
margin: 0.5px;
// This is to ensure the squares can be clicked on in PhantomJS
// TODO: Figure out why we need this
min-height: 20px;
min-width: 20px;
@include odd-between(1, 8) { @extend %white-square; }
@include even-between(1, 8) { @extend %black-square; }
@include odd-between(9, 16) { @extend %black-square; }
@include even-between(9, 16) { @extend %white-square; }
@include odd-between(17, 24) { @extend %white-square; }
@include even-between(17, 24) { @extend %black-square; }
@include odd-between(25, 32) { @extend %black-square; }
@include even-between(25, 32) { @extend %white-square; }
@include odd-between(33, 40) { @extend %white-square; }
@include even-between(33, 40) { @extend %black-square; }
@include odd-between(41, 48) { @extend %black-square; }
@include even-between(41, 48) { @extend %white-square; }
@include odd-between(49, 56) { @extend %white-square; }
@include even-between(49, 56) { @extend %black-square; }
@include odd-between(57, 64) { @extend %black-square; }
@include even-between(57, 64) { @extend %white-square; }
@each $colour in $colours {
@each $piece in $pieces {
&.#{$colour}.#{$piece} {
background-image: url(/images/#{$piece}_#{$colour}.svg);
}
}
}
}
@media (min-width: 480px) {
.board-body {
grid-gap: 1px;
}
}
@media (min-width: 768px) {
.board-body {
grid-gap: 2px;
}
}

View File

@ -1,8 +0,0 @@
.form {
background-color: $form-background-color;
border-radius: $base-border-radius;
border: 1px solid rgba(255, 255, 255, 0.2);
margin: 0 auto;
max-width: 40rem;
padding: $base-spacing;
}

View File

@ -1,3 +0,0 @@
.game-info {
grid-area: game-info;
}

View File

@ -1,11 +0,0 @@
.player-indicator {
img {
height: 1.5em;
vertical-align: middle;
}
}
.your-turn {
background-color: $your-turn-background-color;
font-weight: bold;
}

View File

@ -1,18 +0,0 @@
h1,
h2,
h3,
h4 {
font-weight: 300;
}
h1 {
font-size: 1.6em;
margin: 0;
}
.heading {
font-family: $heading-font-family;
font-size: modular-scale(1);
line-height: $heading-line-height;
margin: 0 0 $small-spacing;
}

View File

@ -1,22 +0,0 @@
html {
background: $background-color;
color: mix($background-color, $foreground-color, 20%);
font-weight: 300;
}
a {
color: mix($background-color, $link-color, 30%);
}
main {
margin-top: 5vmin;
}
.container {
margin: 0 auto;
width: 90%;
}
.form-group {
margin-top: 2em;
}

View File

@ -1,27 +0,0 @@
[role='banner'] {
background: $black;
margin-bottom: 1em;
padding: 0.5em 0;
.container {
display: flex;
}
h1 {
flex: 0;
}
a {
color: $white;
text-decoration: none;
&:hover {
color: $link-color;
}
}
.user-nav {
flex: 1;
text-align: right;
}
}

View File

@ -1,48 +0,0 @@
$black: #000;
$white: #fff;
$background-color: #1e3f51;
$foreground-color: $white;
$link-color: #fd0;
$form-background-color: darken($background-color, 4%);
$board-border-color: #000;
$board-shadow-color: rgba(0, 0, 0, 0.4);
$board-square-size: 9vmin;
$base-font-size: 16px;
$black-square-color: #777;
$white-square-color: #bbb;
$selected-square-color: #0cf;
$available-square-color: #6f0;
$your-turn-background-color: rgba($white, 0.1);
$game-state-background-color: rgba(darken($black-square-color, 10%), 0.9);
$square-outline-color: darken($black-square-color, 20%);
$selected-outline-color: lighten($selected-square-color, 20%);
$available-outline-color: rgba(lighten($available-square-color, 20%), 0.5);
$colours: "black" "white";
$pieces: king queen bishop knight rook pawn;
:root {
--board-size: 64vw;
}
@media (min-aspect-ratio: 14/11) {
:root {
--board-size: 80vmin;
}
}
@media (max-aspect-ratio: 9/11) {
:root {
--board-size: 90vmin;
}
}

View File

@ -1,20 +1,58 @@
@import "bourbon/bourbon";
// 0. Vendor - Imported from other source
@import "vendor/bourbon/bourbon";
@import "vendor/family";
@import "base/base";
@import "variables";
// 1. Settings used with preprocessors and contain font,
// colors definitions, etc.
@import "settings/colors";
@import "settings/typography";
@import "settings/forms";
@import "settings/global";
@import "settings/chess";
@import "settings/board";
@import "utilities";
// 2. Tools globally used mixins and functions.
// Its important not to output any CSS in the first 2 layers.
@import "tables";
@import "headings";
@import "forms";
// 3. Generic reset and/or normalize styles, box-sizing definition, etc.
// This is the first layer which generates actual CSS.
@import "generic/typography";
@import "generic/layout";
@import "layout";
@import "nav";
// 4. Elements styling for bare HTML elements (like H1, A, etc.).
// These come with default styling from the browser so we can redefine
// them here.
@import "elements/main";
@import "elements/headings";
@import "elements/paragraphs";
@import "elements/links";
@import "elements/lists";
@import "elements/tables";
@import "elements/forms";
@import "elements/buttons";
@import "game_list";
@import "board";
@import "move_list";
@import "game_info";
@import "game_grid";
// 5. Objects class-based selectors which define undecorated design patterns,
// for example media object known from OOCSS
@import "objects/container";
@import "objects/form";
@import "objects/form-group";
@import "objects/tables";
// 6. Components specific UI components.
// This is where majority of our work takes place and our UI components
// are often composed of Objects and Components
@import "components/nav";
@import "components/board";
@import "components/square";
@import "components/game-list";
@import "components/game-grid";
@import "components/game-info";
@import "components/move-list";
@import "components/game-state";
@import "components/player-finder";
@import "components/search-input";
// 7. Utilities utilities and helper classes with ability to override
// anything which goes before in the triangle, eg. hide helper class
@import "utilities/visually-hidden";
@import "utilities/text-right";

View File

@ -1,14 +0,0 @@
// Bitters 1.8.0
// http://bitters.bourbon.io
// Copyright 2013-2017 thoughtbot, inc.
// MIT License
@import "variables";
@import "buttons";
@import "forms";
@import "layout";
@import "lists";
@import "media";
@import "tables";
@import "typography";

View File

@ -1,9 +0,0 @@
figure {
margin: 0;
}
img,
picture {
margin: 0;
max-width: 100%;
}

View File

@ -1,45 +0,0 @@
html {
color: $base-font-color;
font-family: $base-font-family;
font-size: 100%;
line-height: $base-line-height;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: $heading-font-family;
font-size: modular-scale(1);
line-height: $heading-line-height;
margin: 0 0 $small-spacing;
}
p {
margin: $small-spacing 0 $small-spacing;
}
a {
color: $action-color;
text-decoration-skip: ink;
transition: color $base-duration $base-timing;
&:hover {
color: shade($action-color, 25%);
}
&:focus {
outline: $focus-outline;
outline-offset: $focus-outline-offset;
}
}
hr {
border-bottom: $base-border;
border-left: 0;
border-right: 0;
border-top: 0;
margin: $base-spacing 0;
}

View File

@ -1,41 +0,0 @@
// Typography
$base-font-family: $font-stack-system;
$heading-font-family: $base-font-family;
// Line height
$base-line-height: 1.5;
$heading-line-height: 1.2;
// Other Sizes
$base-border-radius: 0.5rem;
$base-spacing: 2em;
$small-spacing: $base-spacing / 2;
$x-small-spacing: $small-spacing / 2;
$base-z-index: 0;
// Colors
$blue: #1565c0;
$dark-gray: #333;
$medium-gray: #999;
$light-gray: #ddd;
// Font Colors
$base-font-color: $light-gray;
$action-color: $light-gray;
// Border
$base-border-color: $light-gray;
$base-border: 1px solid $base-border-color;
// Background Colors
$viewport-background-color: #fff;
// Focus
$focus-outline-color: transparentize($action-color, 0.4);
$focus-outline-width: 3px;
$focus-outline: $focus-outline-width solid $focus-outline-color;
$focus-outline-offset: 2px;
// Animations
$base-duration: 150ms;
$base-timing: ease;

View File

@ -0,0 +1,139 @@
@mixin move-indicator {
border-radius: 50%;
content: "";
display: block;
height: 1.5%;
position: absolute;
right: 3%;
width: 1.5%;
}
.board {
background: $background-color;
border-collapse: unset;
border-radius: 2.8%;
border-spacing: 1px;
color: $foreground-color;
grid-area: board;
height: var(--board-size);
padding: calc(var(--board-size) / 20);
position: relative;
width: var(--board-size);
}
.board--white-to-move,
.board--black-to-move {
&::before {
@include move-indicator;
background: $foreground-color;
}
}
.board--player-is-white.board--white-to-move,
.board--player-is-black.board--black-to-move {
&::before {
bottom: 3%;
}
}
.board--player-is-white.board--black-to-move,
.board--player-is-black.board--white-to-move {
&::before {
top: 3%;
}
}
.board__rank-labels,
.board__file-labels {
display: none;
}
.board--player-is-white {
.board__rank-labels {
display: flex;
flex-direction: column-reverse;
}
.board__file-labels {
display: flex;
flex-direction: row;
}
}
.board--player-is-black {
.board__rank-labels {
display: flex;
flex-direction: column;
}
.board__file-labels {
display: flex;
flex-direction: row-reverse;
}
}
.board__body {
background: $background-color;
border: 0.25rem solid $foreground-color;
border-radius: calc(var(--board-size) / 100);
display: grid;
grid-template-columns: repeat(8, 1fr);
grid-template-rows: repeat(8, 1fr);
height: 100%;
padding: 1%;
width: 100%;
}
.board__rank-labels {
display: none;
height: 90%;
left: 0;
position: absolute;
width: 5%;
}
.board__file-labels {
display: none;
height: 5%;
position: absolute;
top: 0;
width: 90%;
}
.board__label {
align-items: center;
display: flex;
flex-grow: 1;
font-size: calc(0.25rem + (var(--board-size) / 50));
justify-content: center;
}
@media (max-aspect-ratio: 9/11) and (max-width: 640px),
(max-aspect-ratio: 9/11) and (max-height: 640px),
(min-aspect-ratio: 9/11) and (max-width: 720px),
(min-aspect-ratio: 9/11) and (max-height: 720px) {
.board__body {
border-width: 0.1875rem;
}
}
@media (max-aspect-ratio: 9/11) and (max-width: 480px),
(max-aspect-ratio: 9/11) and (max-height: 480px),
(min-aspect-ratio: 9/11) and (max-width: 560px),
(min-aspect-ratio: 9/11) and (max-height: 560px) {
.board__body {
border-width: 0.125rem;
}
}
@media (min-width: 480px) {
.board__body {
grid-gap: 1px;
}
}
@media (min-width: 768px) {
.board__body {
grid-gap: 2px;
}
}

View File

@ -26,15 +26,3 @@
grid-template-rows: min-content min-content min-content;
}
}
@media (max-height: 960px), (max-width: 768px) {
html {
font-size: 0.9em;
}
}
@media (max-height: 480px), (max-width: 400px) {
html {
font-size: 0.8em;
}
}

View File

@ -0,0 +1,8 @@
.game-info {
grid-area: game-info;
}
.game-info__opponent-status {
height: 1rem;
vertical-align: middle;
}

View File

@ -0,0 +1,11 @@
.games-list__player-indicator {
img {
height: 1.5em;
vertical-align: middle;
}
}
.games-list__your-turn {
background-color: $background-color;
font-weight: $heavy-font-weight;
}

View File

@ -0,0 +1,31 @@
.game-state {
align-items: center;
background-color: $foreground-color;
border-radius: calc(var(--board-size) / 100);
bottom: -2.5%;
box-shadow: 0 0 0 0.2rem $background-color;
color: $background-color;
display: none;
font-size: calc(var(--board-size) / 40);
height: 6%;
justify-content: center;
left: 5%;
position: absolute;
width: 15%;
}
.game-state--check,
.game-state--checkmate,
.game-state--stalemate {
display: block; // So PhantomJS will display it.
display: flex;
}
.game-state--checkmate,
.game-state--stalemate {
font-size: calc(var(--board-size) / 30);
height: 7.5%;
left: calc(50% - 15%);
top: calc(50% - 3.5%);
width: 30%;
}

View File

@ -4,7 +4,7 @@
}
.move-list__line-number {
color: mix($background-color, $foreground-color);
color: $foreground-color;
font-feature-settings: "tnum";
font-variant-numeric: tabular-nums;
}

View File

@ -0,0 +1,38 @@
.header {
background: $nav-background-color;
color: $nav-foreground-color;
margin-bottom: $small-spacing;
padding: $x-small-spacing 0;
.container {
align-items: flex-end;
display: flex;
}
a {
color: $nav-foreground-color;
text-decoration: underline dashed;
&:hover {
color: $nav-foreground-color;
text-decoration: underline;
}
}
}
.header__title {
flex: 0;
a {
text-decoration: none;
&:hover {
text-decoration: underline dashed;
}
}
}
.header__user-nav {
flex: 1;
text-align: right;
}

View File

@ -0,0 +1,25 @@
@use "sass:math";
.opponent-finder__result {
border-bottom: 1px dotted $black;
border-bottom-left-radius: $base-border-radius;
border-bottom-right-radius: $base-border-radius;
border-left: 1px dotted $black;
border-right: 1px dotted $black;
margin-top: -$small-spacing;
padding: math.div($small-spacing, 3);
}
.opponent-finder__result-item {
border-radius: $base-border-radius * 0.5;
cursor: pointer;
display: block;
padding: math.div($small-spacing, 3) $base-spacing * 0.5;
text-decoration: none;
&:hover,
&:focus {
background: $black;
color: $white;
}
}

View File

@ -0,0 +1,6 @@
.search-input {
background-image: url("../static/images/search-icon.svg");
background-position: center right 0.5rem;
background-repeat: no-repeat;
border: 1px solid $base-border-color;
}

View File

@ -0,0 +1,178 @@
%square--black {
background: repeating-linear-gradient(
45deg,
$background-color,
$background-color ($diagonal-pixel * 5),
$foreground-color ($diagonal-pixel * 5),
$foreground-color ($diagonal-pixel * 8)
);
&.square--selected {
box-shadow: inset 0 0 0 0.2rem $foreground-color,
inset 0 0 0 0.4rem $background-color;
}
&.square--available {
&::after {
border-radius: 50%;
bottom: 20%;
box-shadow: 0 0 0 0.2rem $foreground-color,
0 0 0 0.4rem $background-color,
inset 0 0 0 0.2rem $background-color;
content: "";
display: block;
left: 20%;
position: absolute;
right: 20%;
top: 20%;
}
}
}
%square--white {
background-color: $background-color;
&.square--selected {
box-shadow: inset 0 0 0 0.2rem $foreground-color;
}
&.square--available {
&::after {
border-radius: 50%;
bottom: 20%;
box-shadow: 0 0 0 0.2rem $foreground-color,
0 0 0 0.4rem $background-color,
inset 0 0 0 0.2rem $background-color;
content: "";
display: block;
left: 20%;
position: absolute;
right: 20%;
top: 20%;
}
}
}
.square {
border-radius: 4%;
margin: 0.5px;
position: relative;
// This is to ensure the squares can be clicked on in PhantomJS
// TODO: Figure out why we need this
min-height: 20px;
min-width: 20px;
@include odd-between(1, 8) { @extend %square--white; }
@include even-between(1, 8) { @extend %square--black; }
@include odd-between(9, 16) { @extend %square--black; }
@include even-between(9, 16) { @extend %square--white; }
@include odd-between(17, 24) { @extend %square--white; }
@include even-between(17, 24) { @extend %square--black; }
@include odd-between(25, 32) { @extend %square--black; }
@include even-between(25, 32) { @extend %square--white; }
@include odd-between(33, 40) { @extend %square--white; }
@include even-between(33, 40) { @extend %square--black; }
@include odd-between(41, 48) { @extend %square--black; }
@include even-between(41, 48) { @extend %square--white; }
@include odd-between(49, 56) { @extend %square--white; }
@include even-between(49, 56) { @extend %square--black; }
@include odd-between(57, 64) { @extend %square--black; }
@include even-between(57, 64) { @extend %square--white; }
&::before {
background-position: center;
background-repeat: no-repeat;
background-size: 100%;
bottom: 0;
content: "";
display: block;
left: 0;
position: absolute;
right: 0;
top: 0;
}
@each $colour in $colours {
@each $piece in $pieces {
&.square--#{$colour}.square--#{$piece}::before {
background-image: url("../static/images/#{$piece}_#{$colour}.svg");
}
}
}
}
@media (max-aspect-ratio: 9/11) and (max-width: 640px),
(max-aspect-ratio: 9/11) and (max-height: 640px),
(min-aspect-ratio: 9/11) and (max-width: 720px),
(min-aspect-ratio: 9/11) and (max-height: 720px) {
%square--black {
background: repeating-linear-gradient(
45deg,
$background-color,
$background-color ($diagonal-pixel * 3),
$foreground-color ($diagonal-pixel * 3),
$foreground-color ($diagonal-pixel * 5)
);
&.square--selected {
box-shadow: inset 0 0 0 0.15rem $foreground-color,
inset 0 0 0 0.3rem $background-color;
}
&.square--available::after {
box-shadow: 0 0 0 0.15rem $foreground-color,
0 0 0 0.3rem $background-color,
inset 0 0 0 0.15rem $background-color;
}
}
%square--white {
&.square--selected {
box-shadow: inset 0 0 0 0.15rem $foreground-color;
}
&.square--available::after {
box-shadow: 0 0 0 0.15rem $foreground-color,
0 0 0 0.3rem $background-color,
inset 0 0 0 0.15rem $background-color;
}
}
}
@media (max-aspect-ratio: 9/11) and (max-width: 480px),
(max-aspect-ratio: 9/11) and (max-height: 480px),
(min-aspect-ratio: 9/11) and (max-width: 560px),
(min-aspect-ratio: 9/11) and (max-height: 560px) {
%square--black {
&.square--selected {
box-shadow: inset 0 0 0 0.1rem $foreground-color,
inset 0 0 0 0.2rem $background-color;
}
&.square--available::after {
box-shadow: 0 0 0 0.1rem $foreground-color,
0 0 0 0.2rem $background-color,
inset 0 0 0 0.1rem $background-color;
}
}
%square--white {
&.square--selected {
box-shadow: inset 0 0 0 0.1rem $foreground-color;
}
&.available::after {
box-shadow: 0 0 0 0.1rem $foreground-color,
0 0 0 0.2rem $background-color,
inset 0 0 0 0.1rem $background-color;
}
}
}

View File

@ -1,6 +1,6 @@
$_button-border-color: $action-color;
$_button-background-color: rgba(0, 0, 0, 0);
$_button-background-color-hover: $action-color;
$_button-border-color: $foreground-color;
$_button-background-color: $foreground-color;
$_button-background-color-hover: $background-color;
#{$all-buttons} {
appearance: none;
@ -11,9 +11,8 @@ $_button-background-color-hover: $action-color;
cursor: pointer;
display: inline-block;
font-family: $base-font-family;
font-size: 16px;
-webkit-font-smoothing: antialiased;
font-weight: 600;
font-size: inherit;
font-weight: $base-font-weight;
line-height: 1;
padding: $small-spacing $base-spacing;
text-align: center;
@ -29,8 +28,8 @@ $_button-background-color-hover: $action-color;
}
&:focus {
outline: $focus-outline;
outline-offset: $focus-outline-offset;
background-color: $_button-background-color-hover;
color: contrast-switch($_button-background-color-hover);
}
&:disabled {

View File

@ -1,6 +1,6 @@
$_form-background-color: #fff;
$_form-box-shadow: inset 0 1px 3px rgba(#000, 0.06);
$_form-box-shadow-focus: $_form-box-shadow, 0 0 5px rgba($action-color, 0.7);
@use "sass:math";
$_form-background-color: $background-color;
fieldset {
background-color: transparent;
@ -10,15 +10,15 @@ fieldset {
}
legend {
font-weight: 600;
margin-bottom: $small-spacing / 2;
font-weight: $heavy-font-weight;
margin-bottom: $small-spacing * 0.5;
padding: 0;
}
label {
display: block;
font-weight: 600;
margin-bottom: $small-spacing / 2;
font-weight: $heavy-font-weight;
margin-bottom: $small-spacing * 0.5;
}
input,
@ -26,7 +26,7 @@ select,
textarea {
display: block;
font-family: $base-font-family;
font-size: 16px;
font-size: inherit;
}
#{$all-text-inputs} {
@ -34,25 +34,19 @@ textarea {
background-color: $_form-background-color;
border: $base-border;
border-radius: $base-border-radius;
box-shadow: $_form-box-shadow;
box-sizing: border-box;
color: $foreground-color;
margin-bottom: $small-spacing;
padding: $base-spacing / 3;
padding: math.div($base-spacing, 3);
transition: border-color $base-duration $base-timing;
width: 100%;
&:hover {
border-color: shade($base-border-color, 20%);
}
&:focus {
border-color: $action-color;
box-shadow: $_form-box-shadow-focus;
border: 1px solid $base-border-color;
outline: none;
}
&:disabled {
background-color: shade($_form-background-color, 5%);
cursor: not-allowed;
&:hover {
@ -61,7 +55,7 @@ textarea {
}
&::placeholder {
color: tint($base-font-color, 40%);
opacity: 1;
}
}
@ -72,7 +66,7 @@ textarea {
[type="checkbox"],
[type="radio"] {
display: inline;
margin-right: $small-spacing / 2;
margin-right: $x-small-spacing;
}
[type="file"] {
@ -84,13 +78,3 @@ select {
margin-bottom: $small-spacing;
width: 100%;
}
[type="checkbox"],
[type="radio"],
[type="file"],
select {
&:focus {
outline: $focus-outline;
outline-offset: $focus-outline-offset;
}
}

View File

@ -0,0 +1,24 @@
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: $heading-font-family;
font-size: modular-scale(1);
line-height: $heading-line-height;
margin: 0 0 $small-spacing;
}
h1 {
font-size: modular-scale(2);
font-weight: $base-font-weight;
margin: 0;
}
.heading {
font-family: $heading-font-family;
font-size: modular-scale(1);
line-height: $heading-line-height;
margin: 0 0 $small-spacing;
}

View File

@ -0,0 +1,3 @@
a {
color: $foreground-color;
}

View File

@ -10,7 +10,7 @@ dl {
}
dt {
font-weight: 600;
font-weight: $heavy-font-weight;
margin: 0;
}

View File

@ -0,0 +1,3 @@
main {
margin-top: 5vmin;
}

View File

@ -0,0 +1,3 @@
p {
margin: $small-spacing 0;
}

View File

@ -19,10 +19,11 @@ tr {
}
th {
font-weight: 600;
font-weight: $heavy-font-weight;
}
th,
td {
padding: $x-small-spacing;
}

View File

@ -1,6 +1,8 @@
html {
background-color: $viewport-background-color;
background: $background-color;
box-sizing: border-box;
color: $foreground-color;
font-weight: $base-font-weight;
}
*,
@ -9,11 +11,11 @@ html {
box-sizing: inherit;
}
body {
margin: 0;
}
html,
body {
height: 100%;
}
body {
margin: 0;
}

View File

@ -0,0 +1,18 @@
html {
color: $base-font-color;
font-family: $base-font-family;
font-size: $large-font-size;
line-height: $base-line-height;
}
@media (max-height: 960px), (max-width: 1024px) {
html {
font-size: $base-font-size;
}
}
@media (max-height: 480px), (max-width: 768px) {
html {
font-size: $small-font-size;
}
}

View File

@ -0,0 +1,4 @@
.container {
margin: 0 auto;
width: $container-width;
}

View File

@ -0,0 +1,3 @@
.form-group {
margin-top: $base-spacing;
}

View File

@ -0,0 +1,15 @@
.form {
h2 {
margin: 0 auto;
max-width: $base-form-width;
padding: $base-spacing;
}
form {
border: $base-solid-border;
border-radius: $base-border-radius;
margin: 0 auto;
max-width: $base-form-width;
padding: 0 $base-spacing $base-spacing;
}
}

View File

@ -11,6 +11,6 @@
th,
td {
padding: 0 $base-spacing 0 0;
padding: 0 $small-spacing 0 0;
}
}

View File

@ -0,0 +1,17 @@
:root {
--board-size: 64vw;
}
@media (min-aspect-ratio: 14/11) {
:root {
--board-size: 80vmin;
}
}
@media (max-aspect-ratio: 9/11) {
:root {
--board-size: 90vmin;
}
}
$diagonal-pixel: 0.7071067812px;

View File

@ -0,0 +1,2 @@
$colours: "black" "white";
$pieces: king queen bishop knight rook pawn;

View File

@ -0,0 +1,18 @@
$black: #000;
$white: #fff;
// Background Colors
$background-color: $white;
$foreground-color: $black;
$nav-background-color: $black;
$nav-foreground-color: $white;
$link-color: $black;
// Font Colors
$base-font-color: $black;
$action-color: $black;
// Border
$base-border-color: $black;

View File

@ -0,0 +1 @@
$base-form-width: 40rem;

View File

@ -0,0 +1,16 @@
$base-border-radius: 0.5rem;
$base-spacing: 2rem;
$small-spacing: $base-spacing * 0.5;
$x-small-spacing: $small-spacing * 0.5;
$base-z-index: 0;
$container-width: 90%;
// Border
$base-border-color: $black;
$base-border: 1px dashed $base-border-color;
$base-solid-border: 0.25rem solid $base-border-color;
// Animations
$base-duration: 150ms;
$base-timing: ease;

View File

@ -0,0 +1,19 @@
$base-font-family: "Enriqueta", serif;
$base-font-size: 1em;
$heading-font-family: $base-font-family;
$small-font-size: 0.8em;
$large-font-size: 1.2em;
// Line height
$base-line-height: 1.5;
$heading-line-height: 1.2;
// Font weights
$base-font-weight: 400;
$heavy-font-weight: 700;
// Modular scale
$bourbon: (
"modular-scale-ratio": $major-third,
);

View File

@ -0,0 +1,3 @@
.text-right {
text-align: right;
}

View File

@ -130,7 +130,7 @@
/// @content [Write the style you want to apply to the children, and it will be added within the @content directive]
/// @param {number} $num - id of the child
@mixin middle($num) {
&:nth-child(#{round($num / 2)}) {
&:nth-child(#{round($num * 0.5)}) {
@content;
}
}

View File

@ -67,6 +67,8 @@
///
/// @require {function} _fetch-bourbon-setting
@use "sass:math";
@function modular-scale(
$increment,
$value: _fetch-bourbon-setting("modular-scale-base"),
@ -78,7 +80,7 @@
// scale $v2 to just above $v1
@while $v2 > $v1 {
$v2: ($v2 / $ratio); // will be off-by-1
$v2: math.div($v2, $ratio); // will be off-by-1
}
@while $v2 < $v1 {
$v2: ($v2 * $ratio); // will fix off-by-1
@ -102,15 +104,15 @@
@if $increment < 0 {
// adjust $v2 to just below $v1
@if $double-stranded {
$v2: ($v2 / $ratio);
$v2: math.div($v2, $ratio);
}
@for $i from $increment through -1 {
@if $double-stranded and ($v1 / $ratio) < $v2 {
@if $double-stranded and math.div($v1, $ratio) < $v2 {
$value: $v2;
$v2: ($v2 / $ratio);
$v2: math.div($v2, $ratio);
} @else {
$v1: ($v1 / $ratio);
$v1: math.div($v1, $ratio);
$value: $v1;
}
}

View File

@ -12,6 +12,8 @@
/// // Output
/// $dimension: 10;
@use "sass:math";
@function strip-unit($value) {
@return ($value / ($value * 0 + 1));
@return math.div($value, $value * 0 + 1);
}

View File

@ -55,25 +55,25 @@
@if $direction == "up" {
border-color: transparent transparent $color;
border-width: 0 ($width / 2) $height;
border-width: 0 ($width * 0.5) $height;
} @else if $direction == "up-right" {
border-color: transparent $color transparent transparent;
border-width: 0 $width $width 0;
} @else if $direction == "right" {
border-color: transparent transparent transparent $color;
border-width: ($height / 2) 0 ($height / 2) $width;
border-width: ($height * 0.5) 0 ($height * 0.5) $width;
} @else if $direction == "down-right" {
border-color: transparent transparent $color;
border-width: 0 0 $width $width;
} @else if $direction == "down" {
border-color: $color transparent transparent;
border-width: $height ($width / 2) 0;
border-width: $height ($width * 0.5) 0;
} @else if $direction == "down-left" {
border-color: transparent transparent transparent $color;
border-width: $width 0 0 $width;
} @else if $direction == "left" {
border-color: transparent $color transparent transparent;
border-width: ($height / 2) $width ($height / 2) 0;
border-width: ($height * 0.5) $width ($height * 0.5) 0;
} @else if $direction == "up-left" {
border-color: $color transparent transparent;
border-width: $width $width 0 0;

View File

@ -19,13 +19,15 @@
///
/// @access private
@use "sass:math";
@function _contrast-ratio($color-1, $color-2) {
$-local-lightness-1: _lightness($color-1) + 0.05;
$-local-lightness-2: _lightness($color-2) + 0.05;
@if $-local-lightness-1 > $-local-lightness-2 {
@return $-local-lightness-1 / $-local-lightness-2;
@return math.div($-local-lightness-1, $-local-lightness-2);
} @else {
@return $-local-lightness-2 / $-local-lightness-1;
@return math.div($-local-lightness-2, $-local-lightness-1);
}
}

View File

@ -11,11 +11,13 @@
///
/// @access private
@use "sass:math";
@function _gamma($channel) {
@if $channel < 0.03928 {
@return $channel / 12.92;
@return math.div($channel, 12.92);
} @else {
$c: ($channel + 0.055) / 1.055;
@return (133 * $c * $c * $c + 155 * $c * $c) / 288;
$c: math.div($channel + 0.055, 1.055);
@return math.div(133 * $c * $c * $c + 155 * $c * $c, 288);
}
}

View File

@ -11,14 +11,16 @@
///
/// @access private
@use "sass:math";
@function _lightness($hex-color) {
$-local-red-raw: red(rgba($hex-color, 1));
$-local-green-raw: green(rgba($hex-color, 1));
$-local-blue-raw: blue(rgba($hex-color, 1));
$-local-red: _gamma($-local-red-raw / 255);
$-local-green: _gamma($-local-green-raw / 255);
$-local-blue: _gamma($-local-blue-raw / 255);
$-local-red: _gamma(math.div($-local-red-raw, 255));
$-local-green: _gamma(math.div($-local-green-raw, 255));
$-local-blue: _gamma(math.div($-local-blue-raw, 255));
@return $-local-red * 0.2126 + $-local-green * 0.7152 + $-local-blue * 0.0722;
}

View File

@ -1,74 +1,28 @@
"use strict";
import "babel-polyfill";
import "@babel/polyfill";
import "phoenix_html";
import React from "react";
import ReactDOM from "react-dom";
import { createStore } from "redux";
import Channel from "./services/channel";
import Notifications from "./services/notifications";
import Game from "./components/game";
import OpponentFinder from "./components/opponent-finder";
import chessBoardReducer from "./reducers/chess-board";
import { setGameId } from "./store/actions";
import Listeners from "./store/listeners";
import ChessBoard from "./components/chess-board";
import MoveList from "./components/move-list";
import GameInfo from "./components/game-info";
const store = createStore(chessBoardReducer);
const notifications = new Notifications();
class App extends React.Component {
componentWillMount() {
const { gameId, store } = this.props;
const gameContainer = document.getElementById("game");
store.dispatch(setGameId(gameId));
if (gameContainer != undefined) {
const gameId = gameContainer.getAttribute("data-game-id");
this.listeners = new Listeners(store);
this.listeners.setListeners(notifications);
this.channel = new Channel(store, gameId);
}
get moves() {
const { store } = this.props;
return store.getState().moves;
}
get opponent() {
const { store } = this.props;
return store.getState().opponent;
}
render() {
const { store, gameId } = this.props;
return (
<div className="game-grid">
<ChessBoard
gameId={gameId}
store={store}
channel={this.channel}
/>
<GameInfo store={store} />
<MoveList store={store} />
</div>
);
}
ReactDOM.render(<Game store={store} gameId={gameId} />, gameContainer);
}
const container = document.getElementById("app");
const opponentFinderContainer = document.getElementById("opponent-finder");
if (container != undefined) {
const gameId = container.getAttribute("data-game-id");
ReactDOM.render(
<App store={store} gameId={gameId} />,
container
);
if (opponentFinderContainer != undefined) {
ReactDOM.render(<OpponentFinder store={store} />, opponentFinderContainer);
}

View File

@ -22,16 +22,16 @@ class ChessBoardSquare extends React.Component {
get squareClass() {
if (this.props.piece == undefined) {
return classNames(
"board-square",
{ "available": this.isAvailableSquare() }
"square",
{ "square--available": this.isAvailableSquare() }
);
} else {
return classNames(
"board-square",
this.props.piece.type,
this.props.piece.colour,
{ "selected": this.isSelectedSquare() },
{ "available": this.isAvailableSquare() }
"square",
`square--${this.props.piece.type}`,
`square--${this.props.piece.colour}`,
{ "square--selected": this.isSelectedSquare() },
{ "square--available": this.isAvailableSquare() }
);
}
}

View File

@ -81,7 +81,11 @@ class ChessBoard extends React.Component {
const turn = this.turn;
const player = this.player;
return classNames("board", turn + "-to-move", "player-is-" + player);
return classNames(
"board",
`board--${turn}-to-move`,
`board--player-is-${player}`
);
}
render() {
@ -90,7 +94,7 @@ class ChessBoard extends React.Component {
<RankLabels />
<FileLabels />
<div className="board-body">
<div className="board__body">
{this.renderSquares()}
</div>

Some files were not shown because too many files have changed in this diff Show More