From 54f83bb231d36b51275fd19da57f8bb026a5f4b8 Mon Sep 17 00:00:00 2001 From: Mark Moser Date: Sat, 19 Aug 2017 18:55:15 -0500 Subject: [PATCH] initial pie chart --- site/assets/scss/components/_fifty.scss | 15 +++ site/assets/scss/components/_pie.scss | 161 ++++++++++++++++++++++++ site/assets/scss/elements/_layout.scss | 9 ++ site/assets/scss/main.scss | 2 + site/pages/index.hbs | 34 +++-- 5 files changed, 208 insertions(+), 13 deletions(-) create mode 100644 site/assets/scss/components/_fifty.scss create mode 100644 site/assets/scss/components/_pie.scss diff --git a/site/assets/scss/components/_fifty.scss b/site/assets/scss/components/_fifty.scss new file mode 100644 index 0000000..8859383 --- /dev/null +++ b/site/assets/scss/components/_fifty.scss @@ -0,0 +1,15 @@ +.fifty { + display: flex; + flex-wrap: wrap; + + > * { flex: 1 1 auto; } + + @media screen and (min-width: 425px) { + > * { width: 50%; } + } + + @media screen and (min-width: 768px) { + flex-wrap: nowrap; + } + +} diff --git a/site/assets/scss/components/_pie.scss b/site/assets/scss/components/_pie.scss new file mode 100644 index 0000000..119e4ec --- /dev/null +++ b/site/assets/scss/components/_pie.scss @@ -0,0 +1,161 @@ +.pie { + display: flex; + align-content: center; + align-items: center; + justify-content: center; + padding: $gutter; + + .key { + margin-left: calc(#{$gutter} + 1em); + + div { + position: relative; + padding-left: 0.33em; + line-height: 1.4em; + + &::before { + position: absolute; + bottom: 0.2em; + left: -1em; + width: 1em; + height: 1em; + content: ''; + } + + span { + &:first-of-type { + position: absolute; + left: -99999px; + } + } + } + } + + ul { + @include slim-ul; + position: relative; + margin: 0; + width: 100px; + height: 100px; + } + + li { + position: absolute; + left: 50px; + width: 50px; + height: 100px; + overflow: hidden; + transform-origin: left center; + + &::before { + position: absolute; + left: -50px; + z-index: -1; + border-radius: 100px 0 0 100px; + width: 50px; + height: 100px; + content: ""; + transform-origin: right center; + } + + @for $i from 0 through 360 { + &.start-#{$i} { + transform: rotate(#{$i}deg); + } + } + + @for $i from 0 through 360 { + &.value-#{$i}::before { + transform: rotate(#{$i + 1 }deg); + } + } + + // @for $i from 181 through 360 { + // &.value-#{$i} { + // width: 200px; + // height: 200px; + // transform-origin: center center; + // + // &::before { + // left: -100px; + // width: 100px; + // height: 200px; + // } + // + // &::after { + // position: absolute; + // left: -100px; + // border-radius: 0 100px 100px 0; + // width: 100px; + // height: 200px; + // content: ""; + // } + // } + // } + } + + .blue { + &::before, + &::after { + background-color: $blue; + } + } + + .dark-blue { + &::before, + &::after { + background-color: $dark-blue; + } + } + + .orange { + &::before, + &::after { + background-color: $orange; + } + } + + .red { + &::before, + &::after { + background-color: $red; + } + } + + .yellow { + &::before, + &::after { + background-color: $yellow; + } + } + + .dark-grey { + &::before, + &::after { + background-color: $dark-grey; + } + } +} + +@media screen and (min-width: 768px) { + .pie { + justify-content: flex-start; + + ul { + width: 200px; + height: 200px; + } + + li { + left: 100px; + width: 100px; + height: 200px; + + &::before { + left: -100px; + width: 100px; + height: 200px; + } + } + } +} diff --git a/site/assets/scss/elements/_layout.scss b/site/assets/scss/elements/_layout.scss index 64d01d7..675deb4 100644 --- a/site/assets/scss/elements/_layout.scss +++ b/site/assets/scss/elements/_layout.scss @@ -13,6 +13,10 @@ main { padding: 0; } +section { + margin: ($gutter * 2) 0; +} + @media screen and (min-width: 426px) { footer, main { @@ -27,4 +31,9 @@ main { width: calc(100% * 0.809); max-width: 860px; } + + section { + margin: ($gutter * 4) 0; + } + } diff --git a/site/assets/scss/main.scss b/site/assets/scss/main.scss index 671a725..dbc7776 100644 --- a/site/assets/scss/main.scss +++ b/site/assets/scss/main.scss @@ -15,3 +15,5 @@ @import 'components/styleguide'; @import 'components/hero'; +@import 'components/fifty'; +@import 'components/pie'; diff --git a/site/pages/index.hbs b/site/pages/index.hbs index 67367a0..78428fa 100644 --- a/site/pages/index.hbs +++ b/site/pages/index.hbs @@ -3,6 +3,8 @@ img: stock/lake.png copy: I build web things theme: blue + + # VALUE * 360 / 100 ---
@@ -23,23 +25,29 @@

-
-

General Proficiency's

- -
+
+
+

General Proficiency's

Well versed in many web development tool chains, my strengths - include Ruby, JavaScript, SCSS, SQL, and PHP. + include Ruby, CSS, HTML, JavaScript, and SQL.

+
-
-
    -
  • Ruby
  • -
  • JavaScript
  • -
  • CSS
  • -
  • SQL
  • -
  • PHP
  • -
+
+
    +
  • +
  • +
  • +
  • +
  • +
+
+
30%Ruby
+
25%CSS
+
10%HTML
+
15%JavaScript
+
20%SQL