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

_sidebar.scss « _fuji-style « scss « assets - github.com/amzrk2/hugo-theme-fuji.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1b8ae1269998f5219ce55087334897e49463f910 (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
.sidebar {
  padding: 1.5rem 1.5rem 1.5rem 0; // no left padding on big screen
}

.sidebar-item {
  &:not(:last-child) {
    margin-bottom: 1rem; // space between sidebar items
  }

  h3 {
    margin-bottom: 0.25rem; // space between head3 & lists
  }

  ul {
    list-style-type: none;
    margin: 0 0.1rem; // little space
  }

  & > div,
  & > nav {
    margin: 0 0.1rem; // little space
  }

  & > img {
    margin: 0.5rem 0.25rem 0 0.25rem;
    width: 100%;
    border-radius: 2px;
  }
}

@media screen and (max-width: $width-md) {
  .sidebar {
    display: none !important;
  }
}

@media screen and (max-width: $width-md) {
  .sidebar-mobile {
    width: 70%;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0%;
    background-color: var(--color-codebg);
    z-index: 50;
    overflow: auto;
    display: flex;
    flex-direction: column-reverse;

    .sidebar-wrapper {
      display: flex;
      flex-direction: column;
      flex-wrap: nowrap;
      justify-content: space-around;
      margin: 1.5rem 4.25rem 1.5rem 1.5rem;
    }

    .sidebar-item {
      width: 90%; // max 1 module per line
      text-align: right;

      // space only at not first modules
      margin-top: 1rem;
      &:last-child {
        margin-top: 0;
      }
    }
  }
}

@media screen and (min-width: $width-md) {
  // single page part
  .sidebar-toc {
    ul ul {
      font-size: 0.875rem;
      padding-left: 0.5rem;
      margin-bottom: 0.25rem;
    }

    position: sticky;
    top: 1rem;

    #TableOfContents {
      max-height: 80vh;
      overflow: auto;
      scrollbar-width: thin;
    }
  }
}