aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md34
-rw-r--r--app/templates/macros.j222
2 files changed, 34 insertions, 22 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..9c15148
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,34 @@
+# Contributing
+
+To contribute you need to have [git](https://git-scm.com/) and [UV](https://docs.astral.sh/uv/) setup.
+
+## Setup
+
+Set up the repository via a git clone and setup a new branch using the following commands:
+
+```bash
+git clone git@gitlab.com:KaranJayachandra/match_up.git
+cd match_up
+git checkout develop
+git branch <branch-name>
+git checkout <branch-name>
+```
+
+Now we can install the dependencies using:
+
+```bash
+uv sync
+```
+
+A database URI needs to be added to let the application know where to create a test database by creating a `.flaskenv` file in the root directory containing the variable `SQLALCHEMY_DATABASE_URI=sqlite:///app.db`. Now, we need to initialize a database for testing via the following commands:
+
+```bash
+uv run flask init
+uv run flask migrate
+```
+
+We are now ready to run the flask application using:
+
+```bash
+uv run flask run
+```
diff --git a/app/templates/macros.j2 b/app/templates/macros.j2
index e08bfe1..4fe35f0 100644
--- a/app/templates/macros.j2
+++ b/app/templates/macros.j2
@@ -10,28 +10,6 @@
hx-swap="outerHTML"> {{ player.first_name + " " + player.last_name}} </button>
{%- endmacro %}
-{% macro guest_control(level, value) -%}
-<div class="field center has-addons is-centered" id="guests_{{level}}">
- <div class="control">
- <button class="button is-responsive is-dark"
- hx-post="/decrement_guest"
- hx-swap="outerHTML"
- hx-vals='{"level": "{{ level }}"}'
- hx-target="#guests_{{ level }}"><span class="icon"><i class="fas fa-light fa-minus"></i></span></button>
- </div>
- <div class="control">
- <input class="input is-responsive" type="text" style="text-align:center" value="{{ value }}" disabled>
- </div>
- <div class="control">
- <button class="button is-responsive is-dark"
- hx-post="/increment_guest"
- hx-swap="outerHTML"
- hx-vals='{"level": "{{ level }}"}'
- hx-target="#guests_{{ level }}"><span class="icon"><i class="fas fa-light fa-plus"></i></span></button>
- </div>
-</div>
-{%- endmacro %}
-
{% macro header(url_for) -%}
<head>
<meta charset="UTF-8">