Skip to content

Commit

Permalink
chore: change tab name
Browse files Browse the repository at this point in the history
  • Loading branch information
shu-vro committed Nov 13, 2024
1 parent 6e156cd commit 8f6de5e
Show file tree
Hide file tree
Showing 5 changed files with 143 additions and 136 deletions.
150 changes: 142 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<link rel="stylesheet" href="/resources/css/about.css" />
<link rel="stylesheet" href="/resources/css/services.css" />
<link rel="stylesheet" href="/resources/css/portfolio.css" />
<link rel="stylesheet" href="/resources/css/blog.css" />
<link rel="stylesheet" href="/resources/css/comments.css" />
<link rel="stylesheet" href="/resources/css/contact.css" />
<link href="/resources/mapbox-gl/mapbox-gl.css" rel="stylesheet" />
<link rel="stylesheet" href="/resources/css/style.css" />
Expand Down Expand Up @@ -75,7 +75,7 @@ <h1>
>
</li>
<li><a href="#" onclick="portfolio()">portfolio</a></li>
<li><a href="#" onclick="blog()">blog</a></li>
<li><a href="#" onclick="comments()">comments</a></li>
<li>
<a href="#" onclick="contact(); animate5.play()">contact</a>
</li>
Expand Down Expand Up @@ -155,7 +155,7 @@ <h1 align="center">Shirshen Das Gupta Shuvro</h1>
what have you done?
</span>
</button>
<button onclick="blog()">
<button onclick="comments()">
<span class="w">W</span>
<span class="tooltip"> what others say? </span>
</button>
Expand Down Expand Up @@ -1080,7 +1080,7 @@ <h1>Get In Touch</h1>
<script src="/resources/js/jquery.min.js"></script>
<!-----------------MIX IT UP {https://www.kunkalabs.com/mixitup/} [USED IN portfolio.js]----------------->
<script src="/resources/js/mixitup.min.js"></script>
<!-----------------SWIPER JS {https://swiperjs.com/} [USED IN portfolio.js, blog.js]----------------->
<!-----------------SWIPER JS {https://swiperjs.com/} [USED IN portfolio.js, comments.js]----------------->
<script src="/resources/swiper-js/swiper-bundle.min.js"></script>
<!-----------------MAPBOX GL {https://www.mapbox.com/} [USED IN contact.js]----------------->
<script src="/resources/mapbox-gl/mapbox-gl.js"></script>
Expand All @@ -1099,13 +1099,147 @@ <h1>Get In Touch</h1>
<script src="/resources/js/services.js"></script>
<!-----------------LOCAL (PORTFOLIO)----------------->
<script src="/resources/js/portfolio.js"></script>
<!-----------------LOCAL (BLOG)----------------->
<script src="/resources/js/blog.js"></script>
<!-----------------LOCAL (CONTACT)----------------->
<script src="/resources/js/contact.js" defer type="module"></script>
<!-----------------LOCAL (COMMENTS)----------------->
<script src="/resources/js/comments.js"></script>
<!-----------------LOCAL (MAIN FILE)----------------->
<script src="/resources/js/main.js"></script>

<!-----------------CONTACT LOGIC-------------------------->
<script type="module">
// The 'building' layer in the mapbox-streets vector source contains building-height
// data from OpenStreetMap.
// For more, goto:
// https://www.mapbox.com/install/

mapboxgl.accessToken =
import.meta.env.VITE_MAPBOX_ACCESS_TOKEN || "";
var map = new mapboxgl.Map({
style: "mapbox://styles/mapbox/light-v10",
center: [90.3911645, 23.7494284], // Longitude, latitude
zoom: 18.5, // Zoom level
pitch: 45,
bearing: -17.6,
container: "map", // Our #map target.
antialias: true,
});

map.on("load", function () {
// Insert the layer beneath any symbol layer.
var layers = map.getStyle().layers;

var labelLayerId;
for (var i = 0; i < layers.length; i++) {
if (
layers[i].type === "symbol" &&
layers[i].layout["text-field"]
) {
labelLayerId = layers[i].id;
break;
}
}

map.addLayer(
{
id: "3d-buildings",
source: "composite",
"source-layer": "building",
filter: ["==", "extrude", "true"],
type: "fill-extrusion",
minzoom: 15,
paint: {
"fill-extrusion-color": "#aaa",

// use an 'interpolate' expression to add a smooth transition effect to the
// buildings as the user zooms in
"fill-extrusion-height": [
"interpolate",
["linear"],
["zoom"],
15,
0,
15.05,
["get", "height"],
],
"fill-extrusion-base": [
"interpolate",
["linear"],
["zoom"],
15,
0,
15.05,
["get", "min_height"],
],
"fill-extrusion-opacity": 0.6,
},
},
labelLayerId
);
});
function vanillaTilt(element) {
VanillaTilt.init(document.querySelector(element), {
max: 10,
speed: 200,
glare: true,
"max-glare": 0.5,
});
}

vanillaTilt(".info1");
vanillaTilt(".info2");
vanillaTilt(".info3");

document.querySelector("form").addEventListener("submit", (e) => {
e.preventDefault();
});
let form_name = document.getElementById("fname");
let email = document.getElementById("email");
let subject = document.getElementById("subject");
let message = document.getElementById("message");
let submit = document.getElementById("submit");

submit.addEventListener("click", () => {
if (
form_name.value == "" &&
email.value == "" &&
subject.value == "" &&
message.value == ""
) {
alert("All fields are required");
return;
} else {
submitEmail();
}
});

emailjs.init(import.meta.env.VITE_EMAILJS_ACCESS_TOKEN);

function submitEmail() {
let param = {
method: "POST",
from_name: form_name.value,
from_email: email.value,
to_name: "Shuvro!",
subject: subject.value,
message: message.value,
};

emailjs.send("service_name", "template_name", param).then(
function (response) {
alert(
"SUCCESS! " + response.status + " " + response.text
);
},
function (error) {
alert("FAILED... " + error);
}
);
}

document.querySelector("form").addEventListener("submit", (e) => {
e.preventDefault();
});
</script>

<!-----------------LOCAL (MAIN FILE { USED TO ANIMATE WEBPAGE.})----------------->
<script defer>
const animate1 = anime.timeline({
Expand Down
File renamed without changes.
File renamed without changes.
126 changes: 0 additions & 126 deletions public/resources/js/contact.js

This file was deleted.

3 changes: 1 addition & 2 deletions public/resources/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function portfolio() {
layers[3].classList.add("active");
}

function blog() {
function comments() {
collapse();
layers[4].classList.add("active");
revealText1.classList.add("reveal");
Expand All @@ -59,7 +59,6 @@ content.querySelectorAll("p")[1].innerHTML = content
.querySelectorAll("p")[1]
.textContent.replace(/\S/g, `<span>$&</span>`);


tabs.forEach((tab) => {
tab.addEventListener("click", () => {
tabs.forEach((tab) => {
Expand Down

0 comments on commit 8f6de5e

Please sign in to comment.