summaryrefslogtreecommitdiff
path: root/src/components/TopBar.astro
blob: 5f08de02a1581636a97a92ffda3ef30793b90688 (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
---
// import 'bootstrap/dist/css/bootstrap.css'
// import bannerJson from "../../public/jsonData/topbar.json"

// interface BannerImages {
//   link: string;
//   image: string;
//   alt: string;
//   classname: string;
//   id? : string;
// }

// const bannerData : BannerImages[] = bannerJson;

const bannerContent = await Astro.glob("../content/topbarLogo/*.md");
---



<div class="banner-content">
  <div id="top-logo-placeholder">
    <div class="d-flex justify-content-center">{
      bannerContent.map((image) => {
        return (
          <div class="p-2 pb-1">
            <a href={image.frontmatter.link} target="_blank">
              <img src={image.frontmatter.image} class={image.frontmatter.classname} alt={image.frontmatter.alt} id={image.frontmatter.id}/>
            </a>
          </div>
        )
      })
    }
    </div>
  </div>
</div>
  
<style>

  a{
    cursor: pointer;
  }

  .banner-content{
    z-index: 1001;
  }
  .banner-content div div{
    align-items: center;
  }


  img{
    width: 10vh;
  
  }
  .banner-content .big-img {
    width: 18vh;
  }

  .banner-content #iitb{
    height: 30%;
    width: 23vh;
  }

  @media screen and (max-width: 982px){
    .banner-content{
      position: sticky;
      top: 0;
      background-color: white;
    }
  }
</style>