Coder Social home page Coder Social logo

almeidaigorcarlos / twitter-flexbox-static Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1 MB

Attempt to reimplement the twitter interface with css flexbox in order to practice some frontend, since I'm a backend developer and don't have so much practice with frontend development.

License: MIT License

HTML 69.03% CSS 17.89% JavaScript 13.08%

twitter-flexbox-static's Introduction

twitter-flexbox-static

Motivation

This project was built for me in order to improve my css flexbox skills. As a backend software enginner I have always focused on software architecture, data modeling, unit tests, cloud computing and databases. But since I've gone through many situations that were expected from me to deliver a complete solution, including the interface, I've decided that it's time to study my weakest ability, CSS.

Goal

The best way to improve the css skils is to code as much as possible css. I decided to get a finished interface and reimplement it was codde without looking at its original implementation.

The choosen interface is the twitter feed interface, as follows:

alt text

Technical Architecture

This topic is dedicated to explain the technologies involved and the architecture/context that they are applied in this project.

Used Technologies

  • Html5
  • CSS3 - Flexbox
  • Javascript
  • Webpack
  • node.js
    • Chai - assert library
    • Mocha - unit tests

All the structure of the page is built in html5, so it has the semantic tags and all the structure elements and content of the page.

The visualization and the stylization was made throw css3 flexbox. I've got really surprised during the development of this project by the way, the last time that i had coded some css, i was trying to structure my website using things like float and clearfix. Flexbox get shit done easily.

I also implemented some media queries in order to adjust some layout details to look good in all devices possible. But I had some limitations beacause according to the Twitter interface, it was not design using a mobile first methodology.

I had to use some javascript to code the functionality that controls when the floating menu shows itself by the time that the right menu is clicked. As the picture bellow shows:

alt text

The bundler used was the Webpack. I've heard of it before but I have never used it, because as I already told you guys... I am not specialied in frontend devolopment. After using it, I realized how important a bundler is in a frontend project. You can basically refer a entrypoint and add some pluggins to build, minize and optimize all you files, from js files to html files.

Scripts

At the package.json file, there are build script for both the development process and production process.

Development build:

npm run build-development

Production build:

npm run build-production

Since we've coded some functionalities, I decided that it would be a great idea to add some tests in it. Just to guarantee that our code will do as planned. To do that, I used some well known node.js depencies like Mocha, Chain and Sinon.

To run all test you can run the following command from your terminal:

npm run unit-test

In order to bring only one pattern of codification, I added eslint to the project as one of the development dependencies. In that way, we only need to run this simple script to validate all our code:

npm run validate

twitter-flexbox-static's People

Contributors

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