Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_menu.scss « components « sass « assets - github.com/zzossig/hugo-theme-zdoc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 46945f949833e2f3a75ef2a84f4277422eab2c92 (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
.menu {
  position: -webkit-sticky;
  position: sticky;
  top: $grid-nav-height;
  padding: 0.5rem;
  margin: 0.5rem;
  margin-top: 0;
  padding-top: 0.85rem;
  height: calc(100vh - $grid-nav-height);
  overflow-y: auto;
  z-index: z('menu');

  &__label {
    font-family: $title-font;
    font-size: 1rem;
    margin: 0.65rem 0;
    padding-bottom: 0.5rem;
    text-transform: capitalize;

    @include themify($themes) {
      color: themed('toc-label-color');
    }

    @media only screen and (max-width: 600px) {
      text-align: center;
      font-size: 1.125rem;
    }
  }

  &__title {
    cursor: pointer;
    position: relative;
    word-break: break-word;
    font-size: 0.925rem;
    height: $menu-title-height;
    margin: 0.25rem 0;

    @include no-select;
    @include flexbox();
    @include align-items(center);
    @include themify($themes) {
      color: themed('body-color');
      
      @include on-event {
        color: themed('no-active-font-color');
      }

      &.active {
        font-weight: bold;
        color: themed('active-font-color');
      }
    }

    &--collapse {
      cursor: pointer;
      word-break: break-word;
      font-size: 16px;
      height: $menu-title-height;
      margin: 0.25rem 0;

      @include no-select;
      @include flexbox();
      @include align-items(center);
      @include themify($themes) {
        color: themed('body-color');

        &.active {
          font-weight: bold;
          color: themed('active-font-color');

          svg {
            color: themed('active-font-color');
          }
        }
      }

      @include on-event {
        @include themify($themes) {
          color: themed('link-hover');
          svg {
            color: themed('link-hover');
            @include translateX(0.125rem);
          }
        }
      }
    }

    &--icon {
      margin-top: 2px;

      @include themify($themes) {
        color: themed('menu-arrow-color');
      }

      &.down {
        @include rotate(90);
        @include transition(all, 0.15s, ease);
      }

      &.right {
        @include rotate(0);
        @include transition(all, 0.15s, ease);
      }

      svg {
        display: block;
        margin: auto 0;
        @include transition(all, 0.15s, ease);
      }
    }
  }

  &__alone {
    cursor: pointer;
    @include no-select;
  }

  &__list {
    max-height: 0;
    overflow: hidden;
    word-wrap: break-word;
    
    @include transition();

    .active {
      font-weight: bold;
    }

    li {
      margin-left: 1.25rem;

      &.active {
        font-weight: bold;
      }
    }
  }

  .active {
    max-height: 100%;
  }

  li.active {
    @include themify($themes) {
      a {
        font-weight: bold;
      }
    }
  }
}