blog.less 2.38 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
/* ------------------------------------------------------------------------------
 *
 *  # Blog layouts
 *
 *  Blog layouts with various blog layouts
 *
 *  Version: 1.0
 *  Latest update: Aug 1, 2016
 *
 * ---------------------------------------------------------------------------- */


//
// Common styles for all layouts
//

.blog-horizontal {

    // Remove bottom padding from panel body
    > .panel-body {
        padding-bottom: 0;
    }

    // Make all title link color same as text color
    .blog-title {
        > a {
            color: @text-color;
        }

        > .list-inline {
            margin-top: 3px;
        }
    }

    // Stick thumb to the left and give it fixed width
    .thumb {
        width: 100%;

        @media (min-width: @screen-sm-min) {
            width: 45%;
            float: left;
            margin-right: @content-padding-large;
            max-width: 400px;
        }
    }
}


//
// Layouts setup
//

// Layout #1
.blog-horizontal-1 {
    .thumb {
        margin-bottom: @content-padding-large;
    }

    .blog-preview {
        margin-bottom: (@content-padding-large / 2);
    }

    .panel-footer-transparent {
        margin-top: 2px;
        margin-bottom: 2px;
    }

    @media (min-width: @screen-sm-min) {
        .thumb {
            margin-bottom: (@line-height-computed / 2);
        }
    }
}

// Layout #2
.blog-horizontal-2 {
    .thumb {
        margin-bottom: @content-padding-large;
    }

    .blog-title {
        margin-top: 5px;
        margin-bottom: 15px;
    }

    .blog-preview {
        margin-bottom: @content-padding-large;
    }
}


// Layout #3
.blog-horizontal-3 {
    .thumb,
    .blog-preview {
        margin-bottom: @content-padding-large;
    }

    .blog-title {
        margin-top: 2px;
        margin-bottom: 0;
    }

    .blog-preview .list-inline {
        &,
        > li > a {
            color: @text-muted;
        }
    }
}


//
// Media sizing
//

// Mini
.blog-horizontal-xs {
    .thumb {
        @media (min-width: @screen-sm-min) {
            width: 35%;
            max-width: 200px;
        }
    }
}

// Medium
.blog-horizontal-sm {
    .thumb {
        @media (min-width: @screen-sm-min) {
            width: 40%;
            max-width: 300px;
        }
    }
}

// Large
.blog-horizontal-lg {
    .thumb {
        @media (min-width: @screen-sm-min) {
            width: 50%;
            max-width: 500px;
        }
    }
}