Coder Social home page Coder Social logo

dom-i's Introduction

DOM I

Project Description

You are going to be emulating a content management system by controlling the content in the JavaScript file instead of the HTML file. This project is an exercise pointed at selecting elements and then updating them without touching the HTML file using the DOM.

Compare src/index.html against src/original.html and notice how index.html is lacking text content and other things. The goal is to make the page look the same as original.html using JavaScript. You can find a screenshot of the goal in design-files/desktop-example.png.

Inside src/index.js there is declared an object literal containing all the data needed to make the page look like the screenshot. Do not change this object! Below the declaration you should perform your DOM manipulations. Typically you would select an element and then use the data inside the object to add text content to it, or to change its attributes. Access the data using dot or square-bracket notation.

THE MOST IMPORTANT RULE: You cannot update the HTML file directly. You must use JavaScript alone.

Git Setup

  • Create a forked copy of this project.
  • Clone your OWN version of the repository.
  • Push commits: git push origin main.

Running the project

  • Run npm install to download the project's dependencies.
  • Run npm start to launch the page on http://localhost:3000.
  • Run npm test to execute auto tests against your work (you'll need a new terminal window).

MVP

Create selectors to access the relevant elements

  • Declare variables pointing to the relevant DOM elements, using any of the selectors you have learned.

Add text contents

  • Using your selectors, update the text contents of the relevant elements, matching the design file.
  • Find the correct texts for the elements inside the data object in src/index.js.

Add class names

  • Give the anchor tags inside the nav an italic style by adding the classname italic to them alone.
  • Give the anchor tag inside the footer a bolder appearence by adding the classname bold to it alone.

Add image sources

  • Make the img tags on the page display the correct images by editing their src attribute.
  • Find the correct URLs for the images inside the data object in src/index.js.

Submission Format

  • Submit a link to your github repo in canvas.

dom-i's People

Contributors

bigknell avatar crharding avatar ivanmora avatar jackgipson avatar ladrillo avatar shawnantonucci avatar tetondan avatar zoelud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.