personally-developed 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +121 -0
  4. data/_includes/footer.html +5 -0
  5. data/_includes/head.html +15 -0
  6. data/_includes/header.html +14 -0
  7. data/_includes/seo.html +1 -0
  8. data/_layouts/default.html +24 -0
  9. data/_layouts/home.html +35 -0
  10. data/_layouts/page.html +11 -0
  11. data/_layouts/post.html +16 -0
  12. data/_sass/personally-developed/_animate.scss +44 -0
  13. data/_sass/personally-developed/_archive.scss +21 -0
  14. data/_sass/personally-developed/_fonts.scss +25 -0
  15. data/_sass/personally-developed/_footer.scss +9 -0
  16. data/_sass/personally-developed/_header.scss +27 -0
  17. data/_sass/personally-developed/_layout.scss +75 -0
  18. data/_sass/personally-developed/_neat.scss +26 -0
  19. data/_sass/personally-developed/_posts.scss +39 -0
  20. data/_sass/personally-developed/_reboot.scss +473 -0
  21. data/_sass/personally-developed/_syntax.scss +84 -0
  22. data/_sass/personally-developed/_utilities.scss +13 -0
  23. data/_sass/personally-developed/_variables.scss +50 -0
  24. data/_sass/personally-developed/neat/functions/_neat-append-grid-visual.scss +21 -0
  25. data/_sass/personally-developed/neat/functions/_neat-column-default.scss +23 -0
  26. data/_sass/personally-developed/neat/functions/_neat-column-ratio.scss +24 -0
  27. data/_sass/personally-developed/neat/functions/_neat-column-width.scss +25 -0
  28. data/_sass/personally-developed/neat/functions/_neat-float-direction.scss +22 -0
  29. data/_sass/personally-developed/neat/functions/_neat-merge-defaults.scss +23 -0
  30. data/_sass/personally-developed/neat/functions/_neat-opposite-direction.scss +22 -0
  31. data/_sass/personally-developed/neat/functions/_neat-parse-columns.scss +22 -0
  32. data/_sass/personally-developed/neat/functions/_neat-parse-media.scss +20 -0
  33. data/_sass/personally-developed/neat/functions/_retrieve-neat-settings.scss +19 -0
  34. data/_sass/personally-developed/neat/mixins/_grid-collapse.scss +36 -0
  35. data/_sass/personally-developed/neat/mixins/_grid-column.scss +39 -0
  36. data/_sass/personally-developed/neat/mixins/_grid-container.scss +30 -0
  37. data/_sass/personally-developed/neat/mixins/_grid-media.scss +67 -0
  38. data/_sass/personally-developed/neat/mixins/_grid-push.scss +37 -0
  39. data/_sass/personally-developed/neat/mixins/_grid-shift.scss +36 -0
  40. data/_sass/personally-developed/neat/mixins/_grid-visual.scss +67 -0
  41. data/_sass/personally-developed/neat/settings/_settings.scss +74 -0
  42. data/_sass/personally-developed.scss +15 -0
  43. data/assets/js/main.min.js +1 -0
  44. data/assets/main.scss +4 -0
  45. metadata +129 -0
