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

intro.html « partials « layouts - github.com/darshanbaral/ghazal.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3bdb64f93c23fd3dda197bd381473223d22ba0d7 (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
<div
  style="
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    color: var(--primaryColor);
    text-align: center;
    margin-bottom: 0.5em;
  "
>
  <h1 style="margin: 0; font-size: 1.7em;">
    {{.Site.Params.title}}
  </h1>
  <i
    style="
      font-size: 0.75em;
      border-radius: 50%;
      display: inline-flex;
      padding: 5px;
      margin: 0 5px;
    "
    class="show-more-info chevron-hz"
    onclick="showInfo()"
  >
    {{ partial "icons/chevron.html" . }}
  </i>
</div>

<script>
  const showInfo = () => {
    const showMoreInfo = document.querySelector(".show-more-info");
    const profileImage = document.querySelector(".profile-image");
    const chevron = document.querySelector(".fa-chevron-right");
    const moreInfo = document.querySelector(".more-info");

    if (showMoreInfo.classList.contains("chevron-hz")) {
      showMoreInfo.classList.remove("chevron-hz");
      chevron.style.transform = "rotate(90deg)";
      profileImage.style.opacity = "0";
      profileImage.style.width = "0";
      profileImage.style.transform = "rotate(180deg)";
      moreInfo.style.visibility = "visible";
      moreInfo.style.opacity = "1";
    } else {
      showMoreInfo.classList.add("chevron-hz");
      chevron.style.transform = "none";
      profileImage.style.visibility = "visible";
      profileImage.style.width = "100%";
      profileImage.style.transform = "none";
      profileImage.style.opacity = "1";
      moreInfo.style.visibility = "hidden";
      moreInfo.style.opacity = "0";
    }
  };
</script>