init
This commit is contained in:
8
src/components/Astro-props.astro
Normal file
8
src/components/Astro-props.astro
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
const { title, date } = Astro.props;
|
||||
---
|
||||
<div>
|
||||
<h1>{title}</h1>
|
||||
<p>{date}</p>
|
||||
<hr>
|
||||
</div>
|
||||
62
src/components/Card.astro
Normal file
62
src/components/Card.astro
Normal file
@@ -0,0 +1,62 @@
|
||||
---
|
||||
export interface Props {
|
||||
title: string;
|
||||
body: string;
|
||||
href: string;
|
||||
}
|
||||
|
||||
const { href, title, body } = Astro.props;
|
||||
---
|
||||
|
||||
<li class="link-card">
|
||||
<a href={href}>
|
||||
<h2>
|
||||
{title}
|
||||
<span>→</span>
|
||||
</h2>
|
||||
<p>
|
||||
{body}
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<style>
|
||||
.link-card {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
padding: 0.15rem;
|
||||
background-color: white;
|
||||
background-image: var(--accent-gradient);
|
||||
background-size: 400%;
|
||||
border-radius: 0.5rem;
|
||||
background-position: 100%;
|
||||
transition: background-position 0.6s cubic-bezier(0.22, 1, 0.36, 1);
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.link-card > a {
|
||||
width: 100%;
|
||||
text-decoration: none;
|
||||
line-height: 1.4;
|
||||
padding: 1rem 1.3rem;
|
||||
border-radius: 0.35rem;
|
||||
color: #111;
|
||||
background-color: white;
|
||||
opacity: 0.8;
|
||||
}
|
||||
h2 {
|
||||
margin: 0;
|
||||
font-size: 1.25rem;
|
||||
transition: color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
|
||||
}
|
||||
p {
|
||||
margin-top: 0.5rem;
|
||||
margin-bottom: 0;
|
||||
color: #444;
|
||||
}
|
||||
.link-card:is(:hover, :focus-within) {
|
||||
background-position: 0;
|
||||
}
|
||||
.link-card:is(:hover, :focus-within) h2 {
|
||||
color: rgb(var(--accent));
|
||||
}
|
||||
</style>
|
||||
36
src/components/Footer.astro
Normal file
36
src/components/Footer.astro
Normal file
@@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<footer>
|
||||
<div>
|
||||
<div
|
||||
class="grid grid-cols-1 md:grid-cols-3 bg-stone-600 "
|
||||
>
|
||||
<div class="bg-stone-800 rounded-md h-44 m-6 text-gray-100 text-left text-xl p-3">Important Links<hr class="blue-400">
|
||||
<div class="grid grid-rows-3 text-blue-600 p-3 gap-4">
|
||||
<router-link to="/gallery">Gallery <hr class="border-slate-900"></router-link>
|
||||
<a href="/notice">Notice <hr class="border-slate-900"></a>
|
||||
<a href="/documents">Documents</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-stone-800 rounded-md h-44 m-6 text-gray-100 text-left text-xl p-3">Related Sites<hr>
|
||||
<div class="grid grid-rows-3 text-blue-600 p-3 gap-4">
|
||||
<a href="https://www.wbsubregistration.org/">W.B.S.U<hr class="border-slate-900"></a>
|
||||
<a href="https://www.ugc.ac.in/">U.G.C.<hr class="border-slate-900"></a>
|
||||
<a href="https://banglaruchchashiksha.wb.gov.in/">W.B.H.E.D.</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-stone-800 rounded-md h-44 m-6 text-gray-100 text-left text-xl p-3">Document Links <hr>
|
||||
<div class="grid grid-rows-3 text-blue-600 p-3 gap-4">
|
||||
<router-link to="/documents/aqar">AQAR<hr class="border-slate-900"></router-link>
|
||||
<router-link to="/documents/iqac">IQAC<hr class="border-slate-900"></router-link>
|
||||
<router-link to="/documents/academic-calendar">Academic Calendar</router-link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 bg-stone-600 place-items-center text-gray-100 -mt-4 ">
|
||||
<a href=""><div class="">© sreechaitanyacollege.in <hr> </div></a>
|
||||
<a href="https://dwd.siliconpin.com"><div class=""> Powered by DWD Consultancy Services <hr></div></a>
|
||||
<a href=""><div class=""> Count 112964 | Site Performance <hr> </div></a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</template>
|
||||
120
src/components/Header.html
Normal file
120
src/components/Header.html
Normal file
@@ -0,0 +1,120 @@
|
||||
<div class="header" id="nav">
|
||||
<div class="dropdown" data-dropdown>
|
||||
<button class="link" data-dropdown-button>Information</button>
|
||||
<div class="dropdown-menu information-grid">
|
||||
<div>
|
||||
<div class="dropdown-heading">Free Tutorials</div>
|
||||
<div class="dropdown-links">
|
||||
<a href="#" class="link">All</a>
|
||||
<a href="#" class="link">Latest</a>
|
||||
<a href="#" class="link">Popular</a>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="dropdown-heading">Courses</div>
|
||||
<div class="dropdown-links">
|
||||
<a href="#" class="link">JavaScript</a>
|
||||
<a href="#" class="link">CSS</a>
|
||||
<a href="#" class="link">React</a>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="dropdown-heading">Blog</div>
|
||||
<div class="dropdown-links">
|
||||
<a href="#" class="link">All</a>
|
||||
<a href="#" class="link">Latest</a>
|
||||
<a href="#" class="link">Popular</a>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="dropdown-heading">Other</div>
|
||||
<div class="dropdown-links">
|
||||
<a href="#" class="link">Twitter</a>
|
||||
<a href="#" class="link">Newsletter</a>
|
||||
<a href="#" class="link">Discord</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="link">Pricing</a>
|
||||
<div class="dropdown" data-dropdown>
|
||||
<button class="link" data-dropdown-button>Login</button>
|
||||
<div class="dropdown-menu">
|
||||
<form class="login-form">
|
||||
<label for="email">Email</label>
|
||||
<input type="email" name="email" id="email">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" name="password" id="password">
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
||||
.header {
|
||||
background-color: #F3F3F3;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
padding: .5rem;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.link {
|
||||
background: none;
|
||||
border: none;
|
||||
text-decoration: none;
|
||||
color: #777;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.dropdown.active > .link,
|
||||
.link:hover {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
z-index: 99999;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: calc(100% + .25rem);
|
||||
background-color: white;
|
||||
padding: .75rem;
|
||||
border-radius: .25rem;
|
||||
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .1);
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transform: translateY(-10px);
|
||||
transition: opacity 150ms ease-in-out, transform 150ms ease-in-out;
|
||||
}
|
||||
|
||||
.dropdown.active > .link + .dropdown-menu {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.information-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, max-content);
|
||||
gap: 2rem;
|
||||
}
|
||||
|
||||
.dropdown-links {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: .25rem;
|
||||
}
|
||||
|
||||
.login-form > input {
|
||||
margin-bottom: .5rem;
|
||||
}
|
||||
</style>
|
||||
105
src/components/MainHeader.vue
Normal file
105
src/components/MainHeader.vue
Normal file
@@ -0,0 +1,105 @@
|
||||
<template>
|
||||
<header>
|
||||
<nav class="bg-gray-800">
|
||||
<div class="mx-auto max-w-7xl px-2 sm:px-6 lg:px-8">
|
||||
<div class="relative flex h-16 items-center justify-between">
|
||||
<div class="absolute inset-y-0 left-0 flex items-center sm:hidden">
|
||||
<!-- Mobile menu button-->
|
||||
<button type="button" class="inline-flex items-center justify-center rounded-md p-2 text-gray-400 hover:bg-gray-700 hover:text-white focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white" aria-controls="mobile-menu" aria-expanded="false">
|
||||
<span class="sr-only">Open main menu</span>
|
||||
<!--
|
||||
Icon when menu is closed.
|
||||
|
||||
Heroicon name: outline/bars-3
|
||||
|
||||
Menu open: "hidden", Menu closed: "block"
|
||||
-->
|
||||
<svg class="block h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" />
|
||||
</svg>
|
||||
<!--
|
||||
Icon when menu is open.
|
||||
|
||||
Heroicon name: outline/x-mark
|
||||
|
||||
Menu open: "block", Menu closed: "hidden"
|
||||
-->
|
||||
<!-- <svg class="hidden h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
|
||||
</svg> -->
|
||||
</button>
|
||||
</div>
|
||||
<div class="flex flex-1 items-center justify-center sm:items-stretch sm:justify-start">
|
||||
<div class="flex flex-shrink-0 items-center">
|
||||
<img class="block h-8 w-auto lg:hidden" src="https://tailwindui.com/img/logos/mark.svg?color=indigo&shade=500" alt="Your Company">
|
||||
<img class="hidden h-8 w-auto lg:block" src="https://tailwindui.com/img/logos/mark.svg?color=indigo&shade=500" alt="Your Company">
|
||||
</div>
|
||||
<div class="hidden sm:ml-6 sm:block">
|
||||
<div class="flex space-x-4">
|
||||
<!-- Current: "bg-gray-900 text-white", Default: "text-gray-300 hover:bg-gray-700 hover:text-white" -->
|
||||
<a href="#" class="bg-gray-900 text-white px-3 py-2 rounded-md text-sm font-medium" aria-current="page">Dashboard</a>
|
||||
|
||||
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Team</a>
|
||||
|
||||
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Projects</a>
|
||||
|
||||
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Calendar</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="absolute inset-y-0 right-0 flex items-center pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0">
|
||||
<button type="button" class="rounded-full bg-gray-800 p-1 text-gray-400 hover:text-white focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-gray-800">
|
||||
<span class="sr-only">View notifications</span>
|
||||
<!-- Heroicon name: outline/bell -->
|
||||
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<!-- Profile dropdown -->
|
||||
<div class="relative ml-3">
|
||||
<div>
|
||||
<button type="button" class="flex rounded-full bg-gray-800 text-sm focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-gray-800" id="user-menu-button" aria-expanded="false" aria-haspopup="true">
|
||||
<span class="sr-only">Open user menu</span>
|
||||
<img class="h-8 w-8 rounded-full" src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="">
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
Dropdown menu, show/hide based on menu state.
|
||||
|
||||
Entering: "transition ease-out duration-100"
|
||||
From: "transform opacity-0 scale-95"
|
||||
To: "transform opacity-100 scale-100"
|
||||
Leaving: "transition ease-in duration-75"
|
||||
From: "transform opacity-100 scale-100"
|
||||
To: "transform opacity-0 scale-95"
|
||||
-->
|
||||
<div class="absolute right-0 z-10 mt-2 w-48 origin-top-right rounded-md bg-white py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none" role="menu" aria-orientation="vertical" aria-labelledby="user-menu-button" tabindex="-1">
|
||||
<!-- Active: "bg-gray-100", Not Active: "" -->
|
||||
<a href="#" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1" id="user-menu-item-0">Your Profile</a>
|
||||
<a href="#" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1" id="user-menu-item-1">Settings</a>
|
||||
<a href="#" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1" id="user-menu-item-2">Sign out</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Mobile menu, show/hide based on menu state. -->
|
||||
<!-- <div class="sm:hidden" id="mobile-menu">
|
||||
<div class="space-y-1 px-2 pt-2 pb-3">
|
||||
<a href="#" class="bg-gray-900 text-white block px-3 py-2 rounded-md text-base font-medium" aria-current="page">Dashboard</a>
|
||||
|
||||
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white block px-3 py-2 rounded-md text-base font-medium">Team</a>
|
||||
|
||||
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white block px-3 py-2 rounded-md text-base font-medium">Projects</a>
|
||||
|
||||
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white block px-3 py-2 rounded-md text-base font-medium">Calendar</a>
|
||||
</div>
|
||||
</div> -->
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
</template>
|
||||
|
||||
82
src/components/Modal.astro
Normal file
82
src/components/Modal.astro
Normal file
@@ -0,0 +1,82 @@
|
||||
---
|
||||
const { text} = Astro.props;
|
||||
---
|
||||
|
||||
<style>
|
||||
|
||||
/* The Modal (background) */
|
||||
.modal {
|
||||
display: none; /* Hidden by default */
|
||||
position: fixed; /* Stay in place */
|
||||
z-index: 1; /* Sit on top */
|
||||
padding-top: 100px; /* Location of the box */
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%; /* Full width */
|
||||
height: 100%; /* Full height */
|
||||
overflow: auto; /* Enable scroll if needed */
|
||||
background-color: rgb(0,0,0); /* Fallback color */
|
||||
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
|
||||
}
|
||||
|
||||
/* Modal Content */
|
||||
.modal-content {
|
||||
background-color: #fefefe;
|
||||
margin: auto;
|
||||
padding: 20px;
|
||||
border: 1px solid #888;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
/* The Close Button */
|
||||
.close {
|
||||
color: #aaaaaa;
|
||||
float: right;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.close:hover,
|
||||
.close:focus {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="myModal" class="modal">
|
||||
|
||||
<!-- Modal content -->
|
||||
<div class="modal-content">
|
||||
<span class="close">×</span>
|
||||
<p>{text}</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script is:inline>
|
||||
var modal = document.getElementById("myModal");
|
||||
|
||||
// Get the button that opens the modal
|
||||
var btn = document.getElementById("myBtn");
|
||||
|
||||
// Get the <span> element that closes the modal
|
||||
var span = document.getElementsByClassName("close")[0];
|
||||
|
||||
// When the user clicks the button, open the modal
|
||||
btn.onclick = function() {
|
||||
modal.style.display = "block";
|
||||
}
|
||||
|
||||
// When the user clicks on <span> (x), close the modal
|
||||
span.onclick = function() {
|
||||
modal.style.display = "none";
|
||||
}
|
||||
|
||||
// When the user clicks anywhere outside of the modal, close it
|
||||
window.onclick = function(event) {
|
||||
if (event.target == modal) {
|
||||
modal.style.display = "none";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
38
src/components/Notice.vue
Normal file
38
src/components/Notice.vue
Normal file
@@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<div class="container bg-white mx-auto mt-3 p-0 text-blue-700 leading-loose">
|
||||
<div v-if="isLoading">
|
||||
<h2>Loading ...</h2>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-for="(item, index) in page" >
|
||||
<a :href="'/notice/'+item.slug"> <h3> {{item.title}}</h3> </a>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- <div v-html="page[0].content" class="container mx-auto">
|
||||
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
page: null,
|
||||
isLoading: true
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
fetch('https://api8.siliconpin.com/items/scc22?filter[type][_eq]=notice&limit=-1')
|
||||
// fetch('https://api8.siliconpin.com/items/scc22?slug=about-us')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
this.page = data.data
|
||||
// console.log(data)
|
||||
this.isLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
37
src/components/VideoYt.html
Normal file
37
src/components/VideoYt.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<div>
|
||||
<div id="yt">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
window.onload = (event) => {
|
||||
// console.log("page is fully loaded");
|
||||
fetch('https://curriculum-app-api.beanstalkedu.com/items/theme_youtube_videos')
|
||||
.then(resp => resp.json())
|
||||
.then(videos => {
|
||||
// this.videos=videos.data
|
||||
const ytDiv = document.createElement("div");
|
||||
let yt =``
|
||||
|
||||
// console.log(videos.data)
|
||||
videos.data.forEach(element => {
|
||||
// console.log(element)
|
||||
yt =yt+`<iframe width="340"
|
||||
src="https://www.youtube.com/embed/`+element.youtube_id+`">
|
||||
</iframe>`
|
||||
// console.log(element.youtube_id)
|
||||
});
|
||||
ytDiv.innerHTML = yt
|
||||
document.getElementById("yt").appendChild(ytDiv);
|
||||
})
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style >
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user