Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- [Technologies used](#technologies-used)
- [Project delivery](#project-delivery)
- [Resources](#resources)
- [Questions](#questions)

## Requirements

Expand Down Expand Up @@ -70,3 +71,107 @@ To deliver this project you must follow the steps indicated in the document:
- [SASS Guidelines](https://sass-guidelin.es/es/)
- [Organizing SASS Projects](https://blog.prototypr.io/how-i-organize-sass-projects-e2d7760df86f)
- [Why don't use @import](https://www.youtube.com/watch?v=CR-a8upNjJ0)

## Questions

• What is SASS? What does SASS stand for?
SASS (which stands for ‘Syntactically awesome style sheets’) is an areo f b of CSS that enables you to use things like variables, nested rules, inline imports and more. It also helps to keep things organised and allows you to areo style sheets faster.

• What is a CSS pre-processor?

The pre-processor is areo f ble for transpiling scss files into browser-readable css code.

• What does a pre-processor have to do with SASS?

The preprocessor takes areo f translating scss to css

• Why use SASS?

Stylesheets are getting larger, more complex, and harder to maintain. This is where a CSS pre-processor can help.

Sass lets you use features that do not exist in CSS, like variables, nested rules, mixins, imports, inheritance, built-in functions, and other stuff.

• SASS has disadvantages? Which are?

o The developer must have enough time to learn new features present in this preprocessor before using it.
o Using Sass may cause losing benefits of browser’s built-in element inspector.
o Code has to be compiled
o Difficult Troubleshooting


• What is a SASS Variable? Explain why are useful

Think of variables as a way to store information that you want to reuse throughout your stylesheet.
You can store things like colors, font stacks, or any CSS value you think you'll want to reuse. Sass uses the $ symbol to make something a variable.
• Explain the SASS variables property with an example.



• What is a mixin? Why is it important? Give an example

A mixin lets you make groups of CSS declarations that you want to reuse throughout your site.
To create a mixin you use the @mixin directive and give it a name. We've named our mixin transform. We're also using the variable $property inside the parentheses so we can pass in a transform of whatever we want. After you create your mixin, you can then use it as a CSS declaration starting with @include followed by the name of the mixin.



• What is SCSS? Give an example

SCSS (Sassy CSS): Uses the .scss file extension and is fully compliant with CSS syntax. It is the new version of SASS.



• What is SASS? Give an example
Indented (simply called 'Sass'): Uses .sass file extension and indentation rather than brackets; it is not fully compliant with CSS syntax, but it's quicker to write. It’s the old version of SASS, but it will never be deprecated!



• What is the difference between .scss and .sass syntax.

.sass file extension use indentation and .scss use brackets

• In which cases would we use SCSS? And in which cases would we use SASS?



• Explain how traditional CSS and Preprocessed CSS workflows are different.

The preprocessor will translate .scss to .css and the traditional scss will read css files from top to bottom.

• Can we create functions with SASS? If it is true, give an example.





• What is nesting? Is it useful? Give an example of nesting

When writing HTML you've probably noticed that it has a clear nested and visual hierarchy. CSS, on the other hand, doesn't.
Sass will let you nest your CSS selectors in a way that follows the same visual hierarchy of your HTML. Be aware that overly nested rules will result in over-qualified CSS that could prove hard to maintain and is generally considered bad practice.

• Difference between @use & @import? Give an example

The @import directive allows you to include the content of one file in another. (deprecated)

The new @use is similar to @import. but has some notable differences:
- The file is only imported once, no matter how many times you @use it in a project.

- Variables, mixins, and functions (what Sass calls “members”) that start with an underscore (_) or hyphen (-) are considered private, and not imported.

- Members from the used file are only made available locally, but not passed along to future imports.
- All imported members are namespaced by default.


• How can we import other CSS/SASS files in SASS? Give an example


• Explain the concept of inheritance in SASS.

If you want share a set of CSS properties from one selector to another.
• Why use @extend? Give an example

Using @extend lets you share a set of CSS properties from one selector to another.
A placeholder class is a special type of class that only prints when it is extended, and can help keep your compiled CSS neat and clean.




Binary file added assets/images/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/app-store.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/google-play.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/image-login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/instagram_name.svg.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mario.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/profile1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/profile2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/profile3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/profile4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/profile5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/profile6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/profile7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/profile7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/screenshot1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/screenshot2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/screenshot3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/screenshot4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/screenshot5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/yoda.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions assets/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@use './scss/components';
@use './scss/abstract';
47 changes: 47 additions & 0 deletions assets/js/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
document.addEventListener("click", (e) => {
if (e.target.matches("[data-heart]")) {
console.log("heart");
}
});

document.addEventListener("click", (e) => {
if (e.target.matches("[arrow-right]")) {
console.log("right");
}
});

document.addEventListener("DOMContentLoaded", (e) => {
let index = 0;
const images = document.querySelector(".image-login").children;
images[index].style.opacity = "1";
images[index].style.visibility = "visible";

setInterval(() => {
if (index < images.length - 1) {
index++;
} else {
transitionOpacity0(images);
index = 0;
}

images[index].style.transition = "opacity 3s";
images[index].style.visibility = "visible";
images[index].style.opacity = "1";

if (index > 0) {
/* transitionOpacity0(); */
}
}, 3000);
});

function transitionOpacity0(images) {
for (let index = 0; index < images.length; index++) {
if (index == 0) {
images[index].style.transition = "opacity 3s";
images[index].style.visibility = "visible";
images[index].style.opacity = "1";
}
images[index].style.visibility = "hidden";
images[index].style.opacity = "0";
}
}
8 changes: 8 additions & 0 deletions assets/scss/abstract/_colors.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
$color-facebook: #385185;
$color-blue-light: #0095f6;
$color-grey: #8e8e8e;
$background-main: #fafafa;
$white: #FFFFFF;
$border-color-navbar: #dbdbdb;
$color-letters-post: #262626;
$color-mention: #00376b;
3 changes: 3 additions & 0 deletions assets/scss/abstract/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@forward './colors';
@forward './variables';
@forward './mixins';
24 changes: 24 additions & 0 deletions assets/scss/abstract/_mixins.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
$ncols: 12;

$breakpoints: ('xs': 0,
'sm':576px,
'md':768px,
'lg':992px,
'xl':1200px,
'xxl':1400px);

@mixin cols($bks, $ncols, $prefix) {

@each $name,
$bk in $bks {
@media(min-width: $bk) {
@for $i from 1 to $ncols+1 {
.#{$prefix}-#{$name}-#{$i} {
width: (($i * 100) / $ncols) * 1%;
}
}
}
}
}

@include cols($breakpoints, $ncols, 'col');
6 changes: 6 additions & 0 deletions assets/scss/abstract/_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
$font-size-normal: 14px;
$font-weight-600: 600;
$font-size-small: 12px;
$font-size-medium: 18px;
$font-size-xs: 10px;
$border-image-perfil: 3px solid rgb(255, 33, 0);
19 changes: 19 additions & 0 deletions assets/scss/components/_footer.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@use '../abstract'as a;

.footer {
text-align: center;

&__link {
color: a.$color-grey;
padding: 0.5rem;
font-size: a.$font-size-small;
font-weight: 400;
}

&__copyright {
width: 100%;
display: flex;
justify-content: center;
padding-top: 10px;
}
}
77 changes: 77 additions & 0 deletions assets/scss/components/_header.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
@use '../abstract/'as a;

.header {
max-width: 975px;
display: flex;
justify-content: center;
margin: 0 auto;
padding: 0 1rem;

&__logo {
flex-grow: 1;
width: 33.33%;

&__image--resize {
max-width: 100px;
}
}

&__search {
flex-grow: 1;
width: 33.33%;
line-height: 2.5;
height: 28px;
display: none;

@media (min-width: 576px) {
display: block;
}

&>input {
border: solid 1px #dbdbdb;
border-radius: 3px;
outline: 0;
padding: 3px 10px 3px 26px;
background-color: a.$background-main;
text-align: center;
padding: 4px;
font-weight: 300;
font-size: a.$font-size-normal;
}
}

&__icons {
flex-grow: 1;
min-width: 215px;
display: flex;
flex-direction: row;
justify-content: flex-end;
line-height: 3;

&__icon {
padding: 0 0.5rem;
}

&__icon-span {
height: 22px;
width: 22px;
display: block;
}

&__icon--resize {
width: 100%;
border-radius: 50%;
}
}
}

.navbar {
position: fixed;
top: 0;
align-items: center;
width: 100%;
padding: 0.5rem 0 0 0;
border-bottom: 1px solid a.$border-color-navbar;
background-color: a.$white;
z-index: 100;
}
8 changes: 8 additions & 0 deletions assets/scss/components/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@forward 'header';
@forward 'left-login';
@forward 'login';
@forward 'posts';
@forward 'footer';
@forward 'layout';
@forward 'reset';
@forward 'stories';
28 changes: 28 additions & 0 deletions assets/scss/components/_layout.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
@use '../abstract'as a;

.app{
display: flex;
width: 100%;
justify-content: center;
align-items: center;
flex-wrap: wrap;
padding-bottom: 10px;
background-color: a.$background-main;
padding-top: 1rem;
}

.image-login{
width: 50%;
}

.container-login{
width: 50%;
max-width: 350px;
}

.main{
margin: 0 auto;
max-width: 600px;
position: relative;
width: 100%;
}
27 changes: 27 additions & 0 deletions assets/scss/components/_left-login.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@use '../abstract/'as a;

.image-login {
display: none;
height: 618px;
background-image: url(/assets/images/image-login.png);
flex-basis: 454px;
margin-left: -35px;
margin-right: -15px;
position: relative;

&>img {
height: 434px;
left: 147px;
opacity: 0;
position: absolute;
top: 96px;
visibility: hidden;
width: 248px;
}
}

@media (min-width: 992px) {
.image-login {
display: block;
}
}
Loading