The Unpopular Decision
@@ -0,0 +1,20 @@
|
||||
spring.application.name=demo
|
||||
|
||||
|
||||
|
||||
spring.datasource.url=jdbc:mysql://localhost:3306/demo
|
||||
spring.datasource.username=springuser
|
||||
spring.datasource.password=E~zDmEYHd"5?]U%h_-~Y0uEm
|
||||
|
||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
|
||||
spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect
|
||||
spring.jpa.hibernate.ddl-auto=update
|
||||
|
||||
spring.jpa.show-sql=true
|
||||
spring.jpa.properties.hibernate.format_sql=true
|
||||
|
||||
spring.jpa.open-in-view=false
|
||||
#spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect
|
||||
|
||||
server.port=8080
|
||||
@@ -0,0 +1,141 @@
|
||||
:root {
|
||||
--dusty-red: #D43F3F;
|
||||
--dusty-red-hover: #C73636;
|
||||
--dark-yellow: #FFD27F;
|
||||
--pale-yellow: #FFECB3;
|
||||
--peach: #F5A96E;
|
||||
--dark: #850000;
|
||||
}
|
||||
|
||||
.delius {
|
||||
font-family: 'Delius Swash Caps', cursive;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.mali-regular {
|
||||
font-family: 'Mali', cursive;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* login.css */
|
||||
body, html {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
font-family: 'Mali', cursive;
|
||||
background-color: var(--pale-yellow);
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
/* Header Styles */
|
||||
.top-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: var(--dusty-red);
|
||||
color: var(--dark-yellow);
|
||||
padding: 10px 20px;
|
||||
height: 60px;
|
||||
gap: 40px;
|
||||
}
|
||||
|
||||
.top-header .swirl {
|
||||
height: 40px;
|
||||
width: auto;
|
||||
margin: 0 20px;
|
||||
}
|
||||
|
||||
.site-name {
|
||||
font-size: 2.5em;
|
||||
font-weight: bold;
|
||||
letter-spacing: 4px;
|
||||
font-family: 'Delius Swash Caps', cursive;
|
||||
}
|
||||
|
||||
|
||||
/* Main Content */
|
||||
.main-content {
|
||||
flex-grow: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 40px;}
|
||||
|
||||
/* Login Box */
|
||||
.login-box {
|
||||
background-color: var(--peach);
|
||||
padding: 45px;
|
||||
border-radius: 20px;
|
||||
width: 600px;
|
||||
color: var(--dark);
|
||||
}
|
||||
|
||||
.login-box h2 {
|
||||
font-size: 50px;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
margin-bottom: 30px;
|
||||
margin-top: 8px;
|
||||
|
||||
}
|
||||
|
||||
.login-box .rows {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
.login-box label {
|
||||
font-size: 20px;
|
||||
width: 30%;
|
||||
margin: 0px;
|
||||
font-weight: bold;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.login-box input {
|
||||
flex: 1;
|
||||
padding: 10px;
|
||||
margin: auto;
|
||||
margin-top: 5px;
|
||||
margin-left: 20px;
|
||||
border-radius: 10px;
|
||||
border: 2.5px solid var(--dusty-red);
|
||||
background-color: var(--pale-yellow);
|
||||
font-size: 20px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.login-box input.invalid {
|
||||
border: 4px solid var(--dusty-red);
|
||||
}
|
||||
|
||||
.login-box button {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
width: 40%;
|
||||
padding: 10px;
|
||||
margin-top: 20px;
|
||||
background-color: var(--dusty-red);
|
||||
color: var(--dark-yellow);
|
||||
font-weight: bold;
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.1s ease;
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.login-box button:hover {
|
||||
background-color: var(--dusty-red-hover);
|
||||
transform: scale(1.05);
|
||||
}
|
||||
@@ -0,0 +1,447 @@
|
||||
:root {
|
||||
--dusty-red: #D43F3F;
|
||||
--dusty-red-hover: #C73636;
|
||||
--dark-yellow: #FFD27F;
|
||||
--pale-yellow: #FFECB3;
|
||||
--peach: #F5A96E;
|
||||
--dark: #850000;
|
||||
}
|
||||
|
||||
.delius {
|
||||
font-family: 'Delius Swash Caps', cursive;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.mali-regular {
|
||||
font-family: 'Mali', cursive;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
body, html {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
font-family: 'Mali', cursive;
|
||||
background-color: var(--pale-yellow);
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
/* Header Styles */
|
||||
.top-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: var(--dusty-red);
|
||||
color: var(--dark-yellow);
|
||||
padding: 10px 20px;
|
||||
height: 60px;
|
||||
gap: 40px;
|
||||
}
|
||||
|
||||
.top-header .swirl {
|
||||
height: 40px;
|
||||
width: auto;
|
||||
margin: 0 20px;
|
||||
}
|
||||
|
||||
.site-name {
|
||||
font-size: 2.5em;
|
||||
font-weight: bold;
|
||||
letter-spacing: 4px;
|
||||
font-family: 'Delius Swash Caps', cursive;
|
||||
}
|
||||
|
||||
|
||||
/* Main Content */
|
||||
.main-content {
|
||||
flex-grow: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 40px;}
|
||||
|
||||
.form-wrap {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
padding: 1.5rem 1rem;
|
||||
}
|
||||
|
||||
/* commented out but i was trying to split it
|
||||
.form-split {
|
||||
width:100%;
|
||||
display:flex;
|
||||
flex: 1;
|
||||
}
|
||||
*/
|
||||
|
||||
.form-section {
|
||||
background: var(--peach);
|
||||
border-radius: 15px;
|
||||
padding: 1.25rem 1.5rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 30px;
|
||||
font-weight: 800;
|
||||
color: var(--dark);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.06em;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.field {
|
||||
color: var(--dusty-red);
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.field:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: var(--dark);
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
|
||||
.required {
|
||||
color: var(--dusty-red-hover);
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
textarea,
|
||||
select {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
font-size: 16px;
|
||||
padding: 0 10px;
|
||||
height: 36px;
|
||||
border: 1px;
|
||||
border-radius: 6px;
|
||||
outline: none;
|
||||
font-family: inherit;
|
||||
color: var(--dusty-red);
|
||||
background: var(--pale-yellow);
|
||||
}
|
||||
|
||||
input[type="text"]:focus,
|
||||
textarea:focus,
|
||||
select:focus {
|
||||
border-color: var(--dusty-red);
|
||||
}
|
||||
|
||||
textarea {
|
||||
height: auto;
|
||||
min-height: 80px;
|
||||
padding: 8px 10px;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
::placeholder {
|
||||
color: var(--dusty-red);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.dynamic-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.dynamic-row input,
|
||||
.dynamic-row textarea {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.dynamic-row textarea {
|
||||
min-height: 30px;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
.step-bubble {
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
min-width: 26px;
|
||||
background: transparent;
|
||||
color: var(--dusty-red);
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
align-self: flex-start;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.btn-remove {
|
||||
background: var(--dusty-red);
|
||||
border: 1px;
|
||||
border-radius: 6px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
min-width: 30px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
color: var(--dark-yellow);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
align-self: flex-start;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.btn-remove:hover {
|
||||
background: var(--dusty-red-hover);
|
||||
}
|
||||
|
||||
.btn-add {
|
||||
width: 100%;
|
||||
margin-top: 4px;
|
||||
padding: 8px;
|
||||
background: var(--dusty-red);
|
||||
border: 1px;
|
||||
border-radius: 8px;
|
||||
font-family: 'Mali', cursive;
|
||||
font-size: 13px;
|
||||
color: var(--dark-yellow);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-add:hover {
|
||||
background: var(--dusty-red-hover);
|
||||
}
|
||||
|
||||
/* Image upload */
|
||||
.image-drop {
|
||||
border: 1.5px dashed var(--dusty-red);
|
||||
border-radius: 8px;
|
||||
padding: 2rem;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
background: var(--dark-yellow);
|
||||
}
|
||||
|
||||
.image-drop:hover {
|
||||
border-color: var(--dusty-red-hover);
|
||||
filter: brightness(99%);
|
||||
}
|
||||
|
||||
.image-drop .upload-icon {
|
||||
font-size: 30px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.image-drop .upload-title {
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
color: var(--dusty-red);
|
||||
margin: 0 0 4px;
|
||||
}
|
||||
|
||||
.image-drop .upload-sub {
|
||||
font-size: 16px;
|
||||
color: var(--dark);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.image-preview {
|
||||
display: none;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.image-preview img {
|
||||
width: 100%;
|
||||
display: block;
|
||||
max-height: 200px;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.remove-img {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 8px;
|
||||
background: rgba(0,0,0,0.5);
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
padding: 3px 8px;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Tags */
|
||||
|
||||
.tag-input-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.tag-wrap {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.tag {
|
||||
font-size: 12px;
|
||||
background: var(--pale-yellow);
|
||||
color: var(--dusty-red);
|
||||
padding: 3px 10px;
|
||||
border-radius: 99px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.tag .remove-tag {
|
||||
cursor: pointer;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.tag .remove-tag:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Actions */
|
||||
.actions {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.btn,
|
||||
.btn-create {
|
||||
background: var(--dusty-red);
|
||||
color: var(--dark-yellow);
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
padding: 0 20px;
|
||||
height: 36px;
|
||||
font-family: 'Mali', cursive;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn:hover,
|
||||
.btn-create:hover {
|
||||
background: var(--dusty-red-hover);
|
||||
}
|
||||
|
||||
.btn-create:hover {
|
||||
transform: scale(1.03);
|
||||
}
|
||||
|
||||
.btn-create {
|
||||
width: 50%;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
border-radius: 10px;
|
||||
padding: 0 20px;
|
||||
height: 46px;
|
||||
|
||||
transition: background-color 0.1s ease, transform 0.2s ease;
|
||||
}
|
||||
|
||||
/* small screens */
|
||||
@media (max-width: 600px) {
|
||||
body {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.form-wrap {
|
||||
max-width: 400px;
|
||||
margin: 0 auto;
|
||||
padding: 1.5rem 1rem;
|
||||
}
|
||||
|
||||
label {
|
||||
font-size: 26px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
textarea,
|
||||
select {
|
||||
font-size: 20px;
|
||||
padding: 10px 14px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
textarea {
|
||||
height: auto;
|
||||
padding: 12px 14px;
|
||||
}
|
||||
|
||||
.field {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.form-section {
|
||||
padding: 1.75rem 2rem;
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 16px;
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
|
||||
.dynamic-row {
|
||||
gap: 12px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.btn-add {
|
||||
padding: 14px;
|
||||
font-size: 18px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
::placeholder {
|
||||
font-size: 50px;
|
||||
}
|
||||
|
||||
.actions {
|
||||
gap: 12px;
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
.row {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.btn,
|
||||
.btn-create {
|
||||
height: 44px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.actions {
|
||||
flex-direction: column-reverse;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.actions button {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,348 @@
|
||||
/* =========================
|
||||
Root Variables
|
||||
========================= */
|
||||
:root {
|
||||
--dusty-red: #D43F3F;
|
||||
--dusty-red-hover: #C73636;
|
||||
--dark-yellow: #FFD27F;
|
||||
--pale-yellow: #FFECB3;
|
||||
--peach: #F5A96E;
|
||||
--dark: #850000;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Global Styles
|
||||
========================= */
|
||||
.delius {
|
||||
font-family: 'Delius Swash Caps', cursive;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.mali-regular {
|
||||
font-family: 'Mali', cursive;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
body, html {
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
font-family: 'Mali', cursive;
|
||||
background-color: var(--pale-yellow);
|
||||
overflow: clip;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Layout Structure
|
||||
========================= */
|
||||
.body {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.body-left, .body-right {
|
||||
position: sticky;
|
||||
flex-grow: 0;
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Header Styles
|
||||
========================= */
|
||||
.top-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 40px;
|
||||
height: 60px;
|
||||
padding: 10px 20px;
|
||||
background-color: var(--dusty-red);
|
||||
color: var(--dark-yellow);
|
||||
}
|
||||
|
||||
.top-header .swirl {
|
||||
height: 40px;
|
||||
width: auto;
|
||||
margin: 0 20px;
|
||||
}
|
||||
|
||||
.site-name {
|
||||
font-family: 'Delius Swash Caps', serif;
|
||||
font-size: 2.5em;
|
||||
font-weight: bold;
|
||||
letter-spacing: 4px;
|
||||
color: var(--dark-yellow);
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Left Sidebar
|
||||
========================= */
|
||||
.sidebar-left {
|
||||
overflow: hidden;
|
||||
margin: 25px;
|
||||
border-radius: 20px;
|
||||
z-index: 10;
|
||||
background-color: var(--peach);
|
||||
color: var(--dark);
|
||||
padding: 6px;
|
||||
font-size: 1.75em;
|
||||
font-weight: 900;
|
||||
letter-spacing: 1.5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.sidebar-left ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.sidebar-left li {
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
|
||||
.sidebar-left a {
|
||||
color: var(--dark);
|
||||
text-decoration: none;
|
||||
transition: 0.1s ease;
|
||||
}
|
||||
|
||||
.sidebar-left a:hover {
|
||||
color: var(--dusty-red);
|
||||
}
|
||||
|
||||
.sidebar-left .nav_icon {
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
height: 100px;
|
||||
width: auto;
|
||||
border-radius: 8px;
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.sidebar-left .nav_icon:hover {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Floating Create Icon
|
||||
========================= */
|
||||
.create_icon {
|
||||
position: fixed;
|
||||
bottom: 30px;
|
||||
left: 55px;
|
||||
z-index: 1000;
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.create_icon:hover {
|
||||
transform: scale(1.02);
|
||||
}
|
||||
|
||||
.create_icon img {
|
||||
width: 150px;
|
||||
height: auto;
|
||||
border-radius: 10%;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Right Sidebar
|
||||
========================= */
|
||||
.sidebar-right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 25px;
|
||||
padding: 5px;
|
||||
height: 75%;
|
||||
border-radius: 20px;
|
||||
z-index: 10;
|
||||
background-color: var(--peach);
|
||||
color: var(--dusty-red);
|
||||
font-size: 1.3em;
|
||||
font-weight: 900;
|
||||
letter-spacing: 1.3px;
|
||||
}
|
||||
|
||||
.sidebar-right ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.sidebar-right li {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.sidebar-right a {
|
||||
color: var(--dusty-red);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Main Content Area
|
||||
========================= */
|
||||
.main-content {
|
||||
width: 100%;
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
overflow: scroll;
|
||||
scrollbar-color: var(--dusty-red) var(--pale-yellow);
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* safari and old browsers*/
|
||||
::-webkit-scrollbar-track {
|
||||
background: var(--pale-yellow);
|
||||
}
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: var(--dusty-red);
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Search Bar
|
||||
========================= */
|
||||
.search-bar, input[type="search"] {
|
||||
width: 90%;
|
||||
margin: 10px;
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
color: var(--dark-yellow);
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
padding: 0 10px;
|
||||
height: 50px;
|
||||
font-size: 20px;
|
||||
font-family: 'Mali', cursive;
|
||||
font-weight: 600;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.search-btn {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
input[type="search"] {
|
||||
background: var(--dusty-red);
|
||||
}
|
||||
|
||||
input[type="search"]::placeholder {
|
||||
color: var(--dark-yellow);
|
||||
}
|
||||
|
||||
.search-bar:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.search-bar button[type="submit"] {
|
||||
background: var(--dusty-red);
|
||||
color: var(--dark-yellow);
|
||||
font-size: 1.3em;
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
padding: 0 10px;
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.search-bar label { display: none; }
|
||||
|
||||
input[type="search"]::-webkit-search-cancel-button {
|
||||
filter: invert(1) sepia(1) saturate(2) hue-rotate(3deg);
|
||||
}
|
||||
|
||||
|
||||
/* =========================
|
||||
Recipe Cards Layout
|
||||
========================= */
|
||||
.recipe-card {
|
||||
margin-top: 35px;
|
||||
width: 99.5%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 35px;
|
||||
justify-content: flex-start;
|
||||
flex-direction: row;
|
||||
height: fit-content;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: var(--dark);
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Individual Card (Folder Style)
|
||||
========================= */
|
||||
.card {
|
||||
position: relative; /* needed for tab */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
flex: 1 1 260px;
|
||||
max-width: 400px;
|
||||
max-height: 200px;
|
||||
padding: 25px 20px 20px; /* extra space for tab */
|
||||
border-radius: 12px;
|
||||
background: var(--peach);
|
||||
}
|
||||
|
||||
/* Folder Tab */
|
||||
.card::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -16px;
|
||||
left: 0px;
|
||||
width: 100px;
|
||||
height: 28px;
|
||||
background: var(--peach);
|
||||
border-radius: 6px 6px 0 0;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Card Content
|
||||
========================= */
|
||||
.card .card-text {
|
||||
height: 100%;
|
||||
overflow: hidden; /* the scroll bars were difficult to look at, the user can just view the recipe*/
|
||||
color: var(--dark);
|
||||
transition: 0.1s ease;
|
||||
}
|
||||
|
||||
.card .card-text:hover{
|
||||
color: var(--dusty-red-hover);
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Card Image
|
||||
========================= */
|
||||
.card img {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
object-fit: cover;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Card Columns
|
||||
========================= */
|
||||
.card-left,
|
||||
.card-right {
|
||||
flex-shrink: 0;
|
||||
width: 50%;
|
||||
}
|
||||
@@ -0,0 +1,288 @@
|
||||
/* =========================
|
||||
Root Variables
|
||||
========================= */
|
||||
:root {
|
||||
--dusty-red: #D43F3F;
|
||||
--dusty-red-hover: #C73636;
|
||||
--dark-yellow: #FFD27F;
|
||||
--pale-yellow: #FFECB3;
|
||||
--peach: #F5A96E;
|
||||
--dark: #850000;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Global Styles
|
||||
========================= */
|
||||
.delius {
|
||||
font-family: 'Delius Swash Caps', cursive;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.mali-regular {
|
||||
font-family: 'Mali', cursive;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
body, html {
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
font-family: 'Mali', cursive;
|
||||
background-color: var(--pale-yellow);
|
||||
overflow: clip;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Layout Structure
|
||||
========================= */
|
||||
.body {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.body-left, .body-right {
|
||||
position: sticky;
|
||||
flex-grow: 0;
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Header Styles
|
||||
========================= */
|
||||
.top-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 40px;
|
||||
height: 60px;
|
||||
padding: 10px 20px;
|
||||
background-color: var(--dusty-red);
|
||||
color: var(--dark-yellow);
|
||||
}
|
||||
|
||||
.top-header .swirl {
|
||||
height: 40px;
|
||||
width: auto;
|
||||
margin: 0 20px;
|
||||
}
|
||||
|
||||
.site-name {
|
||||
font-family: 'Delius Swash Caps', serif;
|
||||
font-size: clamp(1.1em, 5vw, 2.5em);
|
||||
font-weight: bold;
|
||||
letter-spacing: 4px;
|
||||
color: var(--dark-yellow);
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Left Sidebar
|
||||
========================= */
|
||||
.sidebar-left {
|
||||
overflow: hidden;
|
||||
margin: 25px;
|
||||
border-radius: 20px;
|
||||
z-index: 10;
|
||||
background-color: var(--peach);
|
||||
color: var(--dark);
|
||||
padding: 6px;
|
||||
font-size: 1.75em;
|
||||
font-weight: 900;
|
||||
letter-spacing: 1.5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.sidebar-left ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.sidebar-left li {
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
|
||||
.sidebar-left a {
|
||||
color: var(--dark);
|
||||
text-decoration: none;
|
||||
transition: 0.1s ease;
|
||||
}
|
||||
|
||||
.sidebar-left a:hover {
|
||||
color: var(--dusty-red-hover);
|
||||
}
|
||||
|
||||
.sidebar-left .nav_icon {
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
height: 100px;
|
||||
width: auto;
|
||||
border-radius: 8px;
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.sidebar-left .nav_icon:hover {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Floating Create Icon
|
||||
========================= */
|
||||
.create_icon {
|
||||
position: fixed;
|
||||
bottom: 30px;
|
||||
left: 55px;
|
||||
z-index: 1000;
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.create_icon:hover {
|
||||
transform: scale(1.02);
|
||||
}
|
||||
|
||||
.create_icon img {
|
||||
width: 150px;
|
||||
height: auto;
|
||||
border-radius: 10%;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Right Sidebar
|
||||
========================= */
|
||||
.sidebar-right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 25px;
|
||||
padding: 5px;
|
||||
height: 75%;
|
||||
border-radius: 20px;
|
||||
z-index: 10;
|
||||
background-color: var(--peach);
|
||||
color: var(--dusty-red);
|
||||
font-size: 1.6em;
|
||||
font-weight: 900;
|
||||
letter-spacing: 1.5px;
|
||||
}
|
||||
|
||||
.sidebar-right ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.sidebar-right li {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.sidebar-right a {
|
||||
color: var(--dusty-red);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Main Content Area
|
||||
========================= */
|
||||
.main-content {
|
||||
width: 100%;
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
overflow: scroll;
|
||||
scrollbar-color: var(--dusty-red) var(--pale-yellow);
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* safari and old browsers*/
|
||||
::-webkit-scrollbar-track {
|
||||
background: var(--pale-yellow);
|
||||
}
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: var(--dusty-red);
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Recipe Cards Layout
|
||||
========================= */
|
||||
.recipe-card {
|
||||
margin-top: 35px;
|
||||
width: 99%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 35px;
|
||||
justify-content: flex-start;
|
||||
flex-direction: row;
|
||||
height: fit-content;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: var(--dark);
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Individual Card (Folder Style)
|
||||
========================= */
|
||||
.card {
|
||||
position: relative; /* needed for tab */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
flex: 1 1 260px;
|
||||
max-width: 400px;
|
||||
max-height: 200px;
|
||||
padding: 25px 20px 20px; /* extra space for tab */
|
||||
border-radius: 12px;
|
||||
background: var(--peach);
|
||||
}
|
||||
|
||||
/* Folder Tab */
|
||||
.card::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -16px;
|
||||
left: 0px;
|
||||
width: 100px;
|
||||
height: 28px;
|
||||
background: var(--peach);
|
||||
border-radius: 6px 6px 0 0;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Card Content
|
||||
========================= */
|
||||
.card .card-text {
|
||||
height: 100%;
|
||||
overflow: hidden; /* the scroll bars were difficult to look at, the user can just view the recipe*/
|
||||
color: var(--dark);
|
||||
transition: 0.1s ease;
|
||||
}
|
||||
|
||||
.card .card-text:hover{
|
||||
color: var(--dusty-red-hover);
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Card Image
|
||||
========================= */
|
||||
.card img {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
object-fit: cover;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Card Columns
|
||||
========================= */
|
||||
.card-left,
|
||||
.card-right {
|
||||
flex-shrink: 0;
|
||||
width: 50%;
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
/* =========================
|
||||
Root Variables
|
||||
========================= */
|
||||
:root {
|
||||
--dusty-red: #D43F3F;
|
||||
--dusty-red-hover: #C73636;
|
||||
--dark-yellow: #FFD27F;
|
||||
--pale-yellow: #FFECB3;
|
||||
--peach: #F5A96E;
|
||||
--dark: #850000;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Global Styles
|
||||
========================= */
|
||||
.delius {
|
||||
font-family: 'Delius Swash Caps', cursive;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.mali-regular {
|
||||
font-family: 'Mali', cursive;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
body,
|
||||
html {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
font-family: 'Mali', cursive;
|
||||
background-color: var(--pale-yellow);
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Layout Container
|
||||
========================= */
|
||||
.container {
|
||||
display: flex;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Header Styles
|
||||
========================= */
|
||||
.top-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 40px;
|
||||
|
||||
height: 60px;
|
||||
padding: 10px 20px;
|
||||
|
||||
background-color: var(--dusty-red);
|
||||
color: var(--dark-yellow);
|
||||
}
|
||||
|
||||
.top-header .swirl {
|
||||
height: 40px;
|
||||
width: auto;
|
||||
margin: 0 20px;
|
||||
}
|
||||
|
||||
.site-name {
|
||||
font-family: 'Delius Swash Caps', cursive;
|
||||
font-size: 2.5em;
|
||||
font-weight: bold;
|
||||
letter-spacing: 4px;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Main Content Area
|
||||
========================= */
|
||||
.main-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
flex-grow: 0;
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Login Box
|
||||
========================= */
|
||||
.login-box {
|
||||
width: 400px;
|
||||
padding: 45px;
|
||||
border-radius: 20px;
|
||||
|
||||
background-color: var(--peach);
|
||||
color: var(--dark);
|
||||
}
|
||||
|
||||
.login-box h2 {
|
||||
margin: 8px 0 30px;
|
||||
|
||||
font-size: 50px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Form Labels */
|
||||
.login-box label {
|
||||
display: block;
|
||||
width: 90%;
|
||||
margin: 10px;
|
||||
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Form Inputs */
|
||||
.login-box input {
|
||||
display: block;
|
||||
width: 90%;
|
||||
margin: 5px auto 0;
|
||||
padding: 10px;
|
||||
|
||||
font-size: 20px;
|
||||
border-radius: 10px;
|
||||
border: 2.5px solid var(--dusty-red);
|
||||
background-color: var(--pale-yellow);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.alert {
|
||||
color: var(--dusty-red);
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Button Styles
|
||||
========================= */
|
||||
.login-box button {
|
||||
display: block;
|
||||
width: 40%;
|
||||
margin: 20px auto 0;
|
||||
padding: 10px;
|
||||
|
||||
font-family: 'Mali', cursive;
|
||||
font-weight: bold;
|
||||
color: var(--dark-yellow);
|
||||
background-color: var(--dusty-red);
|
||||
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
cursor: pointer;
|
||||
|
||||
transition: background-color 0.1s ease, transform 0.2s ease;
|
||||
}
|
||||
|
||||
.login-box button:hover {
|
||||
background-color: var(--dusty-red-hover);
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Sign Up Section
|
||||
========================= */
|
||||
.sign_up {
|
||||
color: var(--dusty-red);
|
||||
}
|
||||
|
||||
.sign_up a {
|
||||
display: inline-block;
|
||||
color: var(--dark);
|
||||
text-decoration: none;
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.sign_up a:hover {
|
||||
transform: scale(1.03);
|
||||
}
|
||||
@@ -0,0 +1,275 @@
|
||||
/* =========================
|
||||
Root Variables
|
||||
========================= */
|
||||
:root {
|
||||
--dusty-red: #D43F3F;
|
||||
--dusty-red-hover: #C73636;
|
||||
--dark-yellow: #FFD27F;
|
||||
--pale-yellow: #FFECB3;
|
||||
--peach: #F5A96E;
|
||||
--dark: #850000;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Global Styles
|
||||
========================= */
|
||||
.delius {
|
||||
font-family: 'Delius Swash Caps', cursive;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.mali-regular {
|
||||
font-family: 'Mali', cursive;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
body, html {
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
font-family: 'Mali', cursive;
|
||||
background-color: var(--pale-yellow);
|
||||
overflow: clip;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Layout Structure
|
||||
========================= */
|
||||
.body {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.body-left, .body-right {
|
||||
position: sticky;
|
||||
flex-grow: 0;
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Header Styles
|
||||
========================= */
|
||||
.top-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 40px;
|
||||
height: 60px;
|
||||
padding: 10px 20px;
|
||||
background-color: var(--dusty-red);
|
||||
color: var(--dark-yellow);
|
||||
}
|
||||
|
||||
.top-header .swirl {
|
||||
height: 40px;
|
||||
width: auto;
|
||||
margin: 0 20px;
|
||||
}
|
||||
|
||||
.site-name {
|
||||
font-family: 'Delius Swash Caps', serif;
|
||||
font-size: 2.5em;
|
||||
font-weight: bold;
|
||||
letter-spacing: 4px;
|
||||
color: var(--dark-yellow);
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Left Sidebar
|
||||
========================= */
|
||||
.sidebar-left {
|
||||
overflow: hidden;
|
||||
margin: 25px;
|
||||
border-radius: 20px;
|
||||
z-index: 10;
|
||||
background-color: var(--peach);
|
||||
color: var(--dark);
|
||||
padding: 6px;
|
||||
font-size: 1.75em;
|
||||
font-weight: 900;
|
||||
letter-spacing: 1.5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.sidebar-left ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.sidebar-left li {
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
|
||||
.sidebar-left a {
|
||||
color: var(--dark);
|
||||
text-decoration: none;
|
||||
transition: 0.1s ease;
|
||||
}
|
||||
|
||||
.sidebar-left a:hover {
|
||||
color: var(--dusty-red);
|
||||
}
|
||||
|
||||
.sidebar-left .nav_icon {
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
height: 100px;
|
||||
width: auto;
|
||||
border-radius: 8px;
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.sidebar-left .nav_icon:hover {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Floating Create Icon
|
||||
========================= */
|
||||
.create_icon {
|
||||
position: fixed;
|
||||
bottom: 30px;
|
||||
left: 55px;
|
||||
z-index: 1000;
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.create_icon:hover {
|
||||
transform: scale(1.02);
|
||||
}
|
||||
|
||||
.create_icon img {
|
||||
width: 150px;
|
||||
height: auto;
|
||||
border-radius: 10%;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Right Sidebar
|
||||
========================= */
|
||||
.sidebar-right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 25px;
|
||||
padding: 5px;
|
||||
height: 75%;
|
||||
border-radius: 20px;
|
||||
z-index: 10;
|
||||
background-color: var(--peach);
|
||||
color: var(--dusty-red);
|
||||
font-size: 1.6em;
|
||||
font-weight: 900;
|
||||
letter-spacing: 1.5px;
|
||||
}
|
||||
|
||||
.sidebar-right ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.sidebar-right li {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.sidebar-right a {
|
||||
color: var(--dusty-red);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Main Content Area
|
||||
========================= */
|
||||
.main-content {
|
||||
width: 100%;
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
overflow: scroll;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Recipe Cards Layout
|
||||
========================= */
|
||||
.recipe-card {
|
||||
margin-top: 35px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 35px;
|
||||
justify-content: flex-start;
|
||||
flex-direction: row;
|
||||
height: fit-content;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: var(--dark);
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Individual Card (Folder Style)
|
||||
========================= */
|
||||
.card {
|
||||
position: relative; /* needed for tab */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
flex: 1 1 260px;
|
||||
max-width: 400px;
|
||||
max-height: 200px;
|
||||
padding: 25px 20px 20px; /* extra space for tab */
|
||||
border-radius: 12px;
|
||||
background: var(--peach);
|
||||
}
|
||||
|
||||
/* Folder Tab */
|
||||
.card::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -16px;
|
||||
left: 0px;
|
||||
width: 100px;
|
||||
height: 28px;
|
||||
background: var(--peach);
|
||||
border-radius: 6px 6px 0 0;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Card Content
|
||||
========================= */
|
||||
.card .card-text {
|
||||
height: 100%;
|
||||
overflow: hidden; /* the scroll bars were difficult to look at, the user can just view the recipe*/
|
||||
font-family: 'Roboto', sans-serif;
|
||||
color: var(--dark);
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Card Image
|
||||
========================= */
|
||||
.card img {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
object-fit: cover;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
Card Columns
|
||||
========================= */
|
||||
.card-left,
|
||||
.card-right {
|
||||
flex-shrink: 0;
|
||||
width: 50%;
|
||||
}
|
||||
|
After Width: | Height: | Size: 124 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 140 KiB |
|
After Width: | Height: | Size: 140 KiB |
|
After Width: | Height: | Size: 28 KiB |
@@ -0,0 +1,101 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Create Thyme Crunch Account</title>
|
||||
<link rel="stylesheet" th:href="@{css/create-account.css}">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Delius+Swash+Caps&family=Mali:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,200;1,300;1,400;1,500;1,600;1,700" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header class="top-header">
|
||||
<img th:src="@{images/header_left.png}" alt="Violin f-hole shape to the left of header." class="swirl">
|
||||
<h1 class="site-name">Thyme Crunch</h1>
|
||||
<img th:src="@{images/header_right.png}" alt="Violin f-hole shape to the right of header." class="swirl">
|
||||
</header>
|
||||
|
||||
<!-- Main Content -->
|
||||
<main class="main-content">
|
||||
<div class="login-box">
|
||||
<h2>Create Account</h2>
|
||||
|
||||
<form id="createUserForm">
|
||||
<div class="rows">
|
||||
<label for="username">Username</label>
|
||||
<input type="text" id="username" required>
|
||||
</div>
|
||||
<div class="rows">
|
||||
<label for="email">Email</label>
|
||||
<input type="email" id="email" required>
|
||||
</div>
|
||||
<div class="rows">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" id="password" required>
|
||||
</div>
|
||||
<div class="rows">
|
||||
<label for="confirmPassword">Confirm Password</label>
|
||||
<input type="password" id="confirmPassword" required>
|
||||
</div>
|
||||
<p id="passwordError"></p>
|
||||
|
||||
<button type="submit">Create</button>
|
||||
</form>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
const passwordField = document.getElementById("password");
|
||||
const confirmPasswordField = document.getElementById("confirmPassword");
|
||||
|
||||
function checkPasswords() {
|
||||
|
||||
if (confirmPasswordField.value === "") {
|
||||
confirmPasswordField.classList.remove("invalid");
|
||||
return;
|
||||
}
|
||||
|
||||
if (passwordField.value !== confirmPasswordField.value) {
|
||||
confirmPasswordField.classList.add("invalid");
|
||||
} else {
|
||||
confirmPasswordField.classList.remove("invalid");
|
||||
}
|
||||
}
|
||||
|
||||
passwordField.addEventListener("input", checkPasswords);
|
||||
confirmPasswordField.addEventListener("input", checkPasswords);
|
||||
|
||||
document.getElementById("createUserForm").addEventListener("submit", function(e) {
|
||||
|
||||
const password = passwordField.value;
|
||||
const confirmPassword = confirmPasswordField.value;
|
||||
|
||||
if (password !== confirmPassword) {
|
||||
e.preventDefault();
|
||||
confirmPasswordField.classList.add("invalid");
|
||||
return;
|
||||
}
|
||||
|
||||
const userData = {
|
||||
username: document.getElementById("username").value,
|
||||
email: document.getElementById("email").value,
|
||||
hashedpassword: password,
|
||||
role: "USER"
|
||||
};
|
||||
|
||||
fetch("http://localhost:8080/api/users", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
});
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,344 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="_csrf_header" th:content="${_csrf.headerName}"/>
|
||||
<meta name="_csrf" th:content="${_csrf.token}"/>
|
||||
<title>Create Thyme Crunch Recipe</title>
|
||||
<link rel="stylesheet" th:href="@{css/create-recipe.css}">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Delius+Swash+Caps&family=Mali:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,200;1,300;1,400;1,500;1,600;1,700" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header class="top-header">
|
||||
<img th:src="@{images/header_left.png}" alt="Violin f-hole shape to the left of header." class="swirl">
|
||||
<h1 class="site-name">Thyme Crunch</h1>
|
||||
<img th:src="@{images/header_right.png}" alt="Violin f-hole shape to the right of header." class="swirl">
|
||||
</header>
|
||||
|
||||
<div class="form-wrap">
|
||||
<div class="form-split">
|
||||
|
||||
<!-- Main Content -->
|
||||
<div class="form-section">
|
||||
<div class="section-title">New Recipe</div>
|
||||
|
||||
<div class="field">
|
||||
<label for="title">Title <span class="required">*</span></label>
|
||||
<input type="text" id="title" placeholder="Your recipe title...">
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label for="desc">Description <span class="required">*</span></label>
|
||||
<textarea id="desc" rows="3" placeholder="Briefly describe your recipe. Who or where is it from?"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label>Ingredients <span class="required">*</span></label>
|
||||
<div id="ingredients-container"></div>
|
||||
<button class="btn-add" id="add-ingredient-btn">+ Add ingredient</button>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label>Instructions <span class="required">*</span></label>
|
||||
<div id="steps-container"></div>
|
||||
<button class="btn-add" id="add-step-btn">+ Add step</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Cover image / Right -->
|
||||
<div class="form-section">
|
||||
<div class="field">
|
||||
<div class="image-drop" id="drop-zone">
|
||||
<p class="upload-title">Click to upload or drag and drop an image.</p>
|
||||
</div>
|
||||
<div class="image-preview" id="preview">
|
||||
<img id="preview-img" src="" alt="Cover preview">
|
||||
<button class="remove-img" id="remove-img-btn">Remove</button>
|
||||
</div>
|
||||
<input type="file" id="img-input" accept="image/*" style="display: none;">
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label for="prep">Preparation Time: <span class="required">*</span></label>
|
||||
<input type="text" id="prep" placeholder="0">
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label for="cooking">Cooking Time: <span class="required">*</span></label>
|
||||
<input type="text" id="cooking" placeholder="0">
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label for="servings">Servings: <span class="required">*</span></label>
|
||||
<input type="text" id="servings" placeholder="0">
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label for="cost">Estimated Cost: <span class="required">*</span></label>
|
||||
<input type="text" id="cost" placeholder="0">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Tags -->
|
||||
<div class="form-section">
|
||||
|
||||
<div class="field">
|
||||
<label>Tags</label>
|
||||
<div class="tag-input-row">
|
||||
<input type="text" id="tag-input" placeholder="Type in a tag and click Add">
|
||||
<button class="btn" id="add-tag-btn">Add</button>
|
||||
</div>
|
||||
<div class="tag-wrap" id="tag-wrap"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<button class="btn-create" id="publish-btn">CREATE</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
// ---- Ingredients ----
|
||||
const ingredientContainer = document.getElementById('ingredients-container');
|
||||
document.getElementById('add-ingredient-btn').addEventListener('click', addIngredient);
|
||||
addIngredient(); // start with one
|
||||
|
||||
function addIngredient() {
|
||||
const row = document.createElement('div');
|
||||
row.className = 'dynamic-row';
|
||||
row.innerHTML = `
|
||||
<input type="text" class="ing-name" placeholder="Ingredient (e.g. Sugar)">
|
||||
<input type="text" class="ing-qty" placeholder="Qty (e.g. 3)">
|
||||
<input type="text" class="ing-unit" placeholder="Unit (e.g. tbsp)">
|
||||
<input type="text" class="ing-notes" placeholder="Notes (optional)">
|
||||
<button class="btn-remove" title="Remove">✕</button>`;
|
||||
row.querySelector('.btn-remove').addEventListener('click', () => {
|
||||
row.remove();
|
||||
});
|
||||
ingredientContainer.appendChild(row);
|
||||
}
|
||||
|
||||
// ---- Steps ----
|
||||
const stepsContainer = document.getElementById('steps-container');
|
||||
document.getElementById('add-step-btn').addEventListener('click', addStep);
|
||||
addStep(); // start with one
|
||||
|
||||
function addStep() {
|
||||
const row = document.createElement('div');
|
||||
row.className = 'dynamic-row';
|
||||
row.innerHTML = `
|
||||
<div class="step-bubble">?</div>
|
||||
<textarea placeholder="Describe this step..."></textarea>
|
||||
<button class="btn-remove" title="Remove">✕</button>
|
||||
`;
|
||||
row.querySelector('.btn-remove').addEventListener('click', () => {
|
||||
row.remove();
|
||||
renumberSteps();
|
||||
});
|
||||
stepsContainer.appendChild(row);
|
||||
renumberSteps();
|
||||
}
|
||||
|
||||
function renumberSteps() {
|
||||
stepsContainer.querySelectorAll('.step-bubble').forEach((bubble, i) => {
|
||||
bubble.textContent = i + 1;
|
||||
});
|
||||
}
|
||||
|
||||
// ---- Collecting on submit ----
|
||||
// Call this wherever you build your POST payload:
|
||||
function getIngredients() {
|
||||
return [...ingredientContainer.querySelectorAll('.dynamic-row')].map(row => {
|
||||
qtyValue = row.querySelector('.ing-qty').value.trim(); // quantity should be a number NOT A STRING
|
||||
return {
|
||||
ingredient: {
|
||||
name: row.querySelector('.ing-name').value.trim()
|
||||
},
|
||||
quantity: Number(qtyValue),
|
||||
unit: row.querySelector('.ing-unit').value.trim(),
|
||||
notes: row.querySelector('.ing-notes').value.trim()
|
||||
};
|
||||
}).filter(item => item.ingredient.name);
|
||||
}
|
||||
|
||||
|
||||
function getSteps() {
|
||||
return [...stepsContainer.querySelectorAll('textarea')]
|
||||
.map((el, i) => ({ step_number: i + 1, instruction: el.value.trim() }))
|
||||
.filter(item => item.instruction);
|
||||
}
|
||||
|
||||
// --- Image upload ---
|
||||
const dropZone = document.getElementById('drop-zone');
|
||||
const imgInput = document.getElementById('img-input');
|
||||
|
||||
dropZone.addEventListener('click', () => imgInput.click());
|
||||
|
||||
imgInput.addEventListener('change', function () {
|
||||
if (!this.files || !this.files[0]) return;
|
||||
const url = URL.createObjectURL(this.files[0]);
|
||||
document.getElementById('preview-img').src = url;
|
||||
dropZone.style.display = 'none';
|
||||
document.getElementById('preview').style.display = 'block';
|
||||
});
|
||||
|
||||
document.getElementById('remove-img-btn').addEventListener('click', function () {
|
||||
imgInput.value = '';
|
||||
document.getElementById('preview').style.display = 'none';
|
||||
dropZone.style.display = 'block';
|
||||
});
|
||||
|
||||
// --- Tags ---
|
||||
const tags = [];
|
||||
|
||||
document.getElementById('tag-input').addEventListener('keydown', function (e) {
|
||||
if (e.key === 'Enter') {
|
||||
e.preventDefault();
|
||||
addTag();
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById('add-tag-btn').addEventListener('click', addTag);
|
||||
|
||||
function addTag() {
|
||||
const input = document.getElementById('tag-input');
|
||||
const val = input.value.trim().toLowerCase().replace(/\s+/g, '-');
|
||||
if (!val || tags.includes(val)) { input.value = ''; return; }
|
||||
tags.push(val);
|
||||
input.value = '';
|
||||
renderTags();
|
||||
}
|
||||
|
||||
function removeTag(t) {
|
||||
tags.splice(tags.indexOf(t), 1);
|
||||
renderTags();
|
||||
}
|
||||
|
||||
function renderTags() {
|
||||
document.getElementById('tag-wrap').innerHTML = tags
|
||||
.map(t => `<div class="tag">${t} <span class="remove-tag" data-tag="${t}">✕</span></div>`)
|
||||
.join('');
|
||||
|
||||
document.querySelectorAll('.remove-tag').forEach(btn => {
|
||||
btn.addEventListener('click', () => removeTag(btn.dataset.tag));
|
||||
});
|
||||
}
|
||||
|
||||
async function getLoggedInUser() {
|
||||
try {
|
||||
const res = await fetch('http://localhost:8080/api/users/me', {
|
||||
credentials: 'include'
|
||||
});
|
||||
if (!res.ok) throw new Error('Failed to get logged-in user');
|
||||
return await res.json();
|
||||
} catch (err) {
|
||||
console.error('Error fetching user:', err);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function buildRecipeJSON(user) {
|
||||
const title = document.getElementById('title').value.trim();
|
||||
const description = document.getElementById('desc').value.trim();
|
||||
const prepTimeMinutes = Number(document.getElementById('prep').value);
|
||||
const cookTimeMinutes = Number(document.getElementById('cooking').value);
|
||||
const servings = Number(document.getElementById('servings').value);
|
||||
const status = "DRAFT";
|
||||
|
||||
// Ingredients
|
||||
const recipeIngredients = [...document.querySelectorAll('#ingredients-container .dynamic-row')]
|
||||
.map(row => {
|
||||
const qtyValue = Number(row.querySelector('.ing-qty').value.trim());
|
||||
return {
|
||||
ingredient: { name: row.querySelector('.ing-name').value.trim() },
|
||||
quantity: qtyValue,
|
||||
unit: row.querySelector('.ing-unit').value.trim(),
|
||||
notes: row.querySelector('.ing-notes').value.trim()
|
||||
};
|
||||
})
|
||||
.filter(item => item.ingredient.name);
|
||||
|
||||
// Steps
|
||||
const steps = [...document.querySelectorAll('#steps-container textarea')]
|
||||
.map((el, i) => ({ stepNumber: i + 1, instruction: el.value.trim() }))
|
||||
.filter(item => item.instruction);
|
||||
|
||||
// Images
|
||||
|
||||
|
||||
// Tags
|
||||
const tagsInput = tags;
|
||||
const tagsArray = tagsInput.map(t => ({ name: t }));
|
||||
|
||||
return {
|
||||
title,
|
||||
description,
|
||||
prepTimeMinutes,
|
||||
cookTimeMinutes,
|
||||
servings,
|
||||
status,
|
||||
user,
|
||||
recipeIngredients,
|
||||
steps,
|
||||
//images,
|
||||
tags: tagsArray
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
document.getElementById('publish-btn').addEventListener('click', async function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
const user = await getLoggedInUser();
|
||||
if (!user) {
|
||||
alert("Unable to fetch logged-in user. Please refresh and try again.");
|
||||
return;
|
||||
}
|
||||
|
||||
console.log("Logged-in user:", user);
|
||||
const recipeJSON = buildRecipeJSON(user);
|
||||
console.log("Recipe JSON to submit:", JSON.stringify(recipeJSON, null, 2));
|
||||
|
||||
try {
|
||||
|
||||
const csrfToken = document.querySelector('meta[name="_csrf"]').getAttribute('content');
|
||||
const csrfHeader = document.querySelector('meta[name="_csrf_header"]').getAttribute('content');
|
||||
|
||||
|
||||
|
||||
const res = await fetch('http://localhost:8080/api/recipes', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
[csrfHeader]: csrfToken,
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(recipeJSON),
|
||||
credentials: 'include'
|
||||
});
|
||||
|
||||
if (res.ok) {
|
||||
const data = await res.json();
|
||||
console.log("Recipe created:", data);
|
||||
alert("Recipe created successfully!");
|
||||
} else {
|
||||
const errorData = await res.json();
|
||||
console.error("Validation errors:", errorData);
|
||||
|
||||
|
||||
const firstError = Object.values(errorData)[0];
|
||||
alert(firstError);
|
||||
}
|
||||
} catch (err) {
|
||||
console.error("Network error:", err);
|
||||
alert("Network error. Check console for details.");
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,75 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Thyme Crunch Home</title>
|
||||
<link rel="stylesheet" th:href="@{css/explore.css}">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Delius+Swash+Caps&family=Mali:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,200;1,300;1,400;1,500;1,600;1,700" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header class="top-header">
|
||||
<img th:src="@{images/header_left.png}" alt="Violin f-hole shape to the left of header." class="swirl">
|
||||
<h1 class="site-name">Thyme Crunch</h1>
|
||||
<img th:src="@{images/header_right.png}" alt="Violin f-hole shape to the right of header." class="swirl">
|
||||
</header>
|
||||
|
||||
<div class="body">
|
||||
<!--Navigation Bar -->
|
||||
<div class="body-left">
|
||||
<nav class="sidebar-left">
|
||||
<ul>
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="#">Explore</a></li>
|
||||
<li><a href="#">Profile</a></li>
|
||||
<li><a href="#">Saved</a></li>
|
||||
<li>
|
||||
<form th:action="@{/logout}" method="post">
|
||||
<input type="image" th:src="@{images/logout_icon.png}" alt="Logout button" class="nav_icon"/>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<a th:href="@{/create}" target="_blank" class="create_icon">
|
||||
<img th:src="@{images/create_icon.png}" alt="Create New Recipe Icon (Red mixing bowl with a spoon and yellow addition symbol.">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Main Content -->
|
||||
<main class="main-content">
|
||||
<div class="search-bar">
|
||||
<form action="/search" method="get">
|
||||
<label for="site-search">Search:</label>
|
||||
<div class="search-btn">
|
||||
<input type="search" id="site-search" name="q" placeholder="Search for recipes...">
|
||||
<button type="submit"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="recipe-card">
|
||||
|
||||
<a th:href="@{/recipes/{id}(id=${recipe.id})}" class="card" th:each="recipe : ${recipes}">
|
||||
<div class="card-text">
|
||||
<h2 th:text="${recipe.title}"></h2>
|
||||
<p th:text="${recipe.description}"></p>
|
||||
</div>
|
||||
<div class="card-right">
|
||||
<div th:each="img : ${recipe.images}">
|
||||
<img th:src="${img.imageUrl}" alt="Recipe Image"/>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!--Filter -->
|
||||
<div class="body-right">
|
||||
<div class="sidebar-right">
|
||||
<h1> FILTER </h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,65 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Thyme Crunch Home</title>
|
||||
<link rel="stylesheet" th:href="@{css/home.css}">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Delius+Swash+Caps&family=Mali:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,200;1,300;1,400;1,500;1,600;1,700" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header class="top-header">
|
||||
<img th:src="@{images/header_left.png}" alt="Violin f-hole shape to the left of header." class="swirl">
|
||||
<h1 class="site-name">Thyme Crunch</h1>
|
||||
<img th:src="@{images/header_right.png}" alt="Violin f-hole shape to the right of header." class="swirl">
|
||||
</header>
|
||||
|
||||
<div class="body">
|
||||
<!--Navigation Bar -->
|
||||
<div class="body-left">
|
||||
<nav class="sidebar-left">
|
||||
<ul>
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a th:href="@{/explore}">Explore</a></li>
|
||||
<li><a href="#">Profile</a></li>
|
||||
<li><a href="#">Saved</a></li>
|
||||
<li>
|
||||
<form th:action="@{/logout}" method="post">
|
||||
<input type="image" th:src="@{images/logout_icon.png}" alt="Logout button" class="nav_icon"/>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<a th:href="@{/create}" target="_blank" class="create_icon">
|
||||
<img th:src="@{images/create_icon.png}" alt="Create New Recipe Icon (Red mixing bowl with a spoon and yellow addition symbol.">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Main Content -->
|
||||
<main class="main-content">
|
||||
<div class="recipe-card">
|
||||
|
||||
<a th:href="@{/recipes/{id}(id=${recipe.id})}" class="card" th:each="recipe : ${recipes}">
|
||||
<div class="card-text">
|
||||
<h2 th:text="${recipe.title}"></h2>
|
||||
<p th:text="${recipe.description}"></p>
|
||||
</div>
|
||||
<div class="card-right">
|
||||
<div th:each="img : ${recipe.images}">
|
||||
<img th:src="${img.imageUrl}" alt="Recipe Image"/>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!--New Bar -->
|
||||
<div class="body-right">
|
||||
<div class="sidebar-right">
|
||||
<h1> NEW </h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Thyme Crunch Login</title>
|
||||
<link rel="stylesheet" th:href="@{css/login.css}">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Delius+Swash+Caps&family=Mali:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,200;1,300;1,400;1,500;1,600;1,700" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header class="top-header">
|
||||
<img th:src="@{images/header_left.png}" alt="Violin f-hole shape to the left of header." class="swirl">
|
||||
<h1 class="site-name">Thyme Crunch</h1>
|
||||
<img th:src="@{images/header_right.png}" alt="Violin f-hole shape to the right of header." class="swirl">
|
||||
|
||||
</header>
|
||||
|
||||
<!-- Main Content -->
|
||||
<main class="main-content">
|
||||
<div class="login-box">
|
||||
<h2>Log In</h2>
|
||||
<div th:if="${param.error}" class="alert">
|
||||
Invalid username and password.</div>
|
||||
<div th:if="${param.logout}" class="alert">
|
||||
You have been logged out.</div>
|
||||
<form th:action="@{/login}" method="post">
|
||||
<label for="username">Username</label>
|
||||
<input type="text" id="username" name="username" required>
|
||||
|
||||
<label for="password">Password</label>
|
||||
<input type="password" id="password" name="password" required>
|
||||
|
||||
<button type="submit">Enter</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="sign_up">
|
||||
<h3> OR <a th:href="@{/register}"><b>SIGN UP</b></a> FOR AN ACCOUNT </h3>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,64 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Thyme Crunch View Recipe</title>
|
||||
<link rel="stylesheet" th:href="@{/css/view-recipe.css}">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Delius+Swash+Caps&family=Mali:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,200;1,300;1,400;1,500;1,600;1,700" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header class="top-header">
|
||||
<img th:src="@{images/header_left.png}" alt="Violin f-hole shape to the left of header." class="swirl">
|
||||
<h1 class="site-name">Thyme Crunch</h1>
|
||||
<img th:src="@{images/header_right.png}" alt="Violin f-hole shape to the right of header." class="swirl">
|
||||
</header>
|
||||
|
||||
<div class="body">
|
||||
<!--Navigation Bar -->
|
||||
<div class="body-left">
|
||||
<nav class="sidebar-left">
|
||||
<ul>
|
||||
<li><a href="#">Home</a></li>
|
||||
<li><a href="#">Explore</a></li>
|
||||
<li><a href="#">Profile</a></li>
|
||||
<li><a href="#">Saved</a></li>
|
||||
<li>
|
||||
<form th:action="@{/logout}" method="post">
|
||||
<input type="image" th:src="@{images/logout_icon.png}" alt="Logout button" class="nav_icon"/>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<a th:href="@{/create}" target="_blank" class="create_icon">
|
||||
<img th:src="@{images/create_icon.png}" alt="Description of the icon">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Main Content -->
|
||||
<main class="main-content">
|
||||
<div class="form-wrap">
|
||||
<h1 th:text="${recipe.title}"></h1>
|
||||
<p th:text="${recipe.description}"></p>
|
||||
|
||||
<div class="form-section">
|
||||
<div class="section-title">Ingredients</div>
|
||||
<ul>
|
||||
<li th:each="ingredient : ${recipe.ingredients}"
|
||||
th:text="${ingredient.name}"></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="form-section">
|
||||
<div class="section-title">Instructions</div>
|
||||
<ol class="step-list">
|
||||
<li th:each="step : ${#lists.sort(recipe.steps, comparingInt(step -> step.stepNumber))}">
|
||||
</ol
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||