Giter Site home page Giter Site logo

karanchandekar / netflix Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 1.05 MB

Netflix homepage clone. Created this UI clone using simple HTML, CSS and JavaScript.

Home Page: https://rebuiltnetflix.netlify.app/

HTML 51.56% CSS 43.15% JavaScript 5.30%
css-grid css3 development es6 front-end-development html5 netflix-clone positioning tables tabs

netflix's Introduction

Netflix Clone

Clone of the Netflix website as a light HTML CSS and JS excercise - Take a look

Practice

"Eating website for fun... nyom nyom nyom"

What it is

A basic warmup exercise. Simple, practice oriented, clone of the Netflix Homepage. Built with:

  • HTML
  • CSS
  • Vanilla JS - ES6
  • Awesomeness - Strictly for the love of coding :-)

What it does

  • Look pretty, that's about it :-)

Learning Points

  • CSS Grid
  • Styling Tables
  • Tabs with Javascript
  • Positioning

Some cool stuff

Usually, people tend to run to CSS Frameworks to develop and style tabs and switching tabs. But here's a pretty simple, basic way of creating switchable tab content using Vanilla JS:

Screenshot

Screenshot (304)

const tabItems = document.querySelectorAll(".tab-item");
const tabContentItems = document.querySelectorAll(".tab-content-item");

// Select tab content
function selectItem(e) {
  removeBorder();
  removeShow();
  // Add border to current tab
  this.classList.add("tab-border");
  // Grab content item from DOM
  const tabContentItem = document.querySelector(`#${this.id}-content`);
  // Add show class
  tabContentItem.classList.add("show");
}
function removeBorder() {
  tabItems.forEach(item => item.classList.remove("tab-border"));
}
function removeShow() {
  tabContentItems.forEach(item => item.classList.remove("show"));
}
// Listen for tab click
tabItems.forEach(item => item.addEventListener("click", selectItem));

And for the HTML All you really need is this:

<!-- Content Pretty Long so I'll add later -->
<!-- But this is the basic gist -->
<div class="tab-item">
  <!-- Selectors for the different tab content -->
</div>
<div class="tab-content-item">
  <!-- Content of each tab item -->
</div>
<!-- Simply add more selectors and corresponding 
tab content for each selector -->

Also (Just a thought), You could advance this by adding some animations to the selector borders etc.

Features in Development

I might add the other pages on the Netflix website if I ever come back to refactor ^-^

Contribution

Contributions are highly welcome. Feel free to fork, clone, make pull requests, report issues etc.

Acknowledgments

  • Many thanks to @bradtraversy for his awesome courses - i will not fail you sensei
  • Thanks to @torvalds For Making the world a better place
  • And To anyone reading this... You're awesome!

That being said

To the Front... to the Back... End to End... cut no slack. Making ends meet. lol

netflix's People

Contributors

karanchandekar avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.