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; /* Adjust the width as needed */
   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(3, 1fr);
   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;
   max-width: 960px;
   padding: 0 20px; /* Add padding to maintain spacing on smaller screens */
}
}


.cards {
.cards {
  width: 296px;
   background: white;
   background: white;
   border-radius: 6px;
   border-radius: 6px;
Line 124: Line 124:
}
}


  .sidebar a {
.sidebar a {
    display: block;
  display: block;
    color: #182933;
  color: #182933;
    text-decoration: none;
  text-decoration: none;
    margin-bottom: 10px;
  margin-bottom: 10px;
    padding-left: 20px;  
  padding-left: 20px;  
    position: relative;
  position: relative;
    font-weight: 500;
  font-weight: 500;
   }
}
 
.sidebar a.active {
   color: #1A50AD;
}
 
.sidebar a.active svg {
  position: absolute;
  left: 0;
  top: 0;
}


   .sidebar a.active {
@media (max-width: 767px) {
     color: #1A50AD;  
   .sidebar {
     width: 100%; /* Full width on mobile */
    order: -1; /* Sidebar on top on mobile */
   }
   }


   .sidebar a.active svg {
   .sidebar a {
     position: absolute;
     padding-left: 0.5em; /* Smaller left padding on mobile */
    left: 0;
    top: 0;
   }
   }


@media (max-width: 767px) {
  .card-container, .card-container-3 {
    .sidebar,
     grid-template-columns: 1fr; /* Single column layout on mobile */
    .card-container,
    .card-container-3 {
      flex: 0 0 100%;
      max-width: 100%;
      margin-left: 0;
    }
 
     .card-container,
    .card-container-3 {
      grid-template-columns: 1fr;
    }
   }
   }


   .search-container {
   .cards {
     display: flex;
     width: auto; /* Full width cards on mobile */
     align-items: center;
     box-sizing: border-box; /* Include padding and border in width */
    border-radius: 4px;
    border: 1px solid #E3E8EE;
    background: #FFF;
    width: 951px;
    height: 36px;
    flex-shrink: 0;
   }
   }
    
    
   .search-container input[type="search"] {
   .search-container {
     border: none;
     width: calc(100% - 40px); /* Adjust the width to account for padding */
     outline: none;
     margin: 0 auto; /* Center the search container */
     width: 100%;
     flex-direction: column; /* Stack the search elements on top of each other */
     padding: 0 10px;
     padding: 0 10px;
    height: 100%;
    color: #999B9E; /* Placeholder text color */
   }
   }
    
 
   .search-container input[type="search"],
   .search-container svg {
   .search-container svg {
     margin: 0 10px;
    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 */
   }
   }
    
    
  /* Change placeholder color */
   .search-container input[type="search"] {
   .search-container input::placeholder {
     order: 2; /* Ensure input is placed after the search icon on mobile */
     color: #999B9E;
   }
   }
 
 
  /* If you want to ensure that the input does not have border in any browser */
   .search-container svg {
   .search-container input:focus {
     order: 1; /* Search icon goes on top on mobile */
     border: none;
    outline: none;
   }
   }
}
/* 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

Model Samples
MODEL SAMPLES
Get started with MDriven sample models. Explore our models and choose what you want to build.

Complete Models

Placeholder
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Placeholder
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Placeholder
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Placeholder
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Placeholder
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Placeholder
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.

Complete Models

Placeholder
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Placeholder
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Placeholder
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Placeholder
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Placeholder
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Placeholder
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.

Complete Models

Placeholder
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Placeholder
Test
You can use this as a starting point or you can merge it with most of the other examples and template models.
Placeholder
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Placeholder
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Placeholder
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.
Placeholder
Base App
You can use this as a starting point or you can merge it with most of the other examples and template models.