MediaWiki:Medik.css: Difference between revisions

From Makerpedia

Chetitac (talk | contribs)
No edit summary
Chetitac (talk | contribs)
No edit summary
Line 161: Line 161:


/* cece added this */
/* cece added this */
/* Carousel container */
.carousel {
.carousel {
     position: relative;
     position: relative;
     width: 300px; /* Adjust the width */
     width: 200px; /* Match image size */
     height: 200px; /* Adjust the height */
     height: 200px; /* Match image size */
     overflow: hidden; /* Hide anything outside the container */
     overflow: hidden;
}
}


/* Track for carousel items */
.carousel-track {
.carousel-track {
     display: flex; /* Arrange items horizontally */
     display: flex;
     transition: transform 0.5s ease-in-out; /* Smooth transition for movement */
     transition: transform 0.5s ease;
    width: max-content; /* Allows scrolling */
}
}


/* Carousel items */
.carousel-item {
.carousel-item {
     min-width: 100%; /* Take up the full width of the container */
     min-width: 200px; /* Ensure each image takes full space */
     height: 100%; /* Fill the container height */
     box-sizing: border-box;
    display: flex;
    align-items: center; /* Center content inside the item */
    justify-content: center; /* Center content inside the item */
}
}
 
.carousel-prev, .carousel-next {
/* Buttons */
.carousel-prev,
.carousel-next {
     position: absolute;
     position: absolute;
     top: 50%;
     top: 50%;
     transform: translateY(-50%);
     transform: translateY(-50%);
     background-color: rgba(0, 0, 0, 0.5);
     background-color: #003366; /* Dark blue */
     color: white;
     color: white;
    padding: 10px;
     border: none;
     border: none;
    padding: 10px 15px;
    font-size: 16px;
     cursor: pointer;
     cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s;
}
.carousel-prev:hover, .carousel-next:hover {
    background-color: #002244; /* Even darker blue */
    transform: translateY(-50%) scale(1.1);
}
}


.carousel-prev {
.carousel-prev {
     left: 10px;
     left: 10px; /* Positioning closer to the image */
}
}


.carousel-next {
.carousel-next {
     right: 10px;
     right: 10px; /* Positioning closer to the image */
}
}

Revision as of 22:54, 6 February 2025

/* All CSS here will be loaded for users of the Medik skin */

/* css from Aaron */
body {
  height: 100%;
}

h2, h1, h3 {
    font-family: Arial, Helvetica, sans-serif;
}

/*[show*='vid'] img, [show*='none'] img {
  display: none;
}

[show*='img'] .videoBox, [show*='none'] .videoBox {
  display: none;
}*/

/* the following affects project tutorial pages: */

.sxs img {
  image-orientation: from-image;
  float: left;
  margin-right: 2em;
  width: min(calc(95vmin - 6em), 40vmax);
  height: auto;
}

.sxs {
  counter-reset: section;
}

.sxs h3::before {
  counter-increment: section;
  content: "Step " counter(section) ": ";
}

.sxs div {
  overflow: auto;
  margin-bottom: 1em;
  padding: 2em;
  padding-top: 0;
  border: 1px #ccc solid;
  box-shadow: 2px 2px 3px rgba(0,0,0,.25);
}

.sxs div h3{
  margin-top: .5em;
  border-bottom: .5px solid #ccc;
}

.sxs div:nth-child(odd) img {
  float: right;
  margin-left: 2em;
  margin-right: 0;
}

.sxs div:nth-child(odd) {
  border-radius: .5em;
}

.sxs div:nth-child(even) {
  background-color: #eee;
  border-radius: .5em;
}

.overview {
  background-color: rgba(0,70,200,.2);
  border-radius: 1em; 
  padding-left: 1em; 
  padding-right: 1em; 
  padding-top: .01em;
  padding-bottom: .75em;
}




/* our new css */

#mw-navbar {
  align-items: start;
}

#mw-navigation {
  background-color: var(--medik);
  padding: 0
}

#p-navigation-label {
  visibility: hidden;
}

#mw-navigation a:not(.disabled), #mw-navigation a:not(.disabled):hover {
  color: white;
  text-align: center;
}

@media screen and (min-width: 768px) {
  #p-banner .mw-wiki-logo {
    width: 3.5em;
    height: 3.5em;

  }

  #mw-navigation {
    max-width: 7em;
  }

  #site-navigation {
    width: 100%;
  }

  #mw-navigation a {
    padding: 0;
  }

  #site-navigation li a::before {
    text-align: center;
    display: block;
    content: '';
    background-size: 2em;
    height: 2em;
    width: 2em;
    margin: auto;
    margin-top: 1em;
    filter: invert(100%) sepia(100%) saturate(2%) hue-rotate(141deg) brightness(103%) contrast(101%);
  }
}

#site-navigation li a:hover {
  filter: invert(100%) sepia(100%) saturate(2%) hue-rotate(141deg) brightness(103%) contrast(101%);
}

#site-navigation li {
  text-align: center;
}

#n-HOME a::before, #n-HOME-1 a::before {
  background-image: url("images/icons/home.svg");
}

#n-SPACES a::before, #n-SPACES-1 a::before {
  background-image: url("images/icons/door.svg");
}

#n-TOOLS a::before, #n-TOOLS-GALLERY a::before {
  background-image: url("images/icons/tools.svg");
}

#n-TUTORIALS a::before, #n-SUBMIT-PROJECT a::before {
  background-image: url("images/icons/howTo.svg");
}

#n-PROJECTS a::before {
  background-image: url("images/icons/gallery.svg");
}



/* cece added this */
.carousel {
    position: relative;
    width: 200px; /* Match image size */
    height: 200px; /* Match image size */
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    width: max-content; /* Allows scrolling */
}

.carousel-item {
    min-width: 200px; /* Ensure each image takes full space */
    box-sizing: border-box;
}
.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #003366; /* Dark blue */
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s;
}

.carousel-prev:hover, .carousel-next:hover {
    background-color: #002244; /* Even darker blue */
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 10px; /* Positioning closer to the image */
}

.carousel-next {
    right: 10px; /* Positioning closer to the image */
}