result.less 7.66 KB
Newer Older
1 2
@result-font-large: 18px;
@result-font-medium: 16px;
3 4
@result-font-url: 14px;
@result-font-small: 12px;
5
@result-description-color: @text-color;
6
@result-image-border-color: @color-almost-white;
7
.result {
8 9 10 11 12

    // Remove the margin from the first result because it already has margin from the grid ruleset
    &:nth-child(1) {
        margin-top: 0;
    }
13
    margin: @padding-small-default 0px;
14 15
    @media(max-width: @screen-mobile){
        .card;
16
        margin: @padding-small-default 0px;
17
    }
18
    
Dominik Hebeler's avatar
Dominik Hebeler committed
19
    padding: 0px 8px;
20 21
    width: 100%;
    .result-header {
22
        max-width: 100%;
23
        overflow: hidden;
24 25 26 27
        .result-headline {
            width: 100%;
            display: flex;
            justify-content: space-between;
28
            align-items: center;
29 30 31
            .result-title {
                margin: 0px;
                &>* {
32
                    font-size: .8em;
33 34 35 36 37 38 39 40 41 42 43 44 45 46
                }
                .overflow-ellipsis;
                .result-price {
                    padding: 0px 10px;
                    color: white;
                    background-color: #666699;
                    border-radius: 3px;
                }
                a {
                    &,
                    &:active,
                    &:hover,
                    &:focus,
                    &:visited {
47
                        color: @text-color;
48 49 50 51 52
                        text-decoration: none;
                    }
                }
            }
            .result-hoster {
53
                font-size: .9em;
54 55 56 57
                margin-left: 20px;
                color: #808080;
                white-space: nowrap;
            }
58
        }
59 60 61
        .result-subheadline {
            width: 100%;
            display: flex;
62
            align-items: center;
63
            line-height: 1.3;
64 65 66
            .result-link {
                .overflow-ellipsis;
                display: block;
67
                font-size: .95em;
68 69 70 71 72 73 74
                width: fit-content;
                max-width: 100%;
                &,
                &:active,
                &:hover,
                &:focus,
                &:visited {
75
                    font-size: 1em;
76 77
                    text-decoration: none;
                }
78 79 80
                &:visited {
                    color: #8091A2;
                }
81
                span.advertisement-mark {
82 83 84
                    border-color: #0d9c0d;
                    color: #0d9c0d;
                    padding: 1px;
85 86
                    border-radius: 4px;
                    font-weight: bold;
87 88
                    font-size: .6em;
                    margin-right: 4px;
89
                    border: 1px solid;
90 91
                    position: relative;
                    top: -2px;
92
                }
93
            }
94 95
            a.partnershop-info {
                display: block;
96 97 98 99
                background-color: white;
                color: #333;
                text-shadow: none;
                font-weight: inherit;
Karl Hasselbring's avatar
Karl Hasselbring committed
100
                border: 1px solid #686868;
101
                padding: 2px;
102
                margin-left: 8px;
103
                border-radius: 4px;
104
                font-size: .6em;
105
            }
106
        }
107
    }
108 109
    .result-body {
        margin-top: 1px;
110
        max-width:100%;
111
        margin-bottom: 8px;
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
        &.with-image {
            display: grid;
            grid-template-columns: minmax(max-content, 160px) auto;
            grid-column-gap: 8px;
            grid-row-gap: 8px;
            @media(max-width: 380px){
                grid-template-columns: 1fr;
                grid-template-rows: auto auto;
            }
            .result-image {
                align-self: center;
                justify-self: center;
            }
            .result-description {
                align-self: center;
            }
        }
129 130
        text-align: justify;
        .result-image {
131 132 133
            
            max-width: 160px;
            > a{
134
                display: block;
135 136 137 138 139 140 141
                > img {
                    display: block;
                    max-width: 160px;
                    max-height: 120px;
                    width: auto;
                    height: auto;
                }
142 143 144
            }
        }
        .result-description {
145
            align-self: center;
146 147
            margin-bottom: 3px;
            color: @result-description-color;
148
            font-size: .95em;;
149 150
            line-height: 1.3;
            clear: both;
Dominik Hebeler's avatar
Dominik Hebeler committed
151
            overflow: hidden;
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166
            .date {
                font-weight: bold;
            }
            p {
                margin: 0;
                margin-bottom: 4px;
            }
            img {
                margin: 5px;
                margin-left: 0px;
                margin-right: 15px;
                height: auto;
                width: auto;
                max-width: 120px;
                max-height: 200px;
167
                border: solid 1px @result-image-border-color;
168 169
            }
        }
170
    }
171
    .result-footer {
Dominik Hebeler's avatar
Dominik Hebeler committed
172
        margin-top: 2px;
173
        max-width: 100%;
174 175
        display: flex;
        flex-wrap: wrap;
176 177
        &>* {
            margin-right: 20px;
178 179 180 181 182 183 184 185
        }
        .result-open,
        .result-open-newtab {
            &,
            &:active,
            &:hover,
            &:focus,
            &:visited {
186
                color: @text-color;
187
                font-size: .7em;
188 189 190
                text-decoration: none;
            }
        }
191
        @media (max-width: @screen-mobile) {
192
            .result-open-newtab {
193 194 195 196 197 198 199 200 201
                display: none;
            }
        }
        .result-open-proxy {
            &,
            &:active,
            &:hover,
            &:focus,
            &:visited {
202
                color: @text-color;
203
                font-size: .7em;
204 205 206 207 208 209 210 211
                text-decoration: none;
            }
            white-space: nowrap;
            img {
                margin-bottom: 0px;
                margin-right: 2px;
            }
        }
212
        .open-result-options, .close-result-options {
213
            font-weight: normal;
214
            font-size: .7em;
215 216
            flex-grow: 1;
            text-align: right;
Dominik Hebeler's avatar
Dominik Hebeler committed
217
            margin-right: 0;
218
        }
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235
        .close-result-options {
            display: none;
        }
    }

    /* CSS Rules for the result options */
    .result-toggle{
        &:checked + .result-footer > .open-result-options {
            display: none;
        }
        &:checked + .result-footer > .close-result-options {
            display: initial;
        }
        &:checked + .result-footer + .result-options > .options {
            max-height: 150px;
            overflow: initial;
            opacity: 1;
236
            display: initial;
237
        }
238
    }
239

240
    .result-footer * {
241
        font-size: .7em;
242
    }
243 244 245 246 247 248 249
    &.ad .ad-label {
        &,
        & a,
        & a:active,
        & a:hover,
        & a:focus,
        & a:visited {
250
            font-size: .9em;
251 252
            color: #808080;
        }
253
    }
254 255 256 257
    &>.remover {
        cursor: pointer;
        text-align: right;
        color: #777;
258
    }
259
    &>.result-options {
260
        max-width: 100%;
261
        &>.options {
262
            border-top: 1px solid @border-color;
263 264 265
            width: 100%;
            text-align: right;
            overflow: hidden;
266
            display: none;
267 268 269 270 271
            max-height: 0px;
            transition: all 1s;
            -webkit-transition: all 1s;
            opacity: 0;
        }
272 273
        ul {
            display: flex;
274
            flex-wrap: wrap;
275
            margin-bottom: 0;
276
            li {
277
                font-size: .85em;
278
                margin: 8px 16px 8px 0;
279
            }
280 281 282 283
            @media(max-width: @screen-mobile){
                li:nth-child(1){
                    display: none;
                }
284 285 286 287
            }
            li>a {
                color: @link-color;
            }
288
        }
289
        
290
    }
291
}