responsive cards

This commit is contained in:
John Hess 2024-06-25 12:37:39 -05:00
parent 1fbfc285a4
commit b00cc94e73
5 changed files with 93 additions and 83 deletions

View file

@ -46,52 +46,54 @@ a:active {
// -------------------------
.container {
width: 100%;
max-width: 400px;
max-width: 1144px;
margin: 0 auto;
}
.header {
position: relative;
background-color: $gold;
// Set background image in HTML so we can use site.baseurl
background-size: 170px;
padding: 0 0 100px 0;
text-align: center;
border-radius: 0 0 20px 20px;
z-index: 1;
height: 48px;
// center content vertically
display: flex;
align-items: center;
// Language selector
&-wrapper {
.header-container {
display: flex;
align-items: center;
justify-content: space-between;
flex-direction: column;
}
.header-menu {
&-list {
padding-left: 0;
list-style: none;
li {
display: inline-block;
&.active {
font-weight: 600;
}
&:not(:last-child) {
margin: 10px;
}
}
}
width: 100%;
padding: 0 20px;
}
.title {
text-align: left;
font-size: 14;
font-weight: 600;
margin: auto;
width: -webkit-fill-available;
}
.language-selector {
align-items: center;
background-color: #F4F3F2;
border-radius: 16px;
display: flex;
height: 32px;
padding: 0 10px;
width: 100px;
}
.language-code {
margin: 0 8px;
}
}
.header-content {
position: relative;
z-index: 2;
}
.header-image {
width: 150px;
height: 28px;
width: 28px;
margin-right: 20px;
}
.header-title {
@ -102,24 +104,39 @@ a:active {
}
.content {
position: relative;
top: -100px;
padding: 20px;
z-index: 2;
}
.card-set {
display: grid;
grid-template-columns: repeat(2, 1fr); /* Default to 2 columns */
gap: 10px; /* Adjust the gap between the cards */
}
@media (min-width: 900px) {
.card-set {
grid-template-columns: repeat(4, 1fr); /* 4 columns for larger screens */
}
}
h1.homepage-title {
margin: 30px 0;
}
.card {
align-items: center;
background-color: white;
padding: 20px;
margin: 10px 0;
border: 1px solid #E1E1DE;
border-radius: 10px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
text-align: center;
font-size: 1.2em;
color: #333;
display: flex;
flex-direction: column;
align-items: center;
font-size: 16px;
height: 160px;
justify-content: center;
margin: 10px 0;
padding: 20px;
text-align: center;
}
.card-icon {