Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript lecture #7

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

# hashcode_web
This project is build to make coding knowledge available to every places through app and web. This is an online platform to learn different languages from the best hand-picked courses.

<p align="center">
<a href="#"><img src="https://capsule-render.vercel.app/api?type=rect&color=E2336B&height=120&section=header&text=hashcode&fontSize=80&fontAlignY=55&fontColor=FFFFFF" alt="website title image"></a>
<h2 align="center">discover best courses for the best learning</h2>
Expand Down Expand Up @@ -43,11 +47,34 @@ We got the inspiration of this idea with the help of our fellow friends who want
<img src="assets/readme_data/ss3.jpg" width=100%><br>



## Community
**[Code of Conduct](https://github.com/inaxia/attendance_using_face_recognition/blob/master/CODE_OF_CONDUCT.md)**<br>
**[Contributing to Inaxia](https://github.com/inaxia/attendance_using_face_recognition/blob/master/CONTRIBUTING.md)**


## Steps to run

1. Fork this repo
2. Clone the forked repo
3. Create a branch

## For running the web

Run the following command:<br>
1. `npm install nodemon`<br>
2. `nodemon app.js`

You will get your local server hosted at port 3000.
You can change the port address in the app.js


If this doesn't work for you, then check if you have express installed in your system.

Join us on Gitter:<br>
[![Gitter](https://badges.gitter.im/inaxia-group/hashcode-web.svg)](https://gitter.im/inaxia-group/hashcode-web?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)


## License
```
MIT License
Expand Down Expand Up @@ -77,3 +104,4 @@ SOFTWARE.
## Support
![built with love](https://forthebadge.com/images/badges/built-with-love.svg)<br>
**If you like our project, don't forget to give it a ⭐**

11 changes: 6 additions & 5 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,26 @@ app.use(bodyParser.urlencoded({extended: true}));

app.set('view engine', 'ejs');

const { listData, videolinklist, hreftag } = require('./list.js')

const { listData, videolinklist, hreftag, listDatajavascript, videolinklistjavascript} = require('./list.js')
c
let count = 0;


app.get("/", function(req ,res){

res.render("index",{videoListData: listData, hrefTag: hreftag, videoList: videolinklist, Count: count});
res.render("index",{videoListData: listData, hrefTag: hreftag, videoList: videolinklist, videoListDatajavascript: listDatajavascript, videoListjavascript: videolinklistjavascript, Count: count});
});


app.get("/video",function(req, res){
const { cppvideolink } = require('./list.js')
// for( var i=0;i<listData.length;i++){
res.render("video",{listlink: videolinklist, listlinkjavascript: videolinklistjavascript, Count:count });

res.render("video",{listlink: videolinklist,Count: count })

// }
});


app.listen(process.env.PORT || 3000, function(){ //we write process.env.PORT so that heroku defines a port for us
console.log("Server started on port 3000")
});
108 changes: 103 additions & 5 deletions list.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var listData= [
var listData=[
'Introduction to C++',
'Data Types & Type Modifiers',
'Input/Output',
Expand All @@ -11,26 +11,124 @@ var listData= [
'Pattern questions: 2',
'Binary number system',
'Reverse a number',
'Functions in C++',
'Functions in C++'
];

var listDatajavascript=[
'Introduction to JavaScript',
'Variable in JavaScript & Identifiers in JavaScript',
'Data Types in JavaScript',
'Operators in JavaScript',
'If else statement in JavaScript',
'Assignment operator & Comparison operators',
'Switch Statement in JavaScript',
'For Loop in JavaScript',
'Function in JavaScript',
'Array in JavaScript',
'Array Methods in JavaScript',
'Prompt Box in JavaScript',
'Confirm Box in JavaScript',
'JavaScript String Object',
'String Methods in JavaScript',
'Document Object Model in JavaScrip',
'Accessing DOM Elements in JavaScrip',
'JavaScript Parent Child Siblin',
'JavaScript DOM CSS',
'JavaScript Window Location',
'Print the Page using JavaScript',
'Events in JavaScript',
'Date in JavaScript',
'Time in JavaScript',
'Dynamic Clock in JavaScript',
'setTimeout Function in JavaScript',
'Animate a div when we scroll to its position',
'Eval() Function in JavaScript',
'Math Object in Javascript',
'Generate Random Number in JavaScript for Games',
'Scope Chain in JavaScript',
'JavaScript Objects Explained',
'Reverse a String in JavaScript in RealTime without Reverse Function',
'BMI Calculator in JavaScript',
'Reference Data Type vs Primitive Type in JavaScript',
'Fat Arrow Function in JavaScript',
'Create a Ludo Game In JavaScript',
'JavaScript Executed Parser & JS Engine',
'Execution Context and Execution Stack in JavaScript',
'Call Stack & Execution Context Explained',
'Synchronous vs Asynchronous Programming in JavaScript',
'Async Await in JavaScript',
'Error Handling in JavaScript',
'Responsive E-Commerce Shopping Cart Page in JavaScript',
'Complete JavaScript Form Validation'
];



var hreftag= "video"


var videolinklist = ["https://www.youtube.com/embed/z9bZufPHFLU",

var videolinklist =[ "https://www.youtube.com/embed/z9bZufPHFLU",
"https://www.youtube.com/embed/cnT1oW5_ePM","https://www.youtube.com/embed/7dPdMtBX1d8",
"https://www.youtube.com/embed/cyB3HNlQyjY","https://www.youtube.com/embed/IlIn_D1RT7M",
"https://www.youtube.com/embed/Stf7KBiA1vs","https://www.youtube.com/embed/G80-j_xnE_8",
"https://www.youtube.com/embed/JBgZxnAj4hg","https://www.youtube.com/embed/LfgAOZ1kKMw",
"https://www.youtube.com/embed/k9OlCJFy5yo","https://www.youtube.com/embed/QIyugGzih4k",
"https://www.youtube.com/embed/6TzUHrAXytM","https://www.youtube.com/embed/83KtncYgHYQ"]
"https://www.youtube.com/embed/6TzUHrAXytM","https://www.youtube.com/embed/83KtncYgHYQ"

];

var videolinklistjavascript =[
"https://youtu.be/uGRZ2CzkFUo",
"https://youtu.be/1qrHzBF5pWI",
"https://youtu.be/8fozBN2OMqM",
"https://youtu.be/q3S8zKnTY0Q",
"https://youtu.be/qMWkqrF1i7c",
"https://youtu.be/CRhM5P4UrK8",
"https://youtu.be/UW7oxAkrDOw",
"https://youtu.be/use_eNupUQE",
"https://youtu.be/IcfMtNyWpig",
"https://youtu.be/zGlxOx_xSaY",
"https://youtu.be/k7zUnd7RaEM",
"https://youtu.be/aGbC8-pFW9E",
"https://youtu.be/HqcpsXoXUVg",
"https://youtu.be/WoC79m7y8n4",
"https://youtu.be/Ev7WYdzqGQU",
"https://youtu.be/gh7GRSkIkLM",
"https://youtu.be/SXzFoSSMOgY",
"https://youtu.be/JE8rNnct7V0",
"https://youtu.be/PPlivt8O0TM",
"https://youtu.be/ecWxI0_UfAA",
"https://youtu.be/Io2ynTz7eqs",
"https://youtu.be/ocmJ-b0Hjb4",
"https://youtu.be/aiyRUf_kJOA",
"https://youtu.be/Kt7z256Qbpg",
"https://youtu.be/0lk_E4dYemE",
"https://youtu.be/7ZzZsx6qonk",
"https://youtu.be/psi-V0ijedg",
"https://youtu.be/aa40-y-f1dI",
"https://youtu.be/NUfvwYLe8GI",
"https://youtu.be/nh9Bs4VboVo",
"https://youtu.be/_bXeU7EJKlk",
"https://youtu.be/mXZz0SHl7dI",
"https://youtu.be/xmuG4sxUEG4",
"https://youtu.be/OU1INv5o7sE",
"https://youtu.be/Mjr4WJLGlfg",
"https://youtu.be/nAeBwsZptC8",
"https://youtu.be/_tlncjn1JpU",
"https://youtu.be/VaBP6_pBOgM",
"https://youtu.be/_QXn0tW2gSY",
"https://youtu.be/HDCi0royjkM",
"https://youtu.be/tBmeblr67U0",
"https://youtu.be/hFLXE5-JCcs",
"https://youtu.be/A_ZwHY8xNNI",
"https://youtu.be/YgHP_h8EyT4",
"https://youtu.be/Gku9iMSMbWg"];





module.exports = {listData, videolinklist, hreftag};
module.exports = {listData, videolinklist, hreftag, listDatajavascript, videolinklistjavascript};


12 changes: 6 additions & 6 deletions views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
</div>
<div class="modal-body">
<ol class="list-group">
<% for(var i=0; i< videoListData.length; i++){ %>
<a class="list-group-item list-group-item-action" href=<%=videoList[i] %>><%= videoListData[i] %></a>
<% for(var i=0; i< videoka_2.length; i++){ %>
<a class="list-group-item list-group-item-action" href=<%=videoList[i] %>><%= videoka_2[i] %></a>
<% } %>
</ol>
</div>
Expand Down Expand Up @@ -266,12 +266,12 @@
<img src="images/8.gif" class=" card-img" alt="...">
<h3 class="text-center">Javascript</h3>
<div class="card-footer">
<a href="" class="btn btn-secondary course-btn" data-toggle="modal" data-target="#staticBackdrop">Learn</a>
<a href="" class="btn btn-secondary course-btn" data-toggle="modal" data-target="#staticBackdropjavascript">Learn</a>
<!-- <a href="" class="btn btn-secondary cdgrnd-btn" data-toggle="modal" data-target="#staticBackdrop">Code</a> -->
</div>

<!-- Modal -->
<div class="modal fade" id="staticBackdrop" data-backdrop="static" data-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal fade" id="staticBackdropjavascript" data-backdrop="static" data-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable" >
<div class="modal-content">
<div class="modal-header">
Expand All @@ -282,8 +282,8 @@
</div>
<div class="modal-body">
<ol class="list-group">
<% for(var i=0; i< videoListData.length; i++){ %>
<a class="list-group-item list-group-item-action" href=<%=videoList[i] %>><%= videoListData[i] %></a>
<% for(var i=0; i< videoListDatajavascript.length; i++){ %>
<a class="list-group-item list-group-item-action" href=<%=videoListjavascript[i] %>><%= videoListDatajavascript[i] %></a>
<% } %>
</ol>
</div>
Expand Down