Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
feat: improve modal styles
Browse files Browse the repository at this point in the history
  • Loading branch information
dnlzrgz committed Jul 13, 2024
1 parent 023a50d commit 115021b
Show file tree
Hide file tree
Showing 11 changed files with 685 additions and 609 deletions.
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,18 @@ pipx install memotica

## Usage

### TUI

Once memotica is installed, you should have the `memotica` command available. To start the TUI simply run:

```bash
memotica
```

Or, if you want to see the help message and other available commands, run:
Or

```bash
memotica --help
memotica run
```

Once the TUI is displayed, you can:
Expand All @@ -71,6 +73,20 @@ Once the TUI is displayed, you can:

After you've added some flashcards, select a deck in the deck tree and press `ctrl+s` to begin the review process.

### Other commands

memotica provides commands to export and import your flashcards, decks and review information in the form of CSV files. To see all the available options run:

```bash
memotica export --help
```

And

```bash
memotica import --help
```

## Help is Welcome

If you have any suggestions or would like to contribute to this project, please feel free to open an issue. Thank for your interest!
Expand Down
191 changes: 101 additions & 90 deletions assets/memotica_add_flashcard.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
181 changes: 95 additions & 86 deletions assets/memotica_help.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
172 changes: 90 additions & 82 deletions assets/memotica_review_answer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
160 changes: 84 additions & 76 deletions assets/memotica_review_question.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
170 changes: 89 additions & 81 deletions assets/memotica_tui.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
171 changes: 90 additions & 81 deletions assets/memotica_tui_light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
191 changes: 101 additions & 90 deletions assets/memotica_update_flashcard.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "memotica"
version = "0.4.8"
version = "0.4.9"
description = "An easy, fast, and minimalist space repition application for the terminal."
authors = ["dnlzrgz <24715931+dnlzrgz@users.noreply.github.com>"]
license = "MIT"
Expand Down
35 changes: 16 additions & 19 deletions src/memotica/global.tcss
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ FlashcardsTable {
width: 1fr;

& > .datatable--header {
text-style: bold;
background: $background;
color: $secondary;
text-style: bold;
}

& > .datatable--hover {
Expand Down Expand Up @@ -61,6 +61,7 @@ FlashcardModal,
HelpModal,
ConfirmationModal {
align: center middle;
background: $panel 70%;
}

.modal {
Expand All @@ -81,6 +82,10 @@ ConfirmationModal {
.modal--confirm {
height: 12;
width: 60;

& > Static {
padding: 1;
}
}

.modal--flashcard {
Expand All @@ -89,10 +94,6 @@ ConfirmationModal {
grid-rows: auto 1fr auto;
}

.modal--confirm Static {
padding: 1;
}

.modal--help {
height: 1fr;
max-height: 12;
Expand All @@ -101,15 +102,16 @@ ConfirmationModal {
}

.modal__reversible {
layout: grid;
grid-columns: auto auto;
grid-size: 2 1;
grid-gutter: 1;
}
grid-size: 2 1;
layout: grid;
width: auto;

.modal__reversible Static {
content-align: center middle;
height: 3;
& > Static {
content-align: center middle;
height: 3;
}
}

.modal__options {
Expand All @@ -128,10 +130,6 @@ ConfirmationModal {
width: 100%;
}

.modal__reversible {
width: auto;
}

.modal__options Select {
width: 1fr;
}
Expand All @@ -147,11 +145,10 @@ ConfirmationModal {
.modal__front,
.modal__back {
margin-bottom: 1;
}

.modal__front Static,
.modal__back Static {
padding-left: 1;
& > Static {
padding-left: 1;
}
}

.modal__buttons {
Expand Down
1 change: 0 additions & 1 deletion src/memotica/modals/deck_modal.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ def compose(self) -> ComposeResult:
),
],
validate_on=["submitted"],
classes="input-field",
).focus()

def action_quit(self) -> None:
Expand Down

0 comments on commit 115021b

Please sign in to comment.