wizard.scss 8.73 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at

//     http://www.apache.org/licenses/LICENSE-2.0

// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
16 17 18 19 20 21 22 23 24 25 26 27

$color_scarlet_approx: #ff3111;
$color_pippin_approx: #fbe3e4;
$color_your_pink_approx: #fbc2c4;
$color_falu_red_approx: #8a1f11;

%wizard_tabcontrol {
    display: block;
    width: 100%;
}

%extend_2 {
28
    list-style: none !important;
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
    padding: 0;
    margin: 0;
}

%extend_3 {
    display: block;
    width: auto;
    margin: 0 .5em .5em;
    padding: 1em;
    text-decoration: none;
    position: relative;
    border-radius: 5px;
}

%extend_4 {
    background: #f5f5f5;
    color: #bbb;
    cursor: default;
}

%extend_5 {
    background: $color_keppel_approx;
    color: $white;
    cursor: default;
}

%extend_befor_after {
    content: " ";
    display: block;
    width: 0;
    height: 0;
    border-top: 50px solid transparent;
    border-bottom: 50px solid transparent;
    position: absolute;
    top: 50%;
    margin-top: -50px;
    left: 100%;
}

.wizard {
    @extend %wizard_tabcontrol;
70

71 72 73
    a {
        outline: 0;
    }
74

75 76
    ul {
        @extend %extend_2;
77

78 79 80 81 82
        >li {
            display: block;
            padding: 0;
        }
    }
83

84 85 86 87 88
    > {
        .steps {
            position: relative;
            display: block;
            width: 100%;
89

90 91 92 93
            .current-info {
                position: absolute;
                left: -999em;
            }
94

95 96 97
            .number {
                font-size: 1.429em;
            }
98

99 100 101 102 103 104 105 106 107
            &>ul {
                position: relative;
                border: 0;
                padding: 0px;
                background: #f5f5f5;
                border-radius: 0;
                list-style: none;
                overflow: hidden;
                margin-bottom: 10px;
108

109 110 111
                >li {
                    width: 25%;
                    float: left;
112

113 114 115
                    &:first-child>a {
                        padding-left: 15px;
                    }
116

117 118
                    a {
                        @extend %extend_3;
119

120 121 122
                        &:hover {
                            cursor: pointer;
                        }
123

124 125 126 127
                        margin: 0;
                        border: none;
                        border-radius: 0;
                        padding: 10px 0 10px 45px;
128

129 130 131 132 133 134
                        &:before {
                            @extend %extend_befor_after;
                            border-left: 30px solid #ddd;
                            margin-left: 1px;
                            z-index: 1;
                        }
135

136 137 138 139 140 141
                        &:after {
                            @extend %extend_befor_after;
                            border-left: 30px solid #f5f5f5;
                            z-index: 2;
                        }
                    }
142

143 144 145
                    &.disabled a {
                        @extend %extend_4;
                    }
146

147 148
                    &.current a {
                        @extend %extend_5;
149

150 151 152 153
                        &:after {
                            border-left: 30px solid $color_keppel_approx;
                        }
                    }
154

155 156 157
                    &.done a {
                        background: #b4e5d9;
                        color: $white;
158

159 160 161 162
                        &:after {
                            border-left: 30px solid #b4e5d9;
                        }
                    }
163

164 165 166
                    &.error a {
                        background: $color_scarlet_approx;
                        color: $white;
167

168 169 170 171 172 173 174
                        &:after {
                            border-left: 30px solid $color_scarlet_approx;
                        }
                    }
                }
            }
        }
175

176 177 178 179 180 181 182
        .content {
            background: #f5f5f5;
            display: block;
            margin: .5em;
            position: relative;
            width: 100%; //Instead of the line below you could use @include border-radius($radius, $vertical-radius)
            border-radius: 5px;
183

184 185 186 187
            > {
                .title {
                    display: none;
                }
188

189 190 191 192 193
                .body {
                    float: left;
                    width: 100%;
                    height: 95%;
                    padding: 2.5%;
194

195
                    >ul {
196 197
                        list-style: disc !important;

198 199 200 201 202 203 204
                        >li {
                            display: list-item;
                        }
                    }
                }
            }
        }
205

206 207 208 209 210
        .actions {
            position: relative;
            display: block;
            text-align: right;
            width: 100%;
211

212 213 214 215
            ul[role="menu"] {
                li+li {
                    margin-left: 5px;
                }
216

217 218 219 220 221
                li.disabled {
                    a {
                        opacity: .65;
                    }
                }
222

223 224 225
                a {
                    padding: 10px 20px;
                    background-color: $color_keppel_approx;
226
                    color: $white;
227 228 229 230 231 232
                    margin-bottom: 10px;
                    border: 1px $color_keppel_approx solid;
                    border-radius: 4px;
                    transition: all .3s ease;
                    margin: 2px;
                }
233

234 235 236 237 238 239 240 241 242 243 244
                a[href="#cancel"] {
                    padding: 10px 20px;
                    background-color: transparent;
                    color: $color_keppel_approx;
                    margin-bottom: 10px;
                    border: 1px $color_keppel_approx solid;
                    border-radius: 4px;
                    transition: all .3s ease;
                    margin: 2px;
                }
            }
245

246 247 248
            >ul {
                display: inline-block;
                text-align: right;
249

250 251 252 253 254 255
                >li {
                    float: left;
                    margin: 0 .5em;
                }
            }
        }
256

257 258
        .loading .spinner {}
    }
259

260 261 262 263 264
    &.vertical> {
        .steps {
            display: inline;
            float: left;
            width: 30%;
265

266 267 268 269 270
            >ul>li {
                float: none;
                width: 100%;
            }
        }
271

272 273 274 275 276 277
        .content {
            display: inline;
            float: left;
            margin: 0 2.5% .5em 2.5%;
            width: 65%;
        }
278

279 280 281 282 283
        .actions {
            display: inline;
            float: right;
            margin: 0 2.5%;
            width: 95%;
284

285 286 287 288 289 290 291 292 293
            >ul>li {
                margin: 0 0 0 1em;
            }
        }
    }
}

