Mudanças entre as edições de "Widget:Teste"

De Wiki Gla
Ir para navegação Ir para pesquisar
Linha 1: Linha 1:
<templatestyles src="Predefinição:Teste/styles.css" />
<div class="news-carousel">
<div class="news-grid">
    <a class="news-card" href="#">
  <div class="news-card">
        <div class="news-image">
    <img src="https://wiki.gla.com.br/images/1/14/AlcoolOleoShipLv5.png">
            <img src="https://wiki.gla.com.br/images/1/14/AlcoolOleoShipLv5.png">
    <div class="news-content">
        </div>
      <div class="news-title">teste</div>
        <div class="news-content">
      <div class="news-sub">ver</div>
            <div class="news-title">Título da Notícia</div>
    </div>
            <div class="news-sub">Ver mais</div>
  </div>
        </div>
    </a>


  <div class="news-card">
    <a class="news-card" href="#">
    <img src="https://wiki.gla.com.br/images/1/14/AlcoolOleoShipLv5.png">
        <div class="news-image">
    <div class="news-content">
            <img src="https://wiki.gla.com.br/images/1/14/AlcoolOleoShipLv5.png">
      <div class="news-title">teste22</div>
        </div>
      <div class="news-sub">ver</div>
        <div class="news-content">
    </div>
            <div class="news-title">Título 2</div>
  </div>
            <div class="news-sub">Ver mais</div>
        </div>
    </a>
</div>
</div>
<style>
<style>
.news-grid {
    .news-carousel {
  display: flex;
        display: flex;
  flex-wrap: wrap;
        gap: 16px;
  gap: 16px;
        overflow-x: auto;
  margin-top: 12px;
        scroll-snap-type: x mandatory;
}
        scroll-padding: 16px;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }
 
    .news-card {
        background-color: #1f1f1f;
        color: white;
        border-radius: 6px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        overflow: hidden;
        display: flex;
        flex-direction: column;
        scroll-snap-align: start;
        min-width: 100%;
        max-width: 100%;
        text-decoration: none;
        transition: transform 0.2s ease;
    }
 
    .news-card:hover .news-image img {
        transform: scale(1.05);
    }
 
    .news-card:hover {
        cursor: pointer;
    }


.news-card {
    .news-image {
  background-color: #1f1f1f;
        width: 100%;
  color: white;
        height: 160px;
  border-radius: 6px;
        overflow: hidden;
  overflow: hidden;
    }
  width: 100%;
  max-width: 100%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
}


.news-card img {
    .news-image img {
  width: 100%;
        width: 100%;
  height: auto;
        height: 100%;
  display: block;
        object-fit: cover;
}
        transition: transform 0.3s ease;
        display: block;
    }


.news-content {
    .news-content {
  padding: 10px 12px;
        padding: 10px 12px;
}
    }


.news-title {
    .news-title {
  font-weight: bold;
        font-weight: bold;
  font-size: 14px;
        font-size: 14px;
  margin-bottom: 4px;
        margin-bottom: 4px;
}
        color: white;
    }


.news-sub {
    .news-sub {
  font-size: 12px;
        font-size: 12px;
  color: #ccc;
        color: #ccc;
}
    }


/* Responsivo */
    @media screen and (min-width: 600px) {
@media screen and (min-width: 600px) {
        .news-card {
  .news-card {
            min-width: calc(50% - 8px);
    flex: 1 1 calc(50% - 8px);
            max-width: calc(50% - 8px);
  }
        }
}
    }


@media screen and (min-width: 1000px) {
    @media screen and (min-width: 1000px) {
  .news-card {
        .news-card {
    flex: 1 1 calc(50% - 8px); /* se quiser 3 cards, troca pra 33.3% */
            min-width: calc(33.333% - 10.6px);
  }
            max-width: calc(33.333% - 10.6px);
}
        }
    }
</style>
</style>

Edição das 01h20min de 2 de junho de 2025

<style>

   .news-carousel {
       display: flex;
       gap: 16px;
       overflow-x: auto;
       scroll-snap-type: x mandatory;
       scroll-padding: 16px;
       padding-bottom: 8px;
       -webkit-overflow-scrolling: touch;
   }
   .news-card {
       background-color: #1f1f1f;
       color: white;
       border-radius: 6px;
       box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
       overflow: hidden;
       display: flex;
       flex-direction: column;
       scroll-snap-align: start;
       min-width: 100%;
       max-width: 100%;
       text-decoration: none;
       transition: transform 0.2s ease;
   }
   .news-card:hover .news-image img {
       transform: scale(1.05);
   }
   .news-card:hover {
       cursor: pointer;
   }
   .news-image {
       width: 100%;
       height: 160px;
       overflow: hidden;
   }
   .news-image img {
       width: 100%;
       height: 100%;
       object-fit: cover;
       transition: transform 0.3s ease;
       display: block;
   }
   .news-content {
       padding: 10px 12px;
   }
   .news-title {
       font-weight: bold;
       font-size: 14px;
       margin-bottom: 4px;
       color: white;
   }
   .news-sub {
       font-size: 12px;
       color: #ccc;
   }
   @media screen and (min-width: 600px) {
       .news-card {
           min-width: calc(50% - 8px);
           max-width: calc(50% - 8px);
       }
   }
   @media screen and (min-width: 1000px) {
       .news-card {
           min-width: calc(33.333% - 10.6px);
           max-width: calc(33.333% - 10.6px);
       }
   }

</style>