Compare commits

..

No commits in common. "fe6b05313f558f6d0d74047db3b5b51d5e788606" and "e4ca052656ba189f6a5da0c8bbce7a9e2fa54404" have entirely different histories.

4 changed files with 17 additions and 103 deletions

View file

@ -1,9 +0,0 @@
RUST_LOG=queenie=info
ADMIN_TOKEN=
STRIPE_TOKEN=
FORGEJO_URL=http://localhost:3000
DATABASE_URL=sqlite://queenie.db
MONTHLY_LINK=
ANNUAL_LINK=
LISTENING_ADDR=127.0.0.1
LISTENING_PORT=4008

View file

@ -1,45 +0,0 @@
# Queen
## Setting up dev environment
Copy the `.env.example` to `.env` then fill in missing variables:
```sh
cp .env.example .env
```
Use `sqlx-cli` (install using `cargo install sqlx-cli`) to create and migrate the database:
```sh
sqlx db create ; sqlx migrate run
```
## Development
Run the server for development:
```
cargo run
```
The assets used in Queen come from forgejo,
so you can use a local Caddyfile to serve both forgejo and `queen`
(assuming that forgejo is running on localhost:3000):
```
{
http_port 9000
}
localhost:9000 {
reverse_proxy /signup* localhost:4008
reverse_proxy /payment_success* localhost:4008
reverse_proxy localhost:3000
}
```
Run caddy with:
```
caddy run --config Caddyfile
```

View file

@ -6,8 +6,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}{{ title }} - What 2 Watch{% endblock %}</title> <title>{% block title %}{{ title }} - What 2 Watch{% endblock %}</title>
<link rel="stylesheet" href="/assets/ww.css"> <link rel="stylesheet" href="/assets/ww.css">
<link rel="stylesheet" href="/assets/css/index.css">
<link rel="stylesheet" href="/assets/css/theme-forgejo-auto.css">
{% block head %}{% endblock %} {% block head %}{% endblock %}

View file

@ -1,56 +1,26 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}Welcome, friend, to git.kittencollective.com{% endblock %} {% block title %}Welcome, friend, to git.kittenclause.com{% endblock %}
{% block header %} {% endblock %} {% block header %} {% endblock %}
{% block content %} {% block content %}
<div role="main" aria-label="Sign In" class="page-content user signin"> <p>
<div class="ui middle very relaxed page grid"> <form action="/signup" enctype="application/x-www-form-urlencoded" method="post">
<div class="ui container column fluid"> <input type="hidden" value="{{ self.receipt }}" name="receipt">
<h4 class="ui top attached header center"> <label for="username">Username</label>
Sign Up <input type="text" name="username" id="username" minlength="1" maxlength="20" required></br>
</h4> <label for="displayname">Displayname (optional)</label>
<div class="ui attached segment"> <input type="text" name="displayname" id="displayname"></br>
<form class="ui form" action="/signup" enctype="application/x-www-form-urlencoded" method="post"> <label for="email">Email</label>
<input type="hidden" value="{{ self.receipt }}" name="receipt"> <input type="text" name="email"></br>
<div class="required inline field "> <label for="password">Password</label>
<label for="username">Username</label> <input type="password" name="password" id="password" required></br>
<input type="text" name="username" id="username" minlength="1" maxlength="20" required></br> <label for="confirm_password">Confirm Password</label>
</div> <input type="password" name="pw_verify" id="pw_verify" required></br>
<input type="submit" value="Signup">
<div class="inline field "> </form>
<label for="displayname">Displayname (optional)</label> </p>
<input type="text" name="displayname" id="displayname"></br>
</div>
<div class="required inline field ">
<label for="email">Email</label>
<input type="text" name="email"></br>
</div>
<div class="required inline field ">
<label for="password">Password</label>
<input type="password" name="password" id="password" required></br>
</div>
<div class="required inline field ">
<label for="confirm_password">Confirm Password</label>
<input type="password" name="pw_verify" id="pw_verify" required></br>
</div>
<div class="inline field">
<label></label>
<button class="ui primary button">
Sign Up
</button>
</div>
</form>
</div>
</div>
</div>
</div>
{% endblock %} {% endblock %}