Dancer2-Plugin-LiteBlog

 view release on metacpan or  search on metacpan

t/public/css/liteblog/blog.css  view on Meta::CPAN

    height: 120px; /* Fixed height of 60px */
    object-fit: cover; /* Maintain aspect ratio */
    object-position: center; /* Center the image horizontally and vertically */
}

.blog-card p {
    margin: 1em;
    margin-bottom: 2em;
}

.blog-card h3 {
    font-size: 20px;
    margin: 1em;
    color: #4d4d4d;
}

.blog-card .category-ribbon {
    background-color: #f16522; /* Adjust color as needed */
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 3px;
    margin-bottom: 10px;
    display: inline-block;
}

/* Add styles for the category container */
.category-container {
    position: absolute; /* Position within the .blog-card */
    top: 0;
    right: 0;
    transform: translate(50%, -50%); /* Center the ribbon */
}

/* Add styles for the ribbon */
.category-ribbon {
    background-color: #f16522; /* Adjust color as needed */
    color: #ffffff;
    padding: 5px 20px; /* Adjust size as needed */
    border-radius: 3px;
    position: relative;
    z-index: 1; /* Place the ribbon above content */
    transform: translateX(40%) rotate(45deg); /* Adjust the translateX value as needed */
    transform-origin: top right; /* Rotate around the top right corner */
    top: 80px;
    right: 85px;
    width: 110px;

    text-align: center;
    font-size: 14px; /* Adjust font size as needed */
    line-height: 1.2; /* Adjust line height as needed */
}

/* Ensure the ribbon text is readable */
.category-ribbon::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 0;
    border-width: 5px 5px 0;
    border-style: solid;
    border-color: #f16522 transparent transparent transparent;
}

.blog-button {
    text-align: center;
    margin-top: 20px;
}

.blog-button a {
    background-color: #f16522; /* Adjust color as needed */
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
}


@media screen and (max-width: 768px) {
    .blog-card {
        width: calc(85% - 20px);
        max-width: 420px;
    }
}

@media screen and (max-width: 480px) {
    .blog-card {
        width: 100%;
        max-width: 420px;
    }
}



( run in 2.685 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )