diff --git a/app/css/main.css b/app/css/main.css index 7ee4514..bbf6484 100644 --- a/app/css/main.css +++ b/app/css/main.css @@ -26,11 +26,11 @@ form div.error input { } form div.error ul.errors { - @apply pl-1 pt-1; + @apply pt-1 pl-1; } form div.error ul.errors li { - @apply text-red-500 text-xs italic; + @apply text-xs italic text-red-500; } form input[type=text]:focus, @@ -40,19 +40,20 @@ form input[type=password]:focus { } form input[type=submit] { - @apply font-bold py-2 px-4 rounded w-full mt-2; + @apply w-full px-4 py-2 mt-2 font-bold rounded; } form.auth-form input[type=submit] { - @apply bg-blue-500 text-white; + @apply text-white bg-blue-500; } .green-btn { - @apply bg-green-500 text-white; + @apply text-white bg-green-500; } .accomplishment .difficulty { - @apply font-bold; + @apply flex-shrink-0 pl-1 font-bold text-right; + min-width: 3em; } .accomplishment .difficulty-easy { @@ -72,7 +73,7 @@ form.auth-form input[type=submit] { } .orange-btn { - @apply bg-orange-500 text-white; + @apply text-white bg-orange-500; } .orange-btn:hover { @@ -80,7 +81,7 @@ form.auth-form input[type=submit] { } .red-btn { - @apply bg-red-500 text-white; + @apply text-white bg-red-500; } .red-btn:hover { @@ -93,7 +94,7 @@ form.auth-form input[type=submit]:hover { } form input[type=submit]:focus { - @apply outline-none shadow-outline; + @apply shadow-outline outline-none; } .link { @@ -105,7 +106,7 @@ form input[type=submit]:focus { } .card { - @apply bg-white shadow-md rounded px-8 pt-6 pb-6 mb-4 mt-4; + @apply px-8 pt-6 pb-6 mt-4 mb-4 bg-white rounded shadow-md; } .auth-form.card { diff --git a/app/db.py b/app/db.py index 605830b..fbc8bed 100644 --- a/app/db.py +++ b/app/db.py @@ -43,7 +43,7 @@ class Accomplishment(db.Model): user_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False) time = db.Column(db.DateTime(), nullable=False, default=db.func.current_timestamp()) - text = db.Column(db.String(128), nullable=False) + text = db.Column(db.String(256), nullable=False) difficulty = db.Column(db.Integer) @property diff --git a/app/main.py b/app/main.py index a6199ef..6783c2d 100644 --- a/app/main.py +++ b/app/main.py @@ -11,8 +11,10 @@ main = Blueprint('main', __name__) class NewAccomplishementForm(FlaskForm): - text = StringField('Accomplishment', validators=[ - DataRequired(), Length(max=128)]) + text = StringField( + 'Accomplishment', + validators=[ + DataRequired(), Length(max=256)]) submit_5 = SubmitField('5 XP') submit_10 = SubmitField('10 XP') submit_15 = SubmitField('15 XP') diff --git a/app/static/style.css b/app/static/style.css index 3386be7..38d053e 100644 --- a/app/static/style.css +++ b/app/static/style.css @@ -22064,16 +22064,16 @@ form div.error input { } form div.error ul.errors { - padding-left: 0.25rem; padding-top: 0.25rem; + padding-left: 0.25rem; } form div.error ul.errors li { + font-size: 0.75rem; + font-style: italic; --text-opacity: 1; color: #f56565; color: rgba(245, 101, 101, var(--text-opacity)); - font-size: 0.75rem; - font-style: italic; } form input[type=text]:focus, @@ -22083,36 +22083,40 @@ form input[type=password]:focus { } form input[type=submit] { - font-weight: 700; - padding-top: 0.5rem; - padding-bottom: 0.5rem; + width: 100%; padding-left: 1rem; padding-right: 1rem; - border-radius: 0.25rem; - width: 100%; + padding-top: 0.5rem; + padding-bottom: 0.5rem; margin-top: 0.5rem; + font-weight: 700; + border-radius: 0.25rem; } form.auth-form input[type=submit] { + --text-opacity: 1; + color: #fff; + color: rgba(255, 255, 255, var(--text-opacity)); --bg-opacity: 1; background-color: #4299e1; background-color: rgba(66, 153, 225, var(--bg-opacity)); - --text-opacity: 1; - color: #fff; - color: rgba(255, 255, 255, var(--text-opacity)); } .green-btn { - --bg-opacity: 1; - background-color: #48bb78; - background-color: rgba(72, 187, 120, var(--bg-opacity)); --text-opacity: 1; color: #fff; color: rgba(255, 255, 255, var(--text-opacity)); + --bg-opacity: 1; + background-color: #48bb78; + background-color: rgba(72, 187, 120, var(--bg-opacity)); } .accomplishment .difficulty { + flex-shrink: 0; + padding-left: 0.25rem; font-weight: 700; + text-align: right; + min-width: 3em; } .accomplishment .difficulty-easy { @@ -22140,12 +22144,12 @@ form.auth-form input[type=submit] { } .orange-btn { - --bg-opacity: 1; - background-color: #ed8936; - background-color: rgba(237, 137, 54, var(--bg-opacity)); --text-opacity: 1; color: #fff; color: rgba(255, 255, 255, var(--text-opacity)); + --bg-opacity: 1; + background-color: #ed8936; + background-color: rgba(237, 137, 54, var(--bg-opacity)); } .orange-btn:hover { @@ -22155,12 +22159,12 @@ form.auth-form input[type=submit] { } .red-btn { - --bg-opacity: 1; - background-color: #f56565; - background-color: rgba(245, 101, 101, var(--bg-opacity)); --text-opacity: 1; color: #fff; color: rgba(255, 255, 255, var(--text-opacity)); + --bg-opacity: 1; + background-color: #f56565; + background-color: rgba(245, 101, 101, var(--bg-opacity)); } .red-btn:hover { @@ -22176,8 +22180,8 @@ form.auth-form input[type=submit]:hover { } form input[type=submit]:focus { - outline: 0; box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); + outline: 0; } .link { @@ -22194,17 +22198,17 @@ form input[type=submit]:focus { } .card { - --bg-opacity: 1; - background-color: #fff; - background-color: rgba(255, 255, 255, var(--bg-opacity)); - box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); - border-radius: 0.25rem; padding-left: 2rem; padding-right: 2rem; padding-top: 1.5rem; padding-bottom: 1.5rem; - margin-bottom: 1rem; margin-top: 1rem; + margin-bottom: 1rem; + --bg-opacity: 1; + background-color: #fff; + background-color: rgba(255, 255, 255, var(--bg-opacity)); + border-radius: 0.25rem; + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); } .auth-form.card {