Skip to content

Commit

Permalink
fix layout and restrict text inputs length
Browse files Browse the repository at this point in the history
  • Loading branch information
Erwan de Lépinau committed May 13, 2020
1 parent c75bd2b commit dbd2bb4
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 deletions.
1 change: 1 addition & 0 deletions front/src/components/NewCardButton.vue
Expand Up @@ -15,6 +15,7 @@ export default Vue.extend({
<style lang="scss" scoped>
.container {
display: flex;
width: $card-width;
flex-direction: column;
align-items: center;
padding: 1em;
Expand Down
8 changes: 7 additions & 1 deletion front/src/components/Subtask.vue
Expand Up @@ -5,9 +5,10 @@
</div>
<div :class="['inputs', { strikeout: completed }]">
<BaseTextInput
class="description-input"
:value="description"
@blur="update('description', $event)"
:max-length="50"
:max-length="40"
/>
<div class="duration">
<BaseTextInput
Expand Down Expand Up @@ -84,6 +85,7 @@ export default Vue.extend({
.inputs {
position: relative;
display: flex;
flex-grow: 1;
&::after {
content: " ";
position: absolute;
Expand All @@ -94,6 +96,10 @@ export default Vue.extend({
}
}
.description-input {
flex-grow: 1;
}
.duration {
display: flex;
align-items: center;
Expand Down
10 changes: 8 additions & 2 deletions front/src/components/TaskCard.vue
Expand Up @@ -7,9 +7,9 @@
margin-top: 0.3em;
margin-bottom: 1em;"
@blur="update('title', $event)"
:max-length="30"
:max-length="25"
/>
<div v-if="task.subtasks.length > 0">
<div class="subtasks" v-if="task.subtasks.length > 0">
<div class="list-header">
<div>Subtasks</div>
<div>Duration</div>
Expand Down Expand Up @@ -117,6 +117,12 @@ export default Vue.extend({
width: $card-width;
}
.subtasks {
display: flex;
flex-direction: column;
width: 100%;
}
.list-header {
display: flex;
flex-direction: row;
Expand Down
1 change: 0 additions & 1 deletion front/src/components/base/BaseCard.vue
Expand Up @@ -20,7 +20,6 @@ export default Vue.extend({
border: none;
border-radius: 5px;
padding: 1em;
margin: 1em;
display: flex;
flex-direction: column;
align-items: flex-start;
Expand Down
7 changes: 4 additions & 3 deletions front/src/views/Tasks.vue
Expand Up @@ -4,11 +4,12 @@
<TaskCard
@update="updateTask($event, index)"
@delete="deleteTask(index)"
class="card"
:key="task.id"
:task="task"
/>
</template>
<NewCardButton @click="pushNewTask()" class="new-card-button" />
<NewCardButton @click="pushNewTask()" class="card" />
</div>
<h2 align="center" style="margin: 20%;" v-else>
There is no registered user with the name {{ user }}. Ensure you have
Expand Down Expand Up @@ -107,7 +108,7 @@ export default Vue.extend({
flex-wrap: wrap;
}
.new-card-button {
margin: 60px 120px 60px 120px;
.card {
margin: 20px;
}
</style>

0 comments on commit dbd2bb4

Please sign in to comment.