Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate styles into 2 files #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.idea
/bourbon/*
/.sass-cache/*
*.DS_Store
/nbproject/
11 changes: 11 additions & 0 deletions config.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Require any additional compass plugins here.
add_import_path "bourbon"

# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "css"
sass_dir = "scss"
images_dir = "img"
javascripts_dir = "js"

line_comments = false
72 changes: 72 additions & 0 deletions css/demo.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/* --------------------------------

Primary style

-------------------------------- */
html * {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

body {
font-size: 100%;
font-family: "Droid Serif", serif;
color: #7f8c97;
background-color: #e9f0f5;
}

a {
color: #acb7c0;
text-decoration: none;
font-family: "Open Sans", sans-serif;
}

img {
max-width: 100%;
}

h1, h2 {
font-family: "Open Sans", sans-serif;
font-weight: bold;
}

/* --------------------------------

Main components

-------------------------------- */
header {
height: 200px;
line-height: 200px;
text-align: center;
background: #303e49;
}
header h1 {
color: #ffffff;
font-size: 18px;
font-size: 1.125rem;
}
@media only screen and (min-width: 1170px) {
header {
height: 300px;
line-height: 300px;
}
header h1 {
font-size: 24px;
font-size: 1.5rem;
}
}

.cd-timeline-img.cd-picture {
background: #75ce66;
}
.cd-timeline-img.cd-movie {
background: #c03b44;
}
.cd-timeline-img.cd-location {
background: #f0ca45;
}

.cd-timeline-content {
background: #ffffff;
}
95 changes: 10 additions & 85 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,13 @@
Primary style

-------------------------------- */
html * {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

*, *:after, *:before {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}

body {
font-size: 100%;
font-family: "Droid Serif", serif;
color: #7f8c97;
background-color: #e9f0f5;
}

a {
color: #acb7c0;
text-decoration: none;
font-family: "Open Sans", sans-serif;
}

img {
max-width: 100%;
}

h1, h2 {
font-family: "Open Sans", sans-serif;
font-weight: bold;
}

/* --------------------------------
/* --------------------------------

Modules - reusable parts of our design

Expand All @@ -54,33 +27,11 @@ Modules - reusable parts of our design
clear: both;
}

/* --------------------------------
/* --------------------------------

Main components
Main components

-------------------------------- */
header {
height: 200px;
line-height: 200px;
text-align: center;
background: #303e49;
}
header h1 {
color: white;
font-size: 18px;
font-size: 1.125rem;
}
@media only screen and (min-width: 1170px) {
header {
height: 300px;
line-height: 300px;
}
header h1 {
font-size: 24px;
font-size: 1.5rem;
}
}

#cd-timeline {
position: relative;
padding: 2em 0;
Expand Down Expand Up @@ -142,7 +93,8 @@ header h1 {
width: 40px;
height: 40px;
border-radius: 50%;
box-shadow: 0 0 0 4px white, inset 0 2px 0 rgba(0, 0, 0, 0.08), 0 3px 0 4px rgba(0, 0, 0, 0.05);
box-shadow: 0 0 0 4px #ffffff, inset 0 2px 0 rgba(0, 0, 0, 0.08), 0 3px 0 4px rgba(0, 0, 0, 0.05);
background: #a3c0d5;
}
.cd-timeline-img img {
display: block;
Expand All @@ -154,15 +106,6 @@ header h1 {
margin-left: -12px;
margin-top: -12px;
}
.cd-timeline-img.cd-picture {
background: #75ce66;
}
.cd-timeline-img.cd-movie {
background: #c03b44;
}
.cd-timeline-img.cd-location {
background: #f0ca45;
}
@media only screen and (min-width: 1170px) {
.cd-timeline-img {
width: 60px;
Expand All @@ -189,12 +132,10 @@ header h1 {
opacity: 0;
-webkit-transform: scale(0.5);
}

60% {
opacity: 1;
-webkit-transform: scale(1.2);
}

100% {
-webkit-transform: scale(1);
}
Expand All @@ -204,12 +145,10 @@ header h1 {
opacity: 0;
-moz-transform: scale(0.5);
}

60% {
opacity: 1;
-moz-transform: scale(1.2);
}

100% {
-moz-transform: scale(1);
}
Expand All @@ -223,7 +162,6 @@ header h1 {
-o-transform: scale(0.5);
transform: scale(0.5);
}

60% {
opacity: 1;
-webkit-transform: scale(1.2);
Expand All @@ -232,7 +170,6 @@ header h1 {
-o-transform: scale(1.2);
transform: scale(1.2);
}

100% {
-webkit-transform: scale(1);
-moz-transform: scale(1);
Expand All @@ -244,7 +181,7 @@ header h1 {
.cd-timeline-content {
position: relative;
margin-left: 60px;
background: white;
background: #fbfcfd;
border-radius: 0.25em;
padding: 1em;
box-shadow: 0 3px 0 #d7e4ed;
Expand Down Expand Up @@ -272,7 +209,7 @@ header h1 {
float: right;
padding: .8em 1em;
background: #acb7c0;
color: white;
color: #ffffff;
border-radius: 0.25em;
}
.no-touch .cd-timeline-content .cd-read-more:hover {
Expand All @@ -291,7 +228,7 @@ header h1 {
height: 0;
width: 0;
border: 7px solid transparent;
border-right: 7px solid white;
border-right: 7px solid #ffffff;
}
@media only screen and (min-width: 768px) {
.cd-timeline-content h2 {
Expand All @@ -317,7 +254,7 @@ header h1 {
top: 24px;
left: 100%;
border-color: transparent;
border-left-color: white;
border-left-color: #ffffff;
}
.cd-timeline-content .cd-read-more {
float: left;
Expand All @@ -338,7 +275,7 @@ header h1 {
left: auto;
right: 100%;
border-color: transparent;
border-right-color: white;
border-right-color: #ffffff;
}
.cd-timeline-block:nth-child(even) .cd-timeline-content .cd-read-more {
float: right;
Expand Down Expand Up @@ -372,12 +309,10 @@ header h1 {
opacity: 0;
-webkit-transform: translateX(-100px);
}

60% {
opacity: 1;
-webkit-transform: translateX(20px);
}

100% {
-webkit-transform: translateX(0);
}
Expand All @@ -387,12 +322,10 @@ header h1 {
opacity: 0;
-moz-transform: translateX(-100px);
}

60% {
opacity: 1;
-moz-transform: translateX(20px);
}

100% {
-moz-transform: translateX(0);
}
Expand All @@ -406,7 +339,6 @@ header h1 {
-o-transform: translateX(-100px);
transform: translateX(-100px);
}

60% {
opacity: 1;
-webkit-transform: translateX(20px);
Expand All @@ -415,7 +347,6 @@ header h1 {
-o-transform: translateX(20px);
transform: translateX(20px);
}

100% {
-webkit-transform: translateX(0);
-moz-transform: translateX(0);
Expand All @@ -429,12 +360,10 @@ header h1 {
opacity: 0;
-webkit-transform: translateX(100px);
}

60% {
opacity: 1;
-webkit-transform: translateX(-20px);
}

100% {
-webkit-transform: translateX(0);
}
Expand All @@ -444,12 +373,10 @@ header h1 {
opacity: 0;
-moz-transform: translateX(100px);
}

60% {
opacity: 1;
-moz-transform: translateX(-20px);
}

100% {
-moz-transform: translateX(0);
}
Expand All @@ -463,7 +390,6 @@ header h1 {
-o-transform: translateX(100px);
transform: translateX(100px);
}

60% {
opacity: 1;
-webkit-transform: translateX(-20px);
Expand All @@ -472,7 +398,6 @@ header h1 {
-o-transform: translateX(-20px);
transform: translateX(-20px);
}

100% {
-webkit-transform: translateX(0);
-moz-transform: translateX(0);
Expand Down
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

<link rel="stylesheet" href="css/reset.css"> <!-- CSS reset -->
<link rel="stylesheet" href="css/style.css"> <!-- Resource style -->
<link rel="stylesheet" href="css/demo.css"> <!-- Demo page style -->
<script src="js/modernizr.js"></script> <!-- Modernizr -->

<title>Responsive Vertical Timeline</title>
Expand Down
Loading