You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Roman Axelrod 41daff5390 Support BlockName config - allows to rename the block. 4 years ago
config Support BlockName config - allows to rename the block. 4 years ago
data Initial commit 4 years ago
layouts Support BlockName config - allows to rename the block. 4 years ago
src Support BlockName config - allows to rename the block. 4 years ago
.gitignore Added BrowserSync 4 years ago
README.md Support BlockName config - allows to rename the block. 4 years ago
package-lock.json Added Gulp for CSS/JS Styling 4 years ago
package.json Layout file update - head section updated 4 years ago
server.js Support BlockName config - allows to rename the block. 4 years ago

README.md

Development Setup

Install required modules:

npm install

Run development environment:

npm start

Block Structure

You will find all the block files in /src folder.

/src/images/
    *.png, *jpg, *.svg
    
/src/scritps/
    *.mjs, *js
    
/src/styles/
    *.scss
    
/src/*.template.hbs

Block rules

We have a “blocks system”, means you will have to follow strict rules and use listed technologies:

Template Layout & Data

Handlebars

In this project, Handlebars used as a template engine.

All the template layout must be in a single *.hbs file that located in /src folder.

Data

You will find multiple *.json files in /data folder after the first run of npm start.

These files are used as data sources in layout. By reviewing these files you can understand what parameters you have and how the data is stored. Don't change or edit these files - use the data as it is.

There are multiple data sources since the block can be reused in different situations with different data. We have to make sure that the block is always rendered properly.

Static Media Files

Use the /src/images folder in case you need to upload images or video files to the template. These files will be available by the next URL: http://localhost:3000/images/${filename}

Class Naming Convention

Use BEM naming system for class names: http://getbem.com/naming/

Styling rules

Mobile First

Use Mobile First approach. Start with mobile device styling and then focus on other screen sizes by using @media ( min-width: ...px).

CSS Units

Use rem units instead of pixels. 1rem = 16pixels.

No need to use rem in situations of 1px or 2px. (usually used for borders width).

It's important to mention that the block is "elastic". By using rem units we are able to scale the layout and keep the aspect ratio.

Global Styling

The development environment includes CSS rules of the original project. This is including fonts, CSS variables, container logic etc...

The CSS file is embedded in served HTML.

JavaScript

Sliders

For any kind of slides animations - use SwiperJS.

The lib is included in the project and ready for use. Test with window.Swiper in browser console.

Testing

Development Toolbar

Use development toolbar to switch between data sources.

Responsiveness

Make sure the layout is rendered correctly on all standard breakpoint size:

  1. 1920px in width...
  2. 1680px
  3. 1440px
  4. 1360px
  5. 1280px
  6. 1024px
  7. 980px
  8. 768px
  9. 600px
  10. 414px
  11. 375px

If you follow the rules of REM unit - your layout must be "elastic" and most of the breakpoints should be rendered properly.

Pixel Perfect Test

Compare the final result with provided screenshots.

You can use available Browser Extensions or any other tool/approach that you're familiar with.

The idea is to have "pretty close" result to requested design.