Skip to content

Commit

Permalink
changing action file
Browse files Browse the repository at this point in the history
  • Loading branch information
shu-vro committed Aug 11, 2024
1 parent a1d65b3 commit 26c70fd
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 170 deletions.
79 changes: 41 additions & 38 deletions .github/workflows/deploy-vite-vanilla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,53 @@
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ['main']
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: true
group: "pages"
cancel-in-progress: true

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload dist folder
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
env:
VITE_API_KEY: ${{ secrets.VITE_MAPBOX_ACCESS_TOKEN }}
VITE_API_URL: ${{ secrets.VITE_EMAILJS_ACCESS_TOKEN }}
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload dist folder
path: "./dist"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
76 changes: 1 addition & 75 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1087,11 +1087,6 @@ <h1>Get In Touch</h1>
<!-----------------EMAIL JS {https://www.emailjs.com/} [USED IN contact.js]----------------->
<script src="./resources/js/email.min.js"></script>
<!-----------------ADDITIONAL SCRIPT FOR EMAIL JS----------------->
<script type="module">
(function () {
emailjs.init(import.meta.env.VITE_EMAILJS_ACCESS_TOKEN);
})();
</script>
<!-----------------VANILLA TILT JS {https://micku7zu.github.io/vanilla-tilt.js/}----------------->
<script src="./resources/js/vanilla-tilt.min.js"></script>
<!-----------------ANIME JS {https://animejs.com/} [USED LOCALLY.]----------------->
Expand All @@ -1107,76 +1102,7 @@ <h1>Get In Touch</h1>
<!-----------------LOCAL (BLOG)----------------->
<script src="./resources/js/blog.js"></script>
<!-----------------LOCAL (CONTACT)----------------->
<script type="module">
// 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
);
});
</script>
<script src="./resources/js/contact.js" defer></script>
<script src="./resources/js/contact.js" defer type="module"></script>
<!-----------------LOCAL (MAIN FILE)----------------->
<script src="./resources/js/main.js"></script>

Expand Down
26 changes: 15 additions & 11 deletions resources/css/about.css
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ html {

.face.face1 p {
font-family: "League Script", cursive;
font-size: 22px;
font-size: 26px;
font-weight: bold;
}

.wrapper .face.face2 {
Expand Down Expand Up @@ -242,7 +243,7 @@ html {
text-decoration: none;
display: inline-block;
border-radius: 10px;
transition: .3s cubic-bezier(0.6, 0.04, 0.98, 0.335);
transition: 0.3s cubic-bezier(0.6, 0.04, 0.98, 0.335);
}

.about_nav ul li a:hover {
Expand Down Expand Up @@ -325,8 +326,10 @@ html {
width: 90%;
height: 20px;
border-radius: 100px;
box-shadow: inset 3px 3px 3px rgba(0, 0, 0, 0.348), inset 3px 3px 5px rgba(0, 0, 0, 0.359),
inset -3px -3px 3px rgba(255, 255, 255, 0.09), inset -3px -3px 5px rgba(255, 255, 255, .09);
box-shadow: inset 3px 3px 3px rgba(0, 0, 0, 0.348),
inset 3px 3px 5px rgba(0, 0, 0, 0.359),
inset -3px -3px 3px rgba(255, 255, 255, 0.09),
inset -3px -3px 5px rgba(255, 255, 255, 0.09);
}

.skill .percent .progress {
Expand Down Expand Up @@ -354,7 +357,7 @@ html {
border-radius: 5px;
}

.experience,
.experience,
.education {
position: relative;
width: 100%;
Expand Down Expand Up @@ -383,7 +386,7 @@ html {
}

.cover::before {
content: '';
content: "";
position: absolute;
top: 20%;
right: -15px;
Expand All @@ -398,7 +401,7 @@ html {
left: -15px;
right: inherit;
transform: rotate(-45deg);
}
}

.cover .job_box {
position: absolute;
Expand Down Expand Up @@ -470,7 +473,8 @@ html {
display: none;
}

.experience, .education {
.experience,
.education {
position: relative;
width: 100%;
min-height: 50vh;
Expand All @@ -496,7 +500,7 @@ html {
font-size: 30px;
}
.cover::before {
content: '';
content: "";
position: absolute;
top: 20%;
left: -15px;
Expand Down Expand Up @@ -530,7 +534,7 @@ html {
width: 100%;
height: 100%;
z-index: 1;
opacity: .3;
opacity: 0.3;
}
}

Expand Down Expand Up @@ -562,4 +566,4 @@ html {
font-size: 22px;
text-align: center;
}
}
}
107 changes: 61 additions & 46 deletions resources/js/contact.js
Original file line number Diff line number Diff line change
@@ -1,55 +1,68 @@
// The 'building' layer in the mapbox-streets vector source contains building-height
// data from OpenStreetMap.
// map.on("load", function () {
// // Insert the layer beneath any symbol layer.
// var layers = map.getStyle().layers;
// For more, goto:
// https://www.mapbox.com/install/

// 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;
// }
// }
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;

// map.addLayer(
// {
// id: "3d-buildings",
// source: "composite",
// "source-layer": "building",
// filter: ["==", "extrude", "true"],
// type: "fill-extrusion",
// minzoom: 15,
// paint: {
// "fill-extrusion-color": "#aaa",
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;
}
}

// // 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
// );
// });
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,
Expand Down Expand Up @@ -86,6 +99,8 @@ submit.addEventListener("click", () => {
}
});

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

function submitEmail() {
let param = {
method: "POST",
Expand Down

0 comments on commit 26c70fd

Please sign in to comment.