.tabcontrol {
    @extend %wizard_tabcontrol;
294

295 296 297
    a {
        outline: 0;
    }
298

299 300
    ul {
        @extend %extend_2;
301

302 303 304 305 306
        >li {
            display: block;
            padding: 0;
        }
    }
307

308 309 310 311 312
    > {
        .steps .current-info {
            position: absolute;
            left: -999em;
        }
313

314 315 316 317 318 319 320 321 322 323 324
        .content>.title {
            display: none;
        }
    }
}

@media(max-width: 600px) {
    .wizard {
        >.steps {
            a {
                margin-top: .5em;
325

326 327 328
                &:hover {
                    margin-top: .5em;
                }
329

330 331 332 333
                &:active {
                    margin-top: .5em;
                }
            }
334

335 336 337 338
            >ul>li {
                width: 50%;
            }
        }
339

340 341 342 343 344 345
        &.vertical> {
            .steps {
                display: block;
                float: none;
                width: 100%;
            }
346

347 348 349 350 351
            .actions {
                display: block;
                float: none;
                width: 100%;
            }
352

353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373
            .content {
                display: block;
                float: none;
                margin: 0 .5em .5em;
                width: auto;
            }
        }
    }
}

@media(max-width: 480px) {
    .wizard>.steps>ul>li {
        width: 100%;
    }
}

.wizard-modal {
    .modal-body {
        overflow: hidden;
        max-height: none;
    }
374

375 376 377 378
    .wizard {
        position: relative;
        width: 100%;
        height: 100%;
379

380 381 382 383 384
        .content {
            max-height: 400px;
            overflow: auto;
            margin: 0px 0px 15px 0px;
        }
385

386 387 388 389 390 391 392
        .actions {
            >ul>li {
                margin: 0px;
            }
        }
    }
}