Initial commit
commit
14eda26169
@ -0,0 +1 @@
|
|||||||
|
.sass-cache/
|
@ -0,0 +1,15 @@
|
|||||||
|
# A Sass tutorial completed from the Web Designer magazine issue 282
|
||||||
|
|
||||||
|
Covers:
|
||||||
|
- variables
|
||||||
|
- mixins
|
||||||
|
- some built in functions
|
||||||
|
- compilation compression of scss files
|
||||||
|
- inheritance
|
||||||
|
- importing libraries from github.
|
||||||
|
|
||||||
|
## Instructions
|
||||||
|
|
||||||
|
`$ live-server`
|
||||||
|
|
||||||
|
`$ sass --watch scss/styles.scss:css/styles.css`
|
@ -0,0 +1,87 @@
|
|||||||
|
a, .profile-header a {
|
||||||
|
font-size: 16px;
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 10px; }
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: sans-serif;
|
||||||
|
text-align: center;
|
||||||
|
background: linear-gradient(155deg, #4b9fbe 70%, #a9d1e0 70%);
|
||||||
|
color: white;
|
||||||
|
min-height: 100vh; }
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
color: white; }
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
color: white; }
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #4b9fbe;
|
||||||
|
background-color: white; }
|
||||||
|
|
||||||
|
.profile-header a {
|
||||||
|
color: white;
|
||||||
|
background-color: #a9d1e0; }
|
||||||
|
|
||||||
|
.profile-body {
|
||||||
|
display: flex;
|
||||||
|
align-items: stretch;
|
||||||
|
justify-content: space-around;
|
||||||
|
margin-top: 32px;
|
||||||
|
margin-left: 10vw;
|
||||||
|
margin-right: 10vw; }
|
||||||
|
@media screen and (max-width: 800px) {
|
||||||
|
.profile-body {
|
||||||
|
flex-direction: column; } }
|
||||||
|
|
||||||
|
.profile-section {
|
||||||
|
position: relative;
|
||||||
|
position: relative;
|
||||||
|
color: #4b9fbe;
|
||||||
|
background-color: white;
|
||||||
|
margin: 120px 16px 120px 16px;
|
||||||
|
width: 340px; }
|
||||||
|
.profile-section::after {
|
||||||
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' viewBox='0 0 100 100' fill='rgb(255,255,255)' fill-opacity='1'%3E%3Cpolygon points='0,0 100,0 0,100'%3E%3C/polygon%3E%3C/svg%3E");
|
||||||
|
background-position: center center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
content: '';
|
||||||
|
height: 100px;
|
||||||
|
left: 0;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 1;
|
||||||
|
bottom: -100px; }
|
||||||
|
.profile-section::before {
|
||||||
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' viewBox='0 0 100 100' fill='rgb(255,255,255)' fill-opacity='1'%3E%3Cpolygon points='0,100 100,100 0,0'%3E%3C/polygon%3E%3C/svg%3E");
|
||||||
|
background-position: center center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
content: '';
|
||||||
|
height: 100px;
|
||||||
|
left: 0;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 1;
|
||||||
|
top: -100px; }
|
||||||
|
.profile-section .profile-content {
|
||||||
|
padding: 20px; }
|
||||||
|
@media screen and (max-width: 800px) {
|
||||||
|
.profile-section {
|
||||||
|
width: 100%; } }
|
||||||
|
|
||||||
|
.profile-logo {
|
||||||
|
font-size: 60px;
|
||||||
|
font-family: cursive;
|
||||||
|
-webkit-transform: rotate(25deg);
|
||||||
|
-moz-transform: rotate(25deg);
|
||||||
|
-ms-transform: rotate(25deg);
|
||||||
|
transform: rotate(25deg); }
|
||||||
|
|
||||||
|
/*# sourceMappingURL=styles.css.map */
|
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"version": 3,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AU;IAvEX,gBAAgB,EAAE,gOAAW;IAC7B,mBAAmB,EAAE,aAAa;IAClC,iBAAiB,EAAE,SAAS;IAI3B,eAAe,EAAE,SAAS;IAG3B,OAAO,EAAE,EAAE;IACX,MAAM,EAAE,KAAa;IACrB,IAAI,EAAE,CAAC;IACP,QAAQ,EAAE,QAAQ;IAClB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,CAAC;IA0DR,GAAG,EAAE,MAAc;EF1CpB,iCAAgB;IACd,OAAO,EAAE,IAAI;EAEf,oCAA0C;IAX5C,gBAAiB;MAYb,KAAK,EAAE,IAAI;;AAKf,aAAc;EACZ,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,OAAO;EAjFpB,iBAAiB,EAAE,aAAM;EACzB,cAAc,EAAE,aAAM;EACtB,aAAa,EAAE,aAAM;EACrB,SAAS,EAAE,aAAM",
|
||||||
|
"sources": ["../scss/styles.scss","../scss/_colors.scss","../scss/angled-edges/_angled-edges.scss"],
|
||||||
|
"names": [],
|
||||||
|
"file": "styles.css"
|
||||||
|
}
|
@ -0,0 +1,2 @@
|
|||||||
|
a,.profile-header a{font-size:16px;margin-left:10px;margin-right:10px;padding:10px;border-radius:10px}body{font-family:sans-serif;text-align:center;background:linear-gradient(155deg, #4b9fbe 70%, #a9d1e0 70%);color:#fff;min-height:100vh}h1{color:#fff}h2{color:#fff}a{color:#4b9fbe;background-color:#fff}.profile-header a{color:#fff;background-color:#a9d1e0}.profile-body{display:flex;align-items:stretch;justify-content:space-around;margin-top:32px;margin-left:10vw;margin-right:10vw}@media screen and (max-width: 800px){.profile-body{flex-direction:column}}.profile-section{position:relative;position:relative;color:#4b9fbe;background-color:#fff;margin:120px 16px 120px 16px;width:340px}.profile-section::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' viewBox='0 0 100 100' fill='rgb(255,255,255)' fill-opacity='1'%3E%3Cpolygon points='0,0 100,0 0,100'%3E%3C/polygon%3E%3C/svg%3E");background-position:center center;background-repeat:no-repeat;background-size:100% 100%;content:'';height:100px;left:0;position:absolute;right:0;width:100%;z-index:1;bottom:-100px}.profile-section::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' viewBox='0 0 100 100' fill='rgb(255,255,255)' fill-opacity='1'%3E%3Cpolygon points='0,100 100,100 0,0'%3E%3C/polygon%3E%3C/svg%3E");background-position:center center;background-repeat:no-repeat;background-size:100% 100%;content:'';height:100px;left:0;position:absolute;right:0;width:100%;z-index:1;top:-100px}.profile-section .profile-content{padding:20px}@media screen and (max-width: 800px){.profile-section{width:100%}}.profile-logo{font-size:60px;font-family:cursive;-webkit-transform:rotate(25deg);-moz-transform:rotate(25deg);-ms-transform:rotate(25deg);transform:rotate(25deg)}
|
||||||
|
/*# sourceMappingURL=styles.min.css.map */
|
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"mappings": "AAuBA,mBAAa,CACX,SAAS,CAAE,IAAI,CACf,WAAW,CAAE,IAAI,CACjB,YAAY,CAAE,IAAI,CAClB,OAAO,CAAE,IAAI,CACb,aAAa,CAAE,IAAI,CAIrB,IAAK,CACH,WAAW,CAAE,UAAU,CACvB,UAAU,CAAE,MAAM,CAClB,UAAU,CAAE,iDAAiE,CAC7E,KAAK,CC1BO,IAA4B,CD2BxC,UAAU,CAAE,KAAK,CAGnB,EAAG,CACD,KAAK,CC9BY,IAAwC,CDiC3D,EAAG,CACD,KAAK,CCjCY,IAA0C,CDoC7D,CAAE,CA9BA,KAAK,CCXS,OAAO,CDYrB,gBAAgB,CCPC,IAA0C,CD0C3D,iBAAE,CApCF,KAAK,CCRO,IAA4B,CDSxC,gBAAgB,CCVA,OAA4B,CDoD9C,aAAc,CACZ,OAAO,CAAE,IAAI,CACb,WAAW,CAAE,OAAO,CACpB,eAAe,CAAE,YAAY,CAC7B,UAAU,CAAE,IAAI,CACh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
||||||
|
"names": [],
|
||||||
|
"file": "styles.min.css"
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
<!doctype html>
|
||||||
|
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
|
||||||
|
<title>My Personal Profile</title>
|
||||||
|
<meta name="description" content="Personal Profile">
|
||||||
|
<meta name="author" content="Simon Jones">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="css/styles.min.css">
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="profile">
|
||||||
|
<div class="profile-header">
|
||||||
|
<div class="profile-logo">SJ</div>
|
||||||
|
<h1>My Personal Profile</h1>
|
||||||
|
<h2>Find out about my accomplishments</h2>
|
||||||
|
<a href="">LinkedIn</a><a href="">Twitter</a>
|
||||||
|
</div>
|
||||||
|
<div class="profile-body">
|
||||||
|
<section class="profile-section">
|
||||||
|
<div class="profile-content">
|
||||||
|
<p>
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||||
|
</p>
|
||||||
|
<a href="">Learn More</a>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<section class="profile-section">
|
||||||
|
<div class="profile-content">
|
||||||
|
<p>
|
||||||
|
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?
|
||||||
|
</p>
|
||||||
|
<a href="">Learn More</a>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<section class="profile-section">
|
||||||
|
<div class="profile-content">
|
||||||
|
<p>
|
||||||
|
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
|
||||||
|
</p>
|
||||||
|
<a href="">Learn More</a>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,13 @@
|
|||||||
|
// _colors.scss
|
||||||
|
$red: random(255);
|
||||||
|
$green: random(255);
|
||||||
|
$blue: random(255);
|
||||||
|
|
||||||
|
// Here we can randomly set the color scheme
|
||||||
|
// $color-primary: rgb($red, $green, $blue);
|
||||||
|
$color-primary: #4b9fbe;
|
||||||
|
// Using builtin functions to procedurally generate colors that match a primary of our choosing
|
||||||
|
$color-secondary: lighten($color-primary, 25%);
|
||||||
|
$color-light: lighten($color-primary, 75%);
|
||||||
|
$color-highlight1: lighten(complement($color-primary), 50%);
|
||||||
|
$color-highlight2: lighten(complement($color-secondary), 50%);
|
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 2ecf74408f21b8cb343b6c9af9ee2f4dfa2b4414
|
@ -0,0 +1,97 @@
|
|||||||
|
@import "_colors.scss";
|
||||||
|
// Here we are using a library cloned from github and importing it.
|
||||||
|
@import "angled-edges/_angled-edges.scss";
|
||||||
|
|
||||||
|
$breakpoint: 800px;
|
||||||
|
|
||||||
|
$style1: (foreground: $color-light, background: $color-secondary);
|
||||||
|
$style2: (foreground: $color-primary, background: $color-highlight1);
|
||||||
|
$style3: (foreground: $color-primary, background: $color-highlight2);
|
||||||
|
|
||||||
|
@mixin transform($value) {
|
||||||
|
-webkit-transform: $value;
|
||||||
|
-moz-transform: $value;
|
||||||
|
-ms-transform: $value;
|
||||||
|
transform: $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin content-style($foreground, $background){
|
||||||
|
color: $foreground;
|
||||||
|
background-color: $background;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sass supports inheritance. This is how we can create a common class for extention
|
||||||
|
%link-shared {
|
||||||
|
font-size: 16px;
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: sans-serif;
|
||||||
|
text-align: center;
|
||||||
|
background: linear-gradient(155deg, $color-primary 70%, $color-secondary 70%);
|
||||||
|
color: $color-light;
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
color: $color-highlight1;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
color: $color-highlight2;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
@extend %link-shared;
|
||||||
|
@include content-style($style3...);
|
||||||
|
}
|
||||||
|
|
||||||
|
.profile-header {
|
||||||
|
a {
|
||||||
|
//Example of inheritance
|
||||||
|
@extend %link-shared;
|
||||||
|
@include content-style($style1...); //Don't forget a spread operator.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.profile-body {
|
||||||
|
display: flex;
|
||||||
|
align-items: stretch;
|
||||||
|
justify-content: space-around;
|
||||||
|
margin-top: 32px;
|
||||||
|
margin-left: 10vw;
|
||||||
|
margin-right: 10vw;
|
||||||
|
@media screen and (max-width: $breakpoint){
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.profile-section {
|
||||||
|
@include angled-edge("outside bottom", "lower right", $color-highlight1);
|
||||||
|
@include angled-edge("outside top", "upper right", $color-highlight1);
|
||||||
|
@include content-style($style2...);
|
||||||
|
// margin: 16px;
|
||||||
|
margin: 120px 16px 120px 16px;
|
||||||
|
//border-radius: 10px;
|
||||||
|
width: 340px;
|
||||||
|
.profile-content{
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
@media screen and (max-width: $breakpoint){
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.profile-logo {
|
||||||
|
font-size: 60px;
|
||||||
|
font-family: cursive;
|
||||||
|
@include transform(rotate(25deg));
|
||||||
|
}
|
||||||
|
|
||||||
|
//More Complex mixin
|
Loading…
Reference in New Issue