@@ -0,0 +1,25 @@
1
+ @charset "UTF-8";
2
+ /// Return a calulated column width that can then be passed in to a `calc()`.
3
+ ///
4
+ /// @argument {map} $grid
5
+ ///
6
+ /// @argument {number} $columns
7
+ ///
8
+ /// @return {string}
9
+ ///
10
+ /// @example scss
11
+ /// _neat-column-width($neat-grid, 4)
12
+ ///
13
+ /// @access private
14
+
15
+ @function _neat-column-width($grid, $columns) {
16
+ $_column-ratio: _neat-column-ratio($grid, $columns);
17
+ $_gutter: _retrieve-neat-setting($grid, gutter);
18
+
19
+ @if $_gutter == 0 {
20
+ @return unquote("#{percentage($_column-ratio)}");
21
+ } @else {
22
+ $_gutter-affordance: $_gutter + ($_gutter * $_column-ratio);
23
+ @return unquote("#{percentage($_column-ratio)} - #{$_gutter-affordance}");
24
+ }
25
+ }
@@ -0,0 +1,22 @@
1
+ @charset "UTF-8";
2
+ /// Return the float direction of the grid.
3
+ ///
4
+ /// @argument {map} $grid
5
+ ///
6
+ /// @return {string}
7
+ ///
8
+ /// @example scss
9
+ /// _neat-float-direction($neat-grid)
10
+ ///
11
+ /// @access private
12
+
13
+ @function _neat-float-direction($grid) {
14
+ $_direction: _retrieve-neat-setting($grid, direction);
15
+ $_float-direction: null;
16
+ @if $_direction == "ltr" {
17
+ $_float-direction: left;
18
+ } @else if $_direction == "rtl" {
19
+ $_float-direction: right;
20
+ }
21
+ @return $_float-direction;
22
+ }
@@ -0,0 +1,23 @@
1
+ @charset "UTF-8";
2
+ /// Apply Neat's default properties to undefined values within a map.
3
+ ///
4
+ /// @argument {map} $grid
5
+ ///
6
+ /// @return {map}
7
+ ///
8
+ /// @example scss
9
+ /// _retrieve-neat-setting($neat-grid)
10
+ ///
11
+ /// @access private
12
+
13
+ @function _neat-merge-defaults($grid) {
14
+ $_merged-grid: map-merge((
15
+ columns: 12,
16
+ gutter: 20px,
17
+ media: null,
18
+ color: rgba(#00d4ff, 0.25),
19
+ direction: ltr,
20
+ ), $grid);
21
+
22
+ @return $_merged-grid;
23
+ }
@@ -0,0 +1,22 @@
1
+ @charset "UTF-8";
2
+ /// Return the oppoite of the float direction of the grid.
3
+ ///
4
+ /// @argument {map} $grid
5
+ ///
6
+ /// @return {string}
7
+ ///
8
+ /// @example scss
9
+ /// _neat-opposite-direction($neat-grid)
10
+ ///
11
+ /// @access private
12
+
13
+ @function _neat-opposite-direction($grid) {
14
+ $_direction: _retrieve-neat-setting($grid, direction);
15
+ $_float-direction: null;
16
+ @if $_direction == "ltr" {
17
+ $_float-direction: right;
18
+ } @else if $_direction == "rtl" {
19
+ $_float-direction: left;
20
+ }
21
+ @return $_float-direction;
22
+ }
@@ -0,0 +1,22 @@
1
+ @charset "UTF-8";
2
+ /// Parse a column count like `3 of 5` and retur the total coloumn count.
3
+ /// This is to allow a shorthand for custom grids without using a settings map.
4
+ ///
5
+ ///
6
+ /// @argument {list} $span
7
+ ///
8
+ /// @return {number}
9
+ ///
10
+ /// @example scss
11
+ /// _neat-parse-columns(3 of 5)
12
+ ///
13
+ /// @access private
14
+
15
+ @function _neat-parse-columns($span) {
16
+ @if length($span) == 3 {
17
+ $_total-columns: nth($span, 3);
18
+ @return $_total-columns;
19
+ } @else if length($span) == 2 or if length($span) >= 3 {
20
+ @error "`$column` should contain 2 values, seperated by an `of`";
21
+ }
22
+ }
@@ -0,0 +1,20 @@
1
+ @charset "UTF-8";
2
+ /// Parse media types. If the property is a string then return it, otherwise
3
+ /// assume screen and min-width.
4
+ ///
5
+ /// @argument {string | number (with unit)} $media
6
+ ///
7
+ /// @return {number}
8
+ ///
9
+ /// @example scss
10
+ /// _neat-parse-media($grid, 1000px)
11
+ ///
12
+ /// @access private
13
+
14
+ @function _neat-parse-media($media) {
15
+ @if type-of($media) == number {
16
+ @return "only screen and (min-width: #{$media})";
17
+ } @else if type-of($media) == string {
18
+ @return "#{$media}";
19
+ }
20
+ }
@@ -0,0 +1,19 @@
1
+ @charset "UTF-8";
2
+ /// This function recives a grid map and merges it with Neat's defauls.
3
+ /// It then returns the value of the property that has been passed to it.
4
+ ///
5
+ /// @argument {map} $grid
6
+ ///
7
+ /// @argument {string} $setting
8
+ ///
9
+ /// @return {boolean | color | list | number | string}
10
+ ///
11
+ /// @example scss
12
+ /// _retrieve-neat-setting($neat-grid, columns)
13
+ ///
14
+ /// @access private
15
+
16
+ @function _retrieve-neat-setting($grid, $setting) {
17
+ $_grid-settings: map-merge(_neat-merge-defaults($neat-grid), $grid);
18
+ @return map-get($_grid-settings, $setting);
19
+ }
@@ -0,0 +1,36 @@
1
+ @charset "UTF-8";
2
+ /// Creates collapsed grid object that consumes the gutters of its container,
3
+ /// for use in nested layouts.
4
+ ///
5
+ /// @group features
6
+ ///
7
+ /// @name Grid collapse
8
+ ///
9
+ /// @argument {map} $grid [$neat-grid]
10
+ /// The grid to be used to generate the collapsed container.
11
+ /// By default, the global `$neat-grid` will be used.
12
+ ///
13
+ /// @example scss
14
+ /// .element {
15
+ /// @include grid-collapse;
16
+ /// }
17
+ ///
18
+ /// @example css
19
+ /// .element {
20
+ /// float: left;
21
+ /// margin-left: -20px;
22
+ /// margin-right: -20px;
23
+ /// width: calc(100% + 40px);
24
+ /// }
25
+
26
+ @mixin grid-collapse($grid: $neat-grid) {
27
+ $_grid-gutter: _retrieve-neat-setting($grid, gutter);
28
+
29
+ @if unit($_grid-gutter) == "%" {
30
+ @warn "`grid-collapse` is not compatible with percentage based gutters.";
31
+ }
32
+
33
+ margin-#{_neat-float-direction($grid)}: -($_grid-gutter);
34
+ margin-#{_neat-opposite-direction($grid)}: -($_grid-gutter);
35
+ width: calc(100% + #{($_grid-gutter * 2)});
36
+ }
@@ -0,0 +1,39 @@
1
+ @charset "UTF-8";
2
+ /// Creates a grid column of requested size.
3
+ ///
4
+ /// @group features
5
+ ///
6
+ /// @name Grid column
7
+ ///
8
+ /// @argument {number (unitless)} $columns [null]
9
+ /// Specifies the number of columns an element should span based on the total
10
+ /// columns of the grid.
11
+ ///
12
+ /// This can also be defined in a shorthand syntaxt which also contains the
13
+ /// total column count such as `3 of 5`.
14
+ ///
15
+ /// @argument {map} $grid [$neat-grid]
16
+ /// The grid to be used to generate the column.
17
+ /// By default, the global `$neat-grid` will be used.
18
+ ///
19
+ /// @example scss
20
+ /// .element {
21
+ /// @include grid-column(3);
22
+ /// }
23
+ ///
24
+ /// @example css
25
+ /// .element {
26
+ /// width: calc(25% - 25px);
27
+ /// float: left;
28
+ /// margin-left: 20px;
29
+ /// }
30
+
31
+ @mixin grid-column($columns: null, $grid: $neat-grid) {
32
+ $columns: _neat-column-default($grid, $columns);
33
+ $_grid-columns: _retrieve-neat-setting($grid, columns);
34
+ $_grid-gutter: _retrieve-neat-setting($grid, gutter);
35
+
36
+ width: calc(#{_neat-column-width($grid, $columns)});
37
+ float: _neat-float-direction($grid);
38
+ margin-#{_neat-float-direction($grid)}: $_grid-gutter;
39
+ }
@@ -0,0 +1,30 @@
1
+ @charset "UTF-8";
2
+ /// Creates a grid container with clearfix.
3
+ ///
4
+ /// @group features
5
+ ///
6
+ /// @name Grid container
7
+ ///
8
+ /// @argument {map} $grid [$neat-grid]
9
+ /// The grid to be used to generate the container.
10
+ /// By default, the global `$neat-grid` will be used.
11
+ ///
12
+ /// @example scss
13
+ /// .element {
14
+ /// @include grid-container;
15
+ /// }
16
+ ///
17
+ /// @example css
18
+ /// .element::after {
19
+ /// clear: both;
20
+ /// content: "";
21
+ /// display: block;
22
+ /// }
23
+
24
+ @mixin grid-container($grid: $neat-grid) {
25
+ &::after {
26
+ clear: both;
27
+ content: "";
28
+ display: block;
29
+ }
30
+ }
@@ -0,0 +1,67 @@
1
+ @charset "UTF-8";
2
+ /// `grid-media` allows you to change your layout based on a media query.
3
+ /// For example, an object can span 3 columns on small screens and 6 columns
4
+ /// on large screens.
5
+ ///
6
+ /// You can take this a step further and set different grid attributes like
7
+ /// gutter size and total column count for each media query. So, for example,
8
+ /// you can have a `1rem` gutter on small screens, and a `2rem` gutter on large
9
+ /// screens.
10
+ ///
11
+ /// @group features
12
+ ///
13
+ /// @name Grid media
14
+ ///
15
+ /// @argument {map} $grid
16
+ /// The grid to be used within the scope of the block.
17
+ /// This grid should include the `media` property to determine the expression
18
+ /// for the media query.
19
+ ///
20
+ /// @content
21
+ /// Grid media will temporarily the override the default grid with the
22
+ /// attributes of the custom grid. This change is scoped to within the mixin
23
+ /// block, and once the mixin has ended the default grid will revert to its
24
+ /// original state as defined by `$neat-grid`. This allows for different
25
+ /// gutter width and column count based on screen size or other properties.
26
+ ///
27
+ /// @example scss
28
+ /// $custom-neat-grid: (
29
+ /// columns: 12,
30
+ /// gutter: 50px,
31
+ /// media: 1000px,
32
+ /// );
33
+ ///
34
+ /// .element {
35
+ /// @include grid-column(3);
36
+ ///
37
+ /// @include grid-media($custom-neat-grid){
38
+ /// @include grid-column(6);
39
+ /// }
40
+ /// }
41
+ ///
42
+ /// @example css
43
+ /// .element {
44
+ /// width: calc(25% - 25px);
45
+ /// float: left;
46
+ /// margin-left: 20px;
47
+ /// }
48
+ ///
49
+ /// @media only screen and (min-width: 1000px) {
50
+ /// .element {
51
+ /// width: calc(50% - 75px);
52
+ /// float: left;
53
+ /// margin-left: 50px;
54
+ /// }
55
+ /// }
56
+
57
+ @mixin grid-media($grid) {
58
+ $_media: _retrieve-neat-setting($grid, media);
59
+ $_query: _neat-parse-media($_media);
60
+
61
+ @media #{$_query} {
62
+ $_default-neat-grid: $neat-grid;
63
+ $neat-grid: map-merge($neat-grid, $grid) !global;
64
+ @content;
65
+ $neat-grid: $_default-neat-grid !global;
66
+ }
67
+ }
@@ -0,0 +1,37 @@
1
+ @charset "UTF-8";
2
+ /// Push or pull a grid column by manipulating its left margin.
3
+ ///
4
+ /// @group features
5
+ ///
6
+ /// @name Grid push
7
+ ///
8
+ /// @argument {number (unitless)} $push [false]
9
+ /// The number of columns to push the column.
10
+ ///
11
+ /// @argument {map} $grid [$neat-grid]
12
+ /// The grid to be used to detirmine how far to push the column.
13
+ /// By default, the global `$neat-grid` will be used.
14
+ ///
15
+ /// @example scss
16
+ /// .element {
17
+ /// @include grid-push(3);
18
+ /// }
19
+ ///
20
+ /// @example css
21
+ /// .element {
22
+ /// margin-left: calc(25% - 25px + 40px);
23
+ /// }
24
+
25
+ @mixin grid-push($push: false, $grid: $neat-grid) {
26
+ $_grid-columns: _retrieve-neat-setting($grid, columns);
27
+ $_grid-gutter: _retrieve-neat-setting($grid, gutter);
28
+
29
+ @if $push {
30
+ $_gutter-affordance: $_grid-gutter * 2;
31
+ $_margin-value: calc(#{_neat-column-width($grid, $push)} + #{$_gutter-affordance});
32
+ margin-#{_neat-float-direction($grid)}: $_margin-value;
33
+ } @else {
34
+ $_margin-value: _retrieve-neat-setting($grid, gutter);
35
+ margin-#{_neat-float-direction($grid)}: $_margin-value;
36
+ }
37
+ }
@@ -0,0 +1,36 @@
1
+ @charset "UTF-8";
2
+ /// Shift columns and reorder them within their container using relative
3
+ /// positioning.
4
+ ///
5
+ /// @group features
6
+ ///
7
+ /// @name Grid shift
8
+ ///
9
+ /// @argument {number (unitless)} $shift [false]
10
+ /// The number of columns to shift the column.
11
+ ///
12
+ /// @argument {map} $grid [$neat-grid]
13
+ /// The grid to be used to detirmine how far to shift the column.
14
+ /// By default, the global `$neat-grid` will be used.
15
+ ///
16
+ /// @example scss
17
+ /// .element {
18
+ /// @include grid-shift(3);
19
+ /// }
20
+ ///
21
+ /// @example css
22
+ /// .element {
23
+ /// left: calc(25% - 25px + 20px);
24
+ /// position: relative;
25
+ /// }
26
+
27
+ @mixin grid-shift($shift: false, $grid: $neat-grid) {
28
+ @if $shift {
29
+ $_shift-value: calc(#{_neat-column-width($grid, $shift)} + #{_retrieve-neat-setting($grid, gutter)});
30
+ #{_neat-float-direction($grid)}: $_shift-value;
31
+ } @else {
32
+ #{_neat-float-direction($grid)}: auto;
33
+ }
34
+
35
+ position: relative;
36
+ }
@@ -0,0 +1,67 @@
1
+ @charset "UTF-8";
2
+ /// Creates a series of guide lines using the `background-image` property on a
3
+ /// grid container to visualise the columns and gutters of the grid.
4
+ ///
5
+ /// @group features
6
+ ///
7
+ /// @name Grid visual
8
+ ///
9
+ /// @argument {color} $color
10
+ /// The color of the guide lines created.
11
+ ///
12
+ /// @argument {map} $grid [$neat-grid]
13
+ /// The grid used to determine the guides
14
+ ///
15
+ /// @example scss
16
+ /// .element {
17
+ /// @include grid-visual;
18
+ /// }
19
+ ///
20
+ /// @example css
21
+ /// .element {
22
+ /// background-image: linear-gradient( … ) ;
23
+ /// }
24
+
25
+ @mixin grid-visual($color: null, $grid: $neat-grid) {
26
+ @if not $color {
27
+ $color: _retrieve-neat-setting($grid, color);
28
+ }
29
+
30
+ $_grid-columns: _retrieve-neat-setting($grid, columns);
31
+ $_grid-gutter: _retrieve-neat-setting($grid, gutter);
32
+ $_grid-visual-object: () !default;
33
+ $_grid-visual:
34
+ $color,
35
+ $color $_grid-gutter,
36
+ transparent $_grid-gutter,
37
+ ;
38
+
39
+ @for $i from 1 to $_grid-columns {
40
+ $_grid-visual-local: (
41
+ #{$i}: "#{_neat-column-width($grid, $i)} + #{$_grid-gutter}",
42
+ );
43
+
44
+ $_grid-visual-object: map-merge($_grid-visual-object, $_grid-visual-local);
45
+ }
46
+
47
+ @each $stop, $location in $_grid-visual-object {
48
+ $_grid-visual-loop-list:
49
+ transparent calc(#{$location}),
50
+ $color calc(#{$location}),
51
+ $color calc(#{$location} + #{$_grid-gutter}),
52
+ transparent calc(#{$location} + #{$_grid-gutter}),
53
+ ;
54
+
55
+ $_grid-visual: _neat-append-grid-visual($_grid-visual, $_grid-visual-loop-list);
56
+ }
57
+
58
+ $_grid-visual-loop-list:
59
+ transparent calc(100% - #{$_grid-gutter}),
60
+ $color calc(100% - #{$_grid-gutter}),
61
+ $color calc(100%),
62
+ ;
63
+
64
+ $_grid-visual: _neat-append-grid-visual($_grid-visual, $_grid-visual-loop-list);
65
+
66
+ background-image: linear-gradient(to right, $_grid-visual);
67
+ }
@@ -0,0 +1,74 @@
1
+ @charset "UTF-8";
2
+ /// This variable is a sass map that overrides Neat's default grid settings.
3
+ /// Use this to define your project's grid properties incluting gutters and
4
+ /// total column count.
5
+ ///
6
+ /// @type map
7
+ ///
8
+ /// @group settings
9
+ ///
10
+ /// @name Neat grid
11
+ ///
12
+ /// @property {number (unitless)} columns [12]
13
+ /// Default number of the total grid columns.
14
+ ///
15
+ /// @property {number (with unit)} gutter [20px]
16
+ /// Default grid gutter width between columns.
17
+ ///
18
+ /// @example scss
19
+ /// $neat-grid: (
20
+ /// columns: 12,
21
+ /// gutter: 20px,
22
+ /// );
23
+
24
+ $neat-grid: () !default;
25
+
26
+ /// If you need multiple grids in a single project, you can do
27
+ /// this by defining a new map stored within a variable of your choosing. This
28
+ /// variable can then be passed directly in to any of Neat's mixins like
29
+ /// [`grid-column(12, $my-custom-grid)`](#grid-column).
30
+ ///
31
+ /// Custom grids are especially useful with [`grid-media`](#grid-media). By
32
+ /// defining a `media` attribute within your custom grid, you are able to easily
33
+ /// define gutter width and total column count as well the breakpoint at which
34
+ /// they should activate.
35
+ ///
36
+ /// @type map
37
+ ///
38
+ /// @group settings
39
+ ///
40
+ /// @name Custom grids
41
+ ///
42
+ /// @property {number (unitless)} columns [12]
43
+ /// Number of the total grid columns.
44
+ ///
45
+ /// @property {number (with unit)} gutter [20px]
46
+ /// Grid gutter width between columns.
47
+ ///
48
+ /// @property {number (with unit) | string | null} media [null]
49
+ /// The `@media` definition that is used by the [`grid-media`](#grid-media)
50
+ /// mixin to detirmine the media properties.
51
+ ///
52
+ /// @property {color} color [null]
53
+ /// The color used by [`grid-visual`](#grid-visual) to create the guides.
54
+ ///
55
+ /// @property {string} direction [ltr]
56
+ /// The float direction used throughout the grid.
57
+ ///
58
+ /// @example scss
59
+ /// $my-custom-grid: (
60
+ /// columns: 12,
61
+ /// gutter: 20px,
62
+ /// media: 1200px,
63
+ /// color: rgba(#00d4ff, 0.25),
64
+ /// direction: ltr,
65
+ /// );
66
+ ///
67
+ /// $other-custom-grid-for-print: (
68
+ /// columns: 14,
69
+ /// gutter: 1.5rem,
70
+ /// media: print,
71
+ /// );
72
+ ///
73
+
74
+ $neat-custom-grid: () !default;
@@ -0,0 +1,15 @@
1
+ @import
2
+ "personally-developed/variables",
3
+ "personally-developed/reboot",
4
+ "personally-developed/fonts",
5
+ "personally-developed/neat",
6
+ url(https://fonts.googleapis.com/css?family=Inconsolata:400,700),
7
+ "personally-developed/animate",
8
+ "personally-developed/syntax",
9
+ "personally-developed/layout",
10
+ "personally-developed/header",
11
+ "personally-developed/posts",
12
+ "personally-developed/archive",
13
+ "personally-developed/footer",
14
+ "personally-developed/utilities"
15
+ ;
@@ -0,0 +1 @@
1
+ function dayOfWeek(){var e=new Date,n=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];return n[e.getDay()]}window.onload=function(){function e(){function e(){if("undefined"!=typeof window.scrollY)return window.scrollY;var e=document.documentElement;return e.clientHeight?e.scrollTop:document.body.scrollTop}if(window.innerWidth>=1e3)window.onscroll=function(){var n=document.getElementById("box"),o=e();28>=o?n.style.top="0px":n.style.top=o+2+"px"};else{window.onscroll=null;var n=document.getElementById("box");n.style.top="0px"}}e(),window.addEventListener("resize",e,!1),document.getElementById("day").innerHTML=dayOfWeek()};
data/assets/main.scss ADDED
@@ -0,0 +1,4 @@
1
+ ---
2
+ ---
3
+ // Import the partials
4
+ @import "personally-developed";