Model Examples
No edit summary |
No edit summary |
||
Line 45: | Line 45: | ||
.container { | .container { | ||
display: flex; | display: flex; | ||
flex-wrap: wrap; /* Allows sidebar to wrap under the content on smaller screens */ | |||
} | } | ||
.sidebar { | .sidebar { | ||
flex: 0 0 200px; | flex: 0 0 200px; | ||
padding: 20px; | padding: 20px; | ||
display: flex; | display: flex; | ||
Line 62: | Line 63: | ||
} | } | ||
.card-container , .card-container-3 { | .card-container, .card-container-3 { | ||
display: grid; | display: grid; | ||
grid-template-columns: repeat( | grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Makes the grid responsive */ | ||
grid-gap: 32px; | grid-gap: 32px; | ||
margin: 0 auto; | margin: 0 auto; | ||
padding: 0 20px; /* Add padding to maintain spacing on smaller screens */ | |||
} | } | ||
.cards { | .cards { | ||
background: white; | background: white; | ||
border-radius: 6px; | border-radius: 6px; | ||
Line 124: | Line 124: | ||
} | } | ||
.sidebar a { | |||
display: block; | |||
color: #182933; | |||
text-decoration: none; | |||
margin-bottom: 10px; | |||
padding-left: 20px; | |||
position: relative; | |||
font-weight: 500; | |||
} | } | ||
.sidebar a.active { | |||
color: #1A50AD; | |||
} | |||
.sidebar a.active svg { | |||
position: absolute; | |||
left: 0; | |||
top: 0; | |||
} | |||
.sidebar | @media (max-width: 767px) { | ||
.sidebar { | |||
width: 100%; /* Full width on mobile */ | |||
order: -1; /* Sidebar on top on mobile */ | |||
} | } | ||
.sidebar a | .sidebar a { | ||
padding-left: 0.5em; /* Smaller left padding on mobile */ | |||
} | } | ||
.card-container, .card-container-3 { | |||
grid-template-columns: 1fr; /* Single column layout on mobile */ | |||
} | } | ||
. | .cards { | ||
width: auto; /* Full width cards on mobile */ | |||
box-sizing: border-box; /* Include padding and border in width */ | |||
} | } | ||
.search-container | .search-container { | ||
width: calc(100% - 40px); /* Adjust the width to account for padding */ | |||
margin: 0 auto; /* Center the search container */ | |||
flex-direction: column; /* Stack the search elements on top of each other */ | |||
padding: 0 10px; | padding: 0 10px; | ||
} | } | ||
.search-container input[type="search"], | |||
.search-container svg { | .search-container svg { | ||
margin: 0 | flex: none; /* Disable flex on mobile for these elements */ | ||
width: auto; /* Adjust width to fit content */ | |||
margin: 8px 0; /* Add some margin top and bottom */ | |||
} | } | ||
.search-container input[type="search"] { | |||
.search-container input | order: 2; /* Ensure input is placed after the search icon on mobile */ | ||
} | } | ||
.search-container svg { | |||
.search-container | order: 1; /* Search icon goes on top on mobile */ | ||
} | } | ||
} | |||
/* Ensure input takes up available space and looks well on all devices */ | |||
.search-container input[type="search"] { | |||
flex-grow: 1; | |||
border: none; | |||
outline: none; | |||
padding: 0 10px; | |||
height: 36px; /* Fixed height for better control */ | |||
color: #999B9E; /* Placeholder text color */ | |||
width: calc(100% - 20px); /* Full width minus padding */ | |||
} | |||
.search-container svg { | |||
margin: 0 10px; | |||
} | |||
/* Change placeholder color */ | |||
.search-container input::placeholder { | |||
color: #999B9E; | |||
} | |||
/* If you want to ensure that the input does not have border in any browser */ | |||
.search-container input:focus { | |||
border: none; | |||
outline: none; | |||
} | |||
</style> | </style> | ||
</head> | </head> |
Revision as of 14:24, 9 November 2023
This page was created by Edgar on 2023-11-02. Last edited by Stephanie@mdriven.net on 2025-03-26.
Model Samples
MODEL SAMPLES
Get started with MDriven sample models. Explore our models and choose what you want to build.
Complete Models
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Download .zip
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Download .zip
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Download .zip
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Download .zip
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Download .zip
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Download .zip
Complete Models
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Download .zip
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Download .zip
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Download .zip
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Download .zip
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Download .zip
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Download .zip
Complete Models
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Download .zip
Test
You can use this as a starting point or you can merge it with most of the other examples and template models.
Download .zip
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Download .zip
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Download .zip
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Download .zip
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Download .zip