11<template >
2- <div id =" journal-background" class =" space" >
3- <h1 >📔 Your Journals</h1 >
2+ <main >
3+ <div class =" space" >
4+ <h1 >📔 Your Journals</h1 >
45
5- <div id =" create-journal-container" class =" shadow" >
6- <!-- fix to stop page from refreshing when hitting enter:
6+ <div id =" create-journal-container" class =" shadow" >
7+ <!-- fix to stop page from refreshing when hitting enter:
78 https://stackoverflow.com/questions/2215462/html-form-when-i-hit-enter-it-refreshes-page -->
8- <form id =" create-new-journal" onkeypress =" return event.keyCode != 13" >
9- <input
10- v-model =" journal.title"
11- required
12- type =" text"
13- placeholder =" Name of new journal"
14- @keyup.enter =" submit()"
15- />
16- <input
17- name =" create journal"
18- value =" Create Journal"
19- type =" button"
20- @click =" submit()"
21- />
22- </form >
9+ <form id =" create-new-journal" onkeypress =" return event.keyCode != 13" >
10+ <input
11+ v-model =" journal.title"
12+ required
13+ type =" text"
14+ placeholder =" Name of new journal"
15+ @keyup.enter =" submit()"
16+ />
17+ <input
18+ name =" create journal"
19+ value =" Create Journal"
20+ type =" button"
21+ @click =" submit()"
22+ />
23+ </form >
24+ </div >
2325 </div >
24-
2526 <div id =" journals-container" >
2627 <JournalCard
2728 v-for =" (item, index) in allJournals"
3132 @update-journal =" updateJournalTitle"
3233 />
3334 </div >
34- </div >
35+ </main >
3536</template >
3637
3738<script >
@@ -119,6 +120,12 @@ export default {
119120 </script >
120121
121122<style lang="scss" scoped>
123+ #journals-background {
124+ max-width : 28rem ;
125+ padding : 1rem ;
126+ margin : 1rem ;
127+ }
128+
122129#create-journal-container {
123130 background : var (--app-secondary-background-color );
124131 flex-direction : column ;
@@ -142,10 +149,6 @@ export default {
142149 justify-content : center ;
143150}
144151
145- #journals-background {
146- background-color : black ;
147- }
148-
149152input [type = " button" ] {
150153 border : none ;
151154 padding : 15px ;
0 commit comments