diff --git a/.dockerignore b/.dockerignore index a099dca..058c816 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,6 @@ -target -Dockerfile +* +.* +!src/ +!templates/ +!Cargo.lock +!Cargo.toml diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 0dad033..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,12 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 - -updates: - - package-ecosystem: "cargo" - directory: "/" - schedule: - interval: "monthly" diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml deleted file mode 100644 index f7302be..0000000 --- a/.github/workflows/audit.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Security audit - -on: - push: - paths: - - '**/Cargo.toml' - - '**/Cargo.lock' - -jobs: - security_audit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions-rs/audit-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/audit_cron.yml b/.github/workflows/audit_cron.yml deleted file mode 100644 index 56de683..0000000 --- a/.github/workflows/audit_cron.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Security audit (cron) - -on: - schedule: - - cron: '0 0 * * *' - -jobs: - audit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/audit-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index ead4831..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,62 +0,0 @@ -on: [push, pull_request] - -name: CI - -jobs: - check: - name: Check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: check - - test: - name: Test Suite - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: test - - fmt: - name: Rustfmt - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - run: rustup component add rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - - clippy: - name: Clippy - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - run: rustup component add clippy - - uses: actions-rs/cargo@v1 - with: - command: clippy diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml deleted file mode 100644 index acffcf1..0000000 --- a/.github/workflows/docker-publish.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Docker - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -on: - schedule: - - cron: '45 20 * * *' - push: - branches: [ master ] - # Publish semver tags as releases. - tags: [ 'v*.*.*' ] - pull_request: - branches: [ master ] - -env: - # Use docker.io for Docker Hub if empty - REGISTRY: ghcr.io - # github.repository as / - IMAGE_NAME: ${{ github.repository }} - - -jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Setup Docker buildx - uses: docker/setup-buildx-action@v3 - - name: Log into registry ${{ env.REGISTRY }} - if: github.event_name != 'pull_request' - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract Docker metadata - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - name: Build and push Docker image - id: build-and-push - uses: docker/build-push-action@v5 - with: - context: . - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 70f20ac..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,8 +0,0 @@ -version: '3' -services: - bin: - build: - context: . - dockerfile: Dockerfile - ports: - - "8000:8000" \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index ca4c273..1e92679 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,25 +1,21 @@ + + - bin. - + bin {% block head %}{% endblock head %} diff --git a/templates/index.html b/templates/index.html index 4ffeb51..d2e3db4 100644 --- a/templates/index.html +++ b/templates/index.html @@ -2,6 +2,7 @@ {% block styles %} form { flex: 1; } + body { padding: 2rem; } textarea { height: 100%; @@ -30,9 +31,9 @@ width: 3rem; border: none; border-radius: 50%; - background: #2196F3; + background: #696969; - color: white; + color: #C6C6C6; font-size: 2rem; cursor: pointer; diff --git a/templates/paste.html b/templates/paste.html index ccdc93d..5bf4ccf 100644 --- a/templates/paste.html +++ b/templates/paste.html @@ -3,16 +3,21 @@ {% block styles %} pre { height: 100%; - width: 100%; + min-width: 100%; margin: 0; overflow: auto; font-family: inherit; font-size: 1rem; line-height: inherit; counter-reset: line; + display: flex; + flex-direction: column; + flex-shrink: 0; } code { counter-increment: line; + padding: 0 2rem; + display: inline-block; } code::before { content: counter(line); @@ -23,6 +28,8 @@ color: #888; -webkit-user-select: none; } + pre > code:last-child { margin-bottom: 1rem; } + pre > code:first-child { margin-top: 1rem; } {% endblock styles %} {% block head %}