Webbserverprogrammering 1

Show sourcecode

The following files exists in this folder. Click to view.

webbsrvprg/projects/slutprojekt/css/

recipe.css
styles.css

recipe.css

241 lines ASCII Windows (CRLF)
#container-1{
  width: 1000px;
  height: 600px;
  display: grid;
  grid-template-columns: 40% 60%;
  margin: auto;
  margin-top: 50px;
  background-color: white;
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 20px;
}
.recipe-img img {
  width: 100%;
  object-fit: cover;
  height: 580px;
  border-radius: 10px;

}
.title-container {
  display: grid;
  grid-template-rows: 15% 60% 25%;
  padding: 6px;
}
.title-container h1 {
  justify-self: baseline;
  margin: 0;
  font-size: 36px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
.star-icon {
  width: 34px;
  height: 34px;
  position: relative;
  top: 4px;
}
.rate-star-icon{
  width: 34px;
  height: 34px;
  position: relative;
}
.ratings-info {
  display: flex;
  flex-direction: row;
}
.ratings-separation {
  display: flex;
  flex-direction: column;
  margin-left:4px ;
  font-size: 18px;
}
.rating-count{
  position: relative;
  bottom: 4px;
  font-size: 17px;
}
.recipe-info {
  display: flex;
  flex-direction: column;
  justify-content: end;
}
.bold {
  font-weight: bold;
  font-size: 22px;
}
.user-rating-container {
  align-self: center;
  position: relative;
  left: 24px;
}
#openBtn {
  all:unset;
  cursor: pointer;
  color: #1263a1;
  font-size: 20px;
  font-weight: bold;
  display: flex;
  flex-direction:row ;
  align-items: center;
}
#favorite-btn {
  all:unset;
  cursor: pointer;
  display: flex;
  flex-direction: row;
}
.heart-icon{
  width: 34px;
  height: 34px;
  position: relative;
}
.heart-text{
  align-self: center;
  color: rgb(230, 0, 0);
  font-size: 22px;
  margin-left: 5px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}
.modal-content {
  background-color: white;
  margin: 15% auto;
  padding: 20px;
  border-radius: 8px;
  width: 300px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  text-align: center;
}
.close {
  float: right;
  font-size: 24px;
  cursor: pointer;
  position: relative;
  bottom:4px;
}
.comments-info {
  font-size: 20px;
}
.favorite {
  align-self: end;
  margin-bottom: 18px;
}

#container-2 {
  width: 1000px;
  display: grid;
  grid-template-columns: 40% 60%;
  margin: auto;
  background-color: white;
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 20px;
}
h2{
  margin-bottom:14px;
}
.ing-inst-text{
  margin-left: 15px;
}

.comment{
  width: 1000px;
  margin: auto;
  background-color: white;
  border-radius: 10px;
  padding: 10px;
  padding-bottom: 40px;
}

.comment-textarea {
  width: 80%;
  min-height: 120px;
  padding: 15px;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  color: #333;
  background-color: #f8f9fa;
  resize: vertical;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.comment-textarea:focus {
  border-color: #6c5ce7;
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
  background-color: #fff;
}

.comment-textarea::placeholder {
  color: #464646;
  font-style: italic;
}

.comment-input {
  padding: 8px 12px;
  margin: 4px;
  border-radius: 20px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  background-color: rgb(143, 143, 143);
  color: white;
  transition: 0.2s;
}
.comment-input:hover {
  background-color: rgb(99, 99, 99);
  transition: 0.2s;
}
.comment-author {
  grid-area: author;
  font-size: 20px;
}
.comment-time {
  grid-area: time;
  justify-self: end;
}
.comment-text {
  grid-area: text;
}
.user-comment {
  display: grid;
  grid-template-areas: 
  "author author"
  "text time";
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 30px;
  border-top: 1px solid grey;
}

@media screen and (max-width: 700px) {
  #container-1 {
    height: auto;
    width: 100%;
    grid-template-columns: 1fr;

  }
  .title-container {
    display: block;
  }
  #container-2 {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .comment, .comment-textarea {
    width: 100%;
  }
}