Git Product home page Git Product logo

art-gallery-website's Introduction

Art gallery website (expected this project to be easy, but oops 😅):

What I've learned:

  1. grid-template-area
  2. Leaflet (👈click):
  3. mix-blend-mode
  4. inset
  5. isolation
  6. margin-block / padding-block
  7. Questions that should be answered

1 grid-template-area

Step by step guide:

  1. Add CDN (css and js Leaflet) links to html
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
....
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
  1. Initialize map adding based on id selector and layer:
var map = L.map("map").setView([38.56290048688619, 68.74812838794165], 18)
var layer = L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png").addTo(map)
var layerContainer = layer.getContainer();
  1. Using getContainer() method we can add class to layer for custom styling:
var layerContainer = layer.getContainer();
layerContainer.classList.add('layerContainer')
  1. Add your custom-icon for marker:
var greenIcon = L.icon({
  iconUrl: "assets/icons/icon-location.svg",
  iconSize: [56, 78]
})
  1. Identify marker's location and add your custom-icon to it:
let marker = L.marker([38.56290048688619, 68.74812838794165], {
  icon: greenIcon,
}).addTo(map)

3. mix-blend-mode: (👈click)

CSS property sets how an element's content should blend with the content of the element's parent and the element's background. (i.e. sets element contents' color relative to its or parents background)

  • mix-blend-mode: - The final color is the top color, regardless of what the bottom color is.
  • mix-blend-mode: multiply; - keeps alive darker colors
  • mix-blend-mode: screen; - keeps alive lighter colors
  • mix-blend-mode: hard-light; - keeps alive lighter colors, without causing extra light color (as I see🙄)
  • mix-blend-mode: difference; - The final color is the result of subtracting the darker of the two colors from the lighter one. A black layer has no effect, while a white layer inverts the other layer's color (meaning if both background and foreground are set to black it won't work, but if both are set to white or have diiferent colors it will work):
.container {
  background-color: black;
}

.text {
  color: black;
  mix-blend-mode: difference; // it will not be working
}

4. inset: _ ;

is a shrothand of top: _ ; right:_ ; bottom:_ ; left: _ ; altogether.

5. isolation: (👈click)

isolation: isolate; - CSS property determines whether an element must create a new stacking context.

6. margin-block / padding-block:

if padding-inline is for horizontal padding, padding-block is for vertical padding.

7. Questions that should be answered:

  1. What is the difference between justify-content and align-content in CSS and what is meant by main and cross axis?
  2. How to use grid-template-areas?

art-gallery-website's People

Contributors

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