dev-portfolio-blog 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f6e2cd76ca1b7bb0e1d221f5e3909aab3ed0341f7e0cb87d0b132a3c2bb70787
4
- data.tar.gz: 48c2b51910ff6c1d75895ea8baeb054570b4a914f277fb6ff8935d38d8f202cf
3
+ metadata.gz: dc6309102a33db996690ae0f8aa9ec6e02b91c5fee12f9583b3a498a324e51bd
4
+ data.tar.gz: 2f255e4fdb163ea99114e3bfee9afb24fea7cb692ff7b3a1bee11634dcfdd2e9
5
5
  SHA512:
6
- metadata.gz: da921aeba3a3fcff87a5c9164829293475c6ee632c177ac0493e1ce682a512e154f20b2d29b1d26b43d4ada619fdcfc455c6c98d70f90521c31a734b4ddc880b
7
- data.tar.gz: c10b4364a4908718d1a78d60ddb1c4021ca442812aeb8cfa18b0b5964442170a98b3de357b21ffbba237207f2719f5bf280b0879144b71d25dea0d44d9383d54
6
+ metadata.gz: 38686cae34c56a8d44b5c70231d6329d6cd613d179eb545b0b93780f7f7a54d5095b5f2edab9b39dd4f70656f5a3f77696b2488e6a5a5e154f78ef60a8366975
7
+ data.tar.gz: c355ab8829db0b20b8a572a7989a13da68fbb7a128e6cc36ffcd3cff4ec58f8d31725b150f7101bcd9db4d7353da977deec6657f722b90fb9c3b57c2a2129ade
data/README.md CHANGED
@@ -5,6 +5,19 @@
5
5
  [![CodeFactor](https://www.codefactor.io/repository/github/rohitjain00/dev-portfolio-blog/badge)](https://www.codefactor.io/repository/github/rohitjain00/dev-portfolio-blog)
6
6
  [![Codacy Badge](https://api.codacy.com/project/badge/Grade/d0b9f1c23f564a8195a8588de7895c4c)](https://www.codacy.com/manual/rohitjain00/dev-portfolio-blog?utm_source=github.com&utm_medium=referral&utm_content=rohitjain00/dev-portfolio-blog&utm_campaign=Badge_Grade)
7
7
 
8
+ ## Home pagespeed
9
+
10
+ ![GitHub PageSpeed](https://api.speedbadge.io/v1?url=therohitjain.com&showStratLabel=true)
11
+ ![GitHub PageSpeed](https://api.speedbadge.io/v1?url=therohitjain.com&strat=desktop&showStratLabel=true)
12
+
13
+
14
+ ## Blog pagespeed
15
+
16
+ ![GitHub PageSpeed](https://api.speedbadge.io/v1?url=therohitjain.com/blog&showStratLabel=true)
17
+ ![GitHub PageSpeed](https://api.speedbadge.io/v1?url=therohitjain.com/blog&strat=desktop&showStratLabel=true)
18
+
19
+
20
+
8
21
  # dev-portfolio-blog
9
22
 
10
23
  This is a minimal jekyll theme for writing blogs and about yourself.
@@ -46,7 +59,9 @@ Or install it yourself as:
46
59
 
47
60
  ## Usage
48
61
 
49
- To start using the theme you need to create and edit some extra files in the root directory
62
+ To start using the theme you need to follow these steps.
63
+
64
+ Assuming that you started your first website based on `minima` theme from [here](https://jekyllrb.com/docs/)
50
65
 
51
66
  1. Create `blog.md` in the root folder ans set its yaml parameters to
52
67
 
@@ -63,33 +78,54 @@ layout: description
63
78
  permalink: /about/
64
79
  ```
65
80
 
66
- 3. In the `_congif.yml` file add a key `resume_url` and set it to the path of the Resume. Also add `author_name` to your name to appear on the website.
81
+ 3. In the `index.md` file add
82
+
83
+ ```yaml
84
+ home_text : [Your Text]
85
+ ```
67
86
 
68
- For example if the Resume is located in the root directory
87
+ 4. In the `_congif.yml` file add a key `resume_url` and set it to the path of the Resume. Also add `author_name` to your name to appear on the website.
69
88
 
89
+ Path is relative to the root directory
70
90
  ```yaml
71
- resume_url: 'Resume.pdf'
72
- author_name: [YOUR-NAME]
91
+ resume_url: [PATH_TO_RESUME]
92
+ author_name: [YOUR_NAME]
73
93
  ```
74
94
 
75
- ### Pagination
76
95
 
77
- Visit [jekyll-paginate-v2](https://github.com/sverrirs/jekyll-paginate-v2/blob/master/README-GENERATOR.md#site-configuration) and add this to your `_config.yml` file to enable pagination.
96
+ 5. In the `index.md` file add
78
97
 
79
- Check [_config.yml](https://github.com/rohitjain00/dev-portfolio-blog/blob/master/_config.yml).
80
98
 
99
+ ### Minifier
81
100
 
82
- 1. In the `index.md` file add
101
+ Visit [Jekyll-minifier](https://github.com/digitalsparky/jekyll-minifier) and add this to your `_config.yml` file to enable minifier.
83
102
 
103
+ ##### Check [_config.yml](https://github.com/rohitjain00/dev-portfolio-blog/blob/master/_config.yml) for example config file.
104
+
105
+ =======
84
106
  ```yaml
85
- home_text : some-text
107
+ home_text : [some-text]
86
108
  ```
87
109
 
88
110
  Replace "some-text" with your text
89
111
 
112
+ 6. Using Google Analytics add
113
+
114
+ ```yaml
115
+ google_analytics: [google analytics Id]
116
+ ```
117
+
118
+
119
+ ### Pagination
120
+
121
+ Visit [jekyll-paginate-v2](https://github.com/sverrirs/jekyll-paginate-v2/blob/master/README-GENERATOR.md#site-configuration) and add this to your `_config.yml` file to enable pagination.
122
+
123
+ Check [_config.yml](https://github.com/rohitjain00/dev-portfolio-blog/blob/master/_config.yml).
124
+
125
+
90
126
  ## Contributing
91
127
 
92
- Bug reports and pull requests are welcome on GitHub at <https://github.com/[USERNAME]/dev-portfolio-blog/.> This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
128
+ Bug reports and pull requests are welcome on GitHub at <https://github.com/rohitjain00/dev-portfolio-blog/.> This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
93
129
 
94
130
  ## Development
95
131
 
@@ -0,0 +1,9 @@
1
+ <!-- Global site tag (gtag.js) - Google Analytics -->
2
+ <script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
3
+ <script>
4
+ window.dataLayer = window.dataLayer || [];
5
+ function gtag(){dataLayer.push(arguments);}
6
+ gtag('js', new Date());
7
+
8
+ gtag('config', '{{ site.google_analytics }}');
9
+ </script>
@@ -0,0 +1,2 @@
1
+ <select id='themeSelector' onchange="toggleTheme()">
2
+ </select>
@@ -2,16 +2,18 @@
2
2
  layout: description
3
3
  title: Blog
4
4
  pagetype: blog
5
- pagination:
6
- enabled: true
7
5
  ---
8
6
  <!-- This loops through the paginated posts -->
9
7
  <ul>
10
- {% for post in paginator.posts %}
11
- <h2><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h2>
12
- <small>{{ post.date | date_to_string }}</small>
13
- <p>{{ post.excerpt }}</p>
14
- {% endfor %}
8
+ {% if paginator.total_posts == 0 %}
9
+ <p>No posts right now.</p>
10
+ {% else %}
11
+ {% for post in paginator.posts %}
12
+ <h2><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h2>
13
+ <small>{{ post.date | date_to_string }}</small>
14
+ <p>{{ post.excerpt }}</p>
15
+ {% endfor %}
16
+ {% endif %}
15
17
  </ul>
16
18
  <hr>
17
19
  {% if paginator.total_pages > 1 %}
@@ -28,4 +30,4 @@ pagination:
28
30
  </li>
29
31
  {% endif %}
30
32
  </ul>
31
- {% endif %}
33
+ {% endif %}
@@ -4,13 +4,16 @@
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>{{ page.title }}</title>
7
-
8
7
  <link rel="stylesheet" href="{{"/assets/css/styles.css" | relative_url}}">
9
-
8
+ {% include analytics.html %}
10
9
  {% feed_meta %}
11
10
  {% seo %}
11
+
12
12
  </head>
13
- <body>
14
- {{ content }}
15
- </body>
13
+ <body onload="onLoad()">
14
+ {% include themeSelector.html %}
15
+ {{ content }}
16
+ <script src="{{"/assets/js/theme.js" | relative_url }}"></script>
17
+ <script src="{{"/assets/js/script.js" | relative_url }}"></script>
18
+ </body>
16
19
  </html>
@@ -3,8 +3,4 @@ layout: description
3
3
  ---
4
4
  <h2>{{ page.title }}</h2>
5
5
  <small>{{ post.date | date_to_string }}</small>
6
- {{content}}
7
-
8
- {% if page.comments%}
9
- <hr>
10
- {% endif %}
6
+ {{content}}
@@ -6,182 +6,165 @@
6
6
  @media (max-width: 768px) { @content; }
7
7
  }
8
8
  }
9
+ html {
10
+ --primary-background-color: white;
11
+ --primary-text-color: #222;
12
+ }
13
+
9
14
  body {
10
- background-color: white;
11
- color: #222;
12
- // font-family: ;
15
+ background-color: var(--primary-background-color);
16
+ color: var(--primary-text-color);
17
+ transition: background 0.1s ease-in, color 0.1s ease-in;
13
18
  font-size: 120%;
14
-
15
- .mid-section-home {
16
- text-align: center;
17
- display: inline-block;
18
- position: fixed;
19
- top: 0;
20
- bottom: 0;
21
- left: 0;
22
- right: 0;
23
- width: 400px;
19
+ }
20
+ .mid-section-home {
21
+ text-align: center;
22
+ display: inline-block;
23
+ position: fixed;
24
+ top: 0;
25
+ bottom: 0;
26
+ left: 0;
27
+ right: 0;
28
+ width: 400px;
29
+ height: 350px;
30
+ margin: auto;
31
+ font-size: 1.5rem;
32
+ @include mediaQuery(phone-width) {
33
+ font-size: 1 rem;
24
34
  height: 350px;
25
- margin: auto;
26
- font-size: 1.5rem;
27
-
28
- @include mediaQuery(phone-width) {
29
- font-size: 1 rem;
30
- height: 350px;
31
- width: 100%;
32
- span {
33
- display: none;
34
- }
35
- }
36
- h1 {
37
- font-size: 3.5rem;
38
- font-weight: 600;
39
- }
40
- .sub-heading {
41
- width: 80%;
42
- margin: 0 auto;
43
- display: flex;
44
- .summary-about-me {
45
- width: 50%;
46
- text-align: right;
47
- padding-right: 20px;
48
- }
49
- .nav-link {
50
- ul {
51
- padding-inline-start: 0px;
52
- }
53
- li {
54
- display: block;
55
- text-align: left;
56
- a {
57
- text-decoration : none;
58
- color: #222;
59
- &:hover {
60
- border-bottom: 2px solid black;
61
- color: #333;
62
- }
63
- }
64
- }
65
-
66
- border-left: 2px solid black;
67
- width: 50%;
68
- padding-left: 20px;
69
- // .toNav {
70
- // }
71
- @include mediaQuery(phone-width) {
72
- li {
73
- display: block;
74
- margin-left: 10px;
75
- }
76
- }
77
- }
78
- @include mediaQuery(phone-width) {
79
- width: 60%;
80
- min-width: 270px;
81
- }
35
+ width: 100%;
36
+ span {
37
+ display: none;
82
38
  }
83
39
  }
84
- .mid-section-cover {
40
+ h1 {
41
+ font-size: 3.5rem;
42
+ font-weight: 600;
43
+ }
44
+
45
+ }
46
+ .sub-heading {
47
+ width: 80%;
48
+ margin: 0 auto;
49
+ display: flex;
50
+
51
+ @include mediaQuery(phone-width) {
85
52
  width: 60%;
86
- margin: 0 auto;
87
- margin-top: 50px;
53
+ min-width: 270px;
54
+ }
55
+ }
56
+ .summary-about-me {
57
+ width: 50%;
58
+ text-align: right;
59
+ padding-right: 20px;
60
+ }
61
+ .nav-link {
62
+ ul {
63
+ padding-inline-start: 0;
64
+ }
65
+ li {
66
+ display: block;
67
+ text-align: left;
68
+ a {
69
+ text-decoration : none;
70
+ color: var(--primary-text-color);
71
+ &:hover {
72
+ border-bottom: 2px solid var(--primary-text-color);
73
+ color: var(--primary-text-color);
88
74
 
89
- nav {
90
- display: flex;
91
- flex-direction: row;
92
- justify-content: space-between;
93
- align-items: stretch;
94
- flex-wrap: wrap;
95
- border-bottom: 2px solid #222;
96
- * {
97
- margin: 10px 10px;
98
75
  }
76
+ }
77
+ }
78
+ border-left: 2px solid var(--primary-text-color);
79
+ width: 50%;
80
+ padding-left: 20px;
81
+ // .toNav {
82
+ // }
83
+ @include mediaQuery(phone-width) {
84
+ li {
85
+ display: block;
86
+ margin-left: 10px;
87
+ }
88
+ }
89
+ }
90
+ .mid-section-cover {
91
+ width: 60%;
92
+ margin: 0 auto;
93
+ margin-top: 50px;
99
94
 
100
- h1 {
101
- // align-self: flex-start;
102
- font-size: 40px;
103
- }
104
- ul {
105
- flex-shrink: 1;
106
- padding: 0px 10px;
107
- li {
108
- padding: 0px 10px;
109
- display: inline-block;
110
- a {
111
- text-decoration : none;
112
- color: #222;
113
- &:hover {
114
- border-bottom: 2px solid black;
115
- color: #333;
116
- }
117
- }
118
- @include mediaQuery(phone-width) {
119
- text-align: center;
120
- padding: 0px 10px;
121
- }
95
+ @include mediaQuery(tablet-width) {
96
+ width: 70%;
97
+ }
98
+ @include mediaQuery(phone-width) {
99
+ width: 95%;
100
+ }
101
+ }
102
+ nav {
103
+ display: flex;
104
+ flex-direction: row;
105
+ justify-content: space-between;
106
+ align-items: stretch;
107
+ flex-wrap: wrap;
108
+ border-bottom: 2px solid var(--primary-text-color);
109
+ * {
110
+ margin: 10px;
111
+ }
112
+ h1 {
113
+ // align-self: flex-start;
114
+ font-size: 40px;
115
+ }
116
+ ul {
117
+ flex-shrink: 1;
118
+ padding: 0 10px;
119
+ li {
120
+ padding: 0 10px;
121
+ display: inline-block;
122
+ a {
123
+ text-decoration : none;
124
+ color: var(--primary-text-color);
125
+ &:hover {
126
+ border-bottom: 2px solid var(--primary-text-color);
127
+ color: var(--primary-text-color);
122
128
  }
123
129
  }
124
130
  @include mediaQuery(phone-width) {
125
- flex-direction: column;
126
- justify-content: center;
127
131
  text-align: center;
128
- * {
129
- flex-basis: 100%;
130
- }
131
- }
132
- }
133
-
134
- .sub-mid-section-cover {
135
- width: 90%;
136
- margin: 0 auto;
137
-
138
- * {
139
- max-width: 100%;
140
- overflow-x: scroll;
141
- }
142
- a {
143
- color: black;
144
- }
145
- .blog-section-list {
146
- a {
147
- color: black;
148
- }
132
+ padding: 0 10px;
149
133
  }
150
134
  }
151
- @include mediaQuery(tablet-width) {
152
- width: 70%;
153
- }
154
- @include mediaQuery(phone-width) {
155
- width: 95%;
135
+ }
136
+ @include mediaQuery(phone-width) {
137
+ flex-direction: column;
138
+ justify-content: center;
139
+ text-align: center;
140
+ * {
141
+ flex-basis: 100%;
156
142
  }
157
143
  }
158
- // .page_trail {
159
- // text-align: right;
160
- // font-size: 30px;
161
- // ul {
162
- // li {
163
- // display: inline-block;
164
- // padding: 2px;
165
- // a {
166
- // text-decoration: none;
167
- // color: #222;
168
- // &:hover {
169
- // color: #222;
170
- // border-bottom: 1px solid black;
171
- // }
172
- // }
173
- // }
174
- // .selected {
175
- // a {
176
- // color: #222;
177
- // border-bottom: 1px solid black;
178
- // }
144
+ }
145
+ .sub-mid-section-cover {
146
+ width: 90%;
147
+ margin: 0 auto;
179
148
 
180
- // }
181
- // }
182
- // }
183
-
184
- .container-404 {
185
- text-align: center;
149
+ * {
150
+ max-width: 100%;
151
+ overflow-x: scroll;
186
152
  }
153
+ a {
154
+ color: var(--primary-text-color);
155
+ }
156
+ }
157
+ .blog-section-list {
158
+ a {
159
+ color: var(--primary-text-color);
160
+ }
161
+ }
162
+ .container-404 {
163
+ text-align: center;
164
+ }
165
+
166
+ #themeSelector {
167
+ position: fixed;
168
+ top: 5px;
169
+ right: 5px;
187
170
  }
@@ -0,0 +1,26 @@
1
+ function onLoad() {
2
+ var themeSelector = document.getElementById('themeSelector');
3
+ console.log('inside on load method');
4
+ for (var themeName in themeMap) {
5
+ console.log('inside loop' + ' ' + themeName);
6
+ var opt = document.createElement('option');
7
+ opt.value = themeName;
8
+ opt.innerHTML = capitalizeFirstLetter(themeName);
9
+ themeSelector.appendChild(opt);
10
+ }
11
+ }
12
+
13
+ function toggleTheme() {
14
+ var themeName = themeSelector.value;
15
+ var element = document.getElementsByTagName('html')[0];
16
+ changeTheme(element, themeMap[themeName]);
17
+ }
18
+
19
+ function changeTheme(element, theme) {
20
+ element.style.setProperty("--primary-background-color", theme['background-color']);
21
+ element.style.setProperty("--primary-text-color", theme['text-color']);
22
+ }
23
+
24
+ function capitalizeFirstLetter(string) {
25
+ return string.charAt(0).toUpperCase() + string.slice(1);
26
+ }
@@ -0,0 +1,10 @@
1
+ const themeMap = {
2
+ 'default': {
3
+ 'background-color': 'white',
4
+ 'text-color': '#222'
5
+ },
6
+ 'dark': {
7
+ 'background-color': '#222',
8
+ 'text-color': 'white'
9
+ }
10
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev-portfolio-blog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rohit Jain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-19 00:00:00.000000000 Z
11
+ date: 2020-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -28,72 +28,86 @@ dependencies:
28
28
  name: jekyll-seo-tag
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 2.6.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 2.6.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: jekyll-feed
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: 0.13.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: 0.13.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: jekyll-sitemap
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: 1.4.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: 1.4.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: jekyll-paginate-v2
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: 1.9.4
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 1.9.4
83
+ - !ruby/object:Gem::Dependency
84
+ name: jekyll-minifier
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 0.1.10
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
81
95
  - !ruby/object:Gem::Version
82
- version: '0'
96
+ version: 0.1.10
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: bundler
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
101
  - - "~>"
88
102
  - !ruby/object:Gem::Version
89
- version: '1.16'
103
+ version: 2.1.4
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
108
  - - "~>"
95
109
  - !ruby/object:Gem::Version
96
- version: '1.16'
110
+ version: 2.1.4
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: rake
99
113
  requirement: !ruby/object:Gem::Requirement
@@ -117,7 +131,9 @@ extra_rdoc_files: []
117
131
  files:
118
132
  - LICENSE.txt
119
133
  - README.md
134
+ - _includes/analytics.html
120
135
  - _includes/navigation.html
136
+ - _includes/themeSelector.html
121
137
  - _layouts/blog.html
122
138
  - _layouts/default.html
123
139
  - _layouts/description.html
@@ -127,6 +143,8 @@ files:
127
143
  - _layouts/post.html
128
144
  - _sass/main.scss
129
145
  - assets/css/styles.scss
146
+ - assets/js/script.js
147
+ - assets/js/theme.js
130
148
  homepage: https://github.com/rohitjain00/dev-portfolio-blog
131
149
  licenses:
132
150
  - MIT