{{code}} - {{reason}}
9 |Nothing to see here
10 | go home 11 |├── rust-toolchain ├── .gitignore ├── static ├── favicon.ico ├── index.js ├── thread.js └── styles.css ├── .rustfmt.toml ├── Dockerfile ├── proc-macros ├── Cargo.toml └── src │ └── lib.rs ├── templates ├── error.html ├── leaderboard.html ├── base.html ├── banned.html ├── update_bio.html ├── index.html ├── macros.html ├── react.html ├── login.html ├── item.html ├── author.html ├── offer.html ├── register.html ├── profile.html ├── offers.html ├── items.html └── thread.html ├── Cargo.toml ├── README.md ├── src ├── main.rs ├── schema.sql ├── images.rs ├── lib.rs ├── pages.rs ├── threads.rs └── users.rs ├── migrations └── 1_initial.up.sql └── LICENSE /rust-toolchain: -------------------------------------------------------------------------------- 1 | stable 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | Cargo.lock 3 | target/ 4 | proc-macros/target/ -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maplant/marche/HEAD/static/favicon.ico -------------------------------------------------------------------------------- /.rustfmt.toml: -------------------------------------------------------------------------------- 1 | struct_field_align_threshold = 20 2 | max_width = 100 3 | wrap_comments = true 4 | use_try_shorthand = true 5 | imports_granularity = "Crate" 6 | group_imports = "StdExternalCrate" -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM rust:1.70-slim-buster 2 | 3 | WORKDIR /app 4 | 5 | COPY . . 6 | 7 | RUN apt-get update && apt-get install -y libpq-dev 8 | RUN cargo build --release 9 | 10 | EXPOSE 8080 11 | CMD [ "./target/release/marche-server" ] 12 | -------------------------------------------------------------------------------- /proc-macros/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "marche-proc-macros" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [lib] 9 | proc-macro = true 10 | 11 | [dependencies] 12 | syn = { version = "1.0", features = ["full"] } 13 | quote = "1.0" 14 | proc-macro2 = "1.0" 15 | -------------------------------------------------------------------------------- /templates/error.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}Error!{% endblock %} 4 | 5 | {% block content %} 6 |
11 | 13 | {{stub.name}} 14 | 15 |
16 | {% match stub.picture %} 17 | {% when Some with (filename) %} 18 |{{item.html|e("none")}}
60 | 63 | 64 | {% endmacro %} 65 | -------------------------------------------------------------------------------- /templates/react.html: -------------------------------------------------------------------------------- 1 | {%- import "macros.html" as macros -%} 2 | {% extends "base.html" %} 3 | 4 | {% block title %}React{% endblock %} 5 | 6 | {% block content %} 7 | 58 | {% endblock %} 59 | -------------------------------------------------------------------------------- /templates/login.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}Log In{% endblock %} 4 | 5 | {% block content %} 6 |{{bio|redact|linebreaks|e("none")}}
17 |This user has been banned!
18 | {% else %} 19 | {{bio|escape|linebreaks|e("none")}} 20 | {% endif %} 21 | {% if is_curr_user %} 22 | 25 | {% endif %} 26 |This user is banned until {{ban_timestamp}}
55 | 56 |