Skip to content

Commit 6065961

Browse files
author
Hanna Adenholm
committed
Merge branch 'main' of github.com:erikpersson0884/heap-recipes
2 parents e0c49fa + 44f9ded commit 6065961

5 files changed

Lines changed: 258 additions & 41 deletions

File tree

client/src/App.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
--color-offwhite: rgb(255, 251, 240);
1717
--color-lightgrey: #f5f5f5;
1818
--color-rederror: #c56161;
19+
--color-gray1: #3a3a3a;
1920
}
2021

2122
button {

client/src/components/recipeCard/RecipeCard.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
background-color: #F0FFD9;
44
border-radius: 1rem;
55
width: auto;
6+
max-width: 24rem;
67
transition: 0.5s ease-in-out;
78
text-decoration: none;
89
color: rgb(27, 26, 26);
10+
position: relative;
11+
padding-bottom: 2rem;
912
}
1013

1114
.recipe-card img {
@@ -34,6 +37,9 @@
3437
margin-bottom: 1.2rem;
3538
color: rgb(88, 87, 87);
3639
font-weight: 500;
40+
margin-top: auto;
41+
position: absolute;
42+
bottom: 0;
3743
}
3844

3945
.recipe-card:hover {

client/src/layout/header/Header.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,13 @@
8585
width: 1.5rem;
8686
margin-right: 0.5rem;
8787
background-color: transparent;
88+
}
89+
90+
@media (max-width: 768px) {
91+
.page-header h1{
92+
font-size: 1.5rem;
93+
}
94+
.page-header {
95+
padding: 1rem;
96+
}
8897
}

client/src/pages/recipepage/RecipePage.css

Lines changed: 134 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
background-color: var(--color-offwhite);
44
display: flex;
55
flex-direction: row;
6-
gap: 2rem;
6+
gap: 1rem;
77

88
position: relative;
99

1010
width: fit-content;
11-
max-width: 80%;
11+
max-width: 70%;
1212
margin-inline: auto;
1313
padding: 2rem;
1414
border-radius: 1rem;
@@ -25,59 +25,171 @@
2525
left: 2rem;
2626

2727
color: #ffffff;
28-
height: fit-content;
28+
height: 2rem;
29+
width: 2rem;
30+
2931
}
3032

3133
.recipe-page .recipe-details {
3234
display: flex;
3335
flex-direction: row;
34-
justify-content: flex-start;
3536
gap: 1rem;
3637
}
3738

3839
.recipe-header {
3940
display: grid;
40-
grid-template-columns: 1fr 2em 2em;
41+
grid-template-columns: 1fr 4rem;
4142
gap: 1rem;
4243
align-items: center;
44+
margin-bottom: -1rem;
4345
}
4446

45-
.recipe-header img {
46-
width: 2em;
47-
height: 2em;
48-
cursor: pointer;
49-
padding: 0.25em;
50-
border-radius: 0.5em;
47+
.recipe-page ol li {
48+
padding: 0.7rem 0.7rem;
49+
font-weight: 350;
5150
}
5251

53-
.recipe-page ol li {
54-
margin-bottom: 1rem;
52+
.recipe-page ol {
53+
padding: 1rem 0.5rem;
54+
padding-left: 2rem;
55+
background-color: #fffefb;
56+
border-radius: 0.25rem;
57+
border:#f8f0e0 1px solid;
58+
}
59+
60+
.recipe-page ul{
61+
padding: 0;
62+
margin: 0;
63+
background-color: #fffefb;
64+
border-radius: 0.25rem;
65+
border:#f8f0e0 1px solid;
66+
}
67+
68+
.recipe-page ul li {
69+
margin: 0.5rem 0;
70+
list-style-type: none;
71+
padding: 0.25rem 1rem;
72+
display: grid;
73+
grid-template-columns: 3rem 1fr;
74+
gap: 1rem;
75+
}
76+
77+
.recipe-page ul li p {
78+
margin: 0;
79+
align-self: center;
80+
}
81+
82+
.recipe-description {
83+
font-style: italic;
84+
color: var(--color-gray1);
5585
font-weight: 350;
5686
}
5787

58-
.icon {
59-
background-color: var(--color-green1);
88+
.edit-buttons {
89+
background-color: var(--color-green1);
90+
position: absolute;
91+
border-radius: 0.5em;
92+
top: 2rem;
93+
right: 4.5rem;
94+
width: 1.5rem;
95+
height: 1.5rem;
96+
cursor: pointer;
97+
padding: 0.25rem;
6098
}
6199

62100
.delete-button {
63101
background-color: var(--color-rederror);
102+
right: 2rem;
103+
}
104+
105+
.ingredients-header {
106+
display: grid;
107+
grid-template-columns: 1fr auto;
108+
align-items: center;
109+
}
110+
111+
.ingredients-header button {
112+
width: 1.7rem;
113+
padding: 0.25rem 0.5rem;
114+
font-size: 1rem;
115+
background-color: #fff;
116+
color: var(--color-gray1);
117+
margin-inline: 0.25rem;
118+
border:#f8f0e0 1px solid;
119+
border-radius: 50rem;
64120
}
65121

66122
@media (max-width: 768px) {
67123
.recipe-container {
68124
flex-direction: column;
69125
align-items: center;
70-
max-width: 90%;
71-
padding: 1rem;
126+
width: calc(100% - 2rem);
127+
max-width: calc(100% - 2rem);
128+
margin-inline: 0;
129+
padding: 2rem 1rem;
130+
border-radius: 0rem;
131+
}
132+
133+
.recipe-header {
134+
align-items: center;
135+
text-align: center;
136+
display: block;
137+
margin-top: 3rem;
138+
}
139+
140+
.recipe-details {
141+
justify-content: center;
142+
align-self: center;
72143
}
73144

74145
.recipe-page .recipe-image {
75-
width: 100%;
76-
max-width: 300px;
146+
width: 100vw;
147+
height: auto;
148+
max-width: 600px;
149+
border-radius: .25rem;
150+
margin-bottom: 1rem;
77151
}
78152

79-
.recipe-header {
80-
grid-template-columns: 1fr 2em 2em;
81-
gap: 0.5rem;
153+
.recipe-description {
154+
max-width: 600px;
155+
}
156+
157+
.recipe-page h3 {
158+
margin-inline: 1rem;
159+
}
160+
161+
.recipe-page aside ul {
162+
padding-inline: 0.75rem;
82163
}
164+
165+
.recipe-page .back-arrow {
166+
color: #535353;
167+
left: 1rem;
168+
}
169+
170+
.edit-buttons {
171+
right: 3.5rem;
172+
}
173+
.delete-button {
174+
right: 1rem;
175+
}
176+
177+
.recipe-page ul li {
178+
padding: 0.4rem 1rem;
179+
}
180+
181+
.recipe-page ol{
182+
padding: 1rem 0rem;
183+
padding-left: 2rem;
184+
background-color: #fffefb;
185+
border-radius: 0.25rem;
186+
border:#f8f0e0 1px solid;
187+
max-width: 560px;
188+
width: calc(100vw - 2rem);
189+
}
190+
191+
.ingredients-header {
192+
margin-right: 1rem;
193+
}
194+
83195
}

0 commit comments

Comments
 (0)