aboutsummaryrefslogtreecommitdiff
path: root/resources/assets/stylesheets/less/article.less
blob: deba2a1deb523109496a5fd2b401cce8b2224547 (plain)
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
146
147
148
149
150
151
152
article.studip {
    border-color: @content-color-40;
    border-style: solid;
    border-width: 1px;
    margin-bottom: 10px;
    transition: all 300ms ease 0s;
    padding: 10px;

    &:last-child {
        margin-bottom: 0;
    }

    > header {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        flex-wrap: wrap;

        padding: 2px;
        background-color: @content-color-20;
        margin: -10px;
        margin-bottom: 10px;

        > * {
            /* Try to get header aligned by forcing children into centering */
            display: flex;
            align-items: center;

            &:first-child {
                flex: 1;
            }
        }

        h1 {
            padding: 5px;
            margin: 0;
            color: @base-color;
            border-bottom: none;
            font-size: medium;

            > a {
                display: flex;
                align-items: top;
            }

            &,
            > a {
                > img,
                > svg {
                    margin-right: 5px;
                    margin-top: 2px;
                }
            }
        }

        > nav {
            display: flex;
            align-items: center;
            padding: 2px;

            > * {
                border-right: 1px solid @content-color;
                padding-right: 4px;
                margin-right: 4px;

                &:last-child {
                    border-right: none;
                    padding-right: 0;
                    margin-right: 0;
                }

                &.nowrap {
                    white-space: nowrap;
                }
            }

        }
    }

    &.toggle {
        > header {
            h1 > a {
                .icon('before', 'arr_1right', 'clickable');
                &::before {
                    flex: 0 0 auto;
                    margin-right: 5px;
//                    margin-top: 2px;
                    transition: all 200ms ease 0s;
                }
                width: 100%;
            }
            margin-bottom: -10px;

            > *:first-child {
                cursor: pointer;
            }
        }
        &:not(.open) > *:not(header) {
            display: none;
        }

        &.open {
            > header {
                h1 > a {
                    &::before {
                        transform: rotate(90deg);
                    }
                }
                margin-bottom: 10px;
            }
        }
    }

    > footer {
        text-align: center;
        border-color: @content-color-40;
        border-top-style: solid;
        border-width: 1px;
        margin: -10px;
        margin-top: 10px;

        &:empty {
            display: none !important;
            border: 0 !important;
        }
    }

    &.padding-less {
        padding: 0;

        header {
            margin: 0;
        }

        > footer {
            margin: 0;
        }
    }
}

article.new {
    &.toggle {
        > header {
            h1 > a {
                .icon('before', 'arr_1right', 'new');
                &::before {
                    margin-right: 5px;
                }
            }
        }
    }
}