Git Product home page Git Product logo

kristacalleja / testimonials-slider-master Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 415 KB

Recreation of a popular slider UI. JavaScript Objects: use of Object Literal Syntax and Dot Notation. Image element src through JS

Home Page: https://kristacalleja.github.io/testimonials-slider-master/

HTML 25.17% CSS 46.18% JavaScript 28.65%
slider-role map-data-structure getters-and-setters object-literal dot-notation-array

testimonials-slider-master's Introduction

Frontend Mentor - Coding bootcamp testimonials slider solution

This is a solution to the Coding bootcamp testimonials slider challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

The challenge

Users should be able to:

  • View the optimal layout for the component depending on their device's screen size
  • Navigate the slider using either their mouse/trackpad or keyboard

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • Mobile-first workflow
  • Vanilla JavaScript

What I learned

I learned how in JavaScript Objects are used for collection of data. Since I first learned Ruby first I was looking for something which contained data the same way that a Ruby Hash does. I then iterated through that using dot notation.

Another important detail I worked with is JavaScript escaping, since the paragraph text contained a lot of quotation marks and appostrophes. I managed to go around that by using back-lashes.

Since the button controls run through the Objects, I had to use the onload property as an event handler to load the first slide.

I am also happy that I finally had the opportunity to use the "Not" selector Pseudo-Class in CSS, as seen below:

img:first-of-type:not(.controls img){
    opacity: .3;
    position: absolute;
    width: 100%;
}

Continued development

I still need to figure out how to re-size the curve in the pseudo-element (see commented out line 86 of style.css), and also how to improve on the opacity image without affecting background.

Useful resources

  • Codepen Drawing board - This helped me reason out my workflow, and how the data would be loaded dynamically through JavaScript.

Author

testimonials-slider-master's People

Contributors

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