jekyll-theme-fica 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
  3. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  4. data/.github/workflows/ci.yaml +5 -2
  5. data/.github/workflows/ci.yaml.orig +34 -0
  6. data/404.html +12 -10
  7. data/License.md +2 -8
  8. data/README.md +53 -49
  9. data/_includes/Footer.html +88 -85
  10. data/_includes/Head.html +24 -12
  11. data/_includes/Header.html +21 -34
  12. data/_includes/assets/BTT.html +8 -0
  13. data/_includes/{Google-Analytics.html → assets/Google-Analytics.html} +12 -12
  14. data/_includes/assets/anchor-headings.html +164 -0
  15. data/_includes/assets/comments.html +16 -0
  16. data/_includes/assets/toc.html +174 -0
  17. data/_layouts/default.html +16 -14
  18. data/_layouts/home.html +25 -67
  19. data/_layouts/page.html +5 -3
  20. data/_layouts/post.html +48 -52
  21. data/_layouts/post_list.html +103 -0
  22. data/_posts/2022-03-31-To-Know-if-the-nav-works.md +9 -8
  23. data/_posts/{2022-04-1-Demo.md → 2022-04-1-Elements-of-Fica-Theme.md} +111 -113
  24. data/_posts/2022-04-5-Getting-Started.md +149 -149
  25. data/_posts/2022-04-6-Creating-a-new-post.md +144 -136
  26. data/_posts/2023-04-24-Fica-Customization.md +43 -0
  27. data/_sass/base.scss +437 -0
  28. data/_sass/{themes/dark theme/highlight.scss → colors/dark-theme/highlight.scss} +362 -362
  29. data/_sass/{themes/dark theme/theme-dark.scss → colors/dark-theme/theme-dark.scss} +132 -142
  30. data/_sass/{themes/light theme/highlight.scss → colors/light-theme/highlight.scss} +198 -198
  31. data/_sass/{themes/light theme/theme-light.scss → colors/light-theme/theme-light.scss} +126 -136
  32. data/_sass/jekyll-theme-fica.scss +1 -8
  33. data/_sass/layouts/Google-fonts.scss +103 -138
  34. data/_sass/layouts/component.scss +272 -0
  35. data/_sass/layouts/layout.scss +657 -718
  36. data/_sass/layouts/typography.scss +492 -0
  37. data/_sass/layouts/variable.scss +215 -0
  38. data/assets/css/Style.scss +4 -13
  39. data/assets/favicons/android-chrome-192x192.png +0 -0
  40. data/assets/favicons/android-chrome-512x512.png +0 -0
  41. data/assets/favicons/apple-touch-icon.png +0 -0
  42. data/assets/favicons/browserconfig.xml +9 -0
  43. data/assets/favicons/favicon-16x16.png +0 -0
  44. data/assets/favicons/favicon-32x32.png +0 -0
  45. data/assets/favicons/favicon.ico +0 -0
  46. data/assets/favicons/mstile-150x150.png +0 -0
  47. data/assets/favicons/safari-pinned-tab.svg +32 -0
  48. data/assets/favicons/site.webmanifest +19 -0
  49. data/assets/img/homepage-pic.png +0 -0
  50. data/bin/run +195 -150
  51. data/js/Main.js +74 -0
  52. data/js/back-to-top.js +39 -48
  53. data/logo.png +0 -0
  54. data/post/index.html +3 -3
  55. metadata +35 -32
  56. data/_includes/BTT.html +0 -7
  57. data/_layouts/post_home.html +0 -113
  58. data/_sass/custom/styles.scss +0 -1
  59. data/_sass/custom/variables.scss +0 -1
  60. data/_sass/layouts/base.scss +0 -579
  61. data/_sass/layouts/variables.scss +0 -230
  62. data/docs/contributing.md +0 -69
@@ -1,13 +1,4 @@
1
- ---
2
- ---
3
-
4
- @import "jekyll-theme-fica";
5
-
6
-
7
- .site-title::before {
8
- content: url("{{site.baseurl}}/logo.png");
9
- display: inline-block;
10
- position: relative;
11
- width: 37px;
12
- top: 7px;
13
- }
1
+ ---
2
+ ---
3
+
4
+ @import "jekyll-theme-fica";
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <browserconfig>
3
+ <msapplication>
4
+ <tile>
5
+ <square150x150logo src="/mstile-150x150.png"/>
6
+ <TileColor>#2b5797</TileColor>
7
+ </tile>
8
+ </msapplication>
9
+ </browserconfig>
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,32 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
+ <svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5
+ width="1850.000000pt" height="1850.000000pt" viewBox="0 0 1850.000000 1850.000000"
6
+ preserveAspectRatio="xMidYMid meet">
7
+ <metadata>
8
+ Created by potrace 1.14, written by Peter Selinger 2001-2017
9
+ </metadata>
10
+ <g transform="translate(0.000000,1850.000000) scale(0.100000,-0.100000)"
11
+ fill="#000000" stroke="none">
12
+ <path d="M3815 17653 c-611 -51 -1126 -224 -1595 -536 -750 -498 -1251 -1251
13
+ -1420 -2132 -50 -264 -52 -306 -57 -1090 l-4 -740 47 45 c133 127 4519 4445
14
+ 4522 4452 3 7 -1405 9 -1493 1z"/>
15
+ <path d="M6073 15683 c-1105 -1088 -2757 -2714 -3671 -3613 l-1662 -1635 3
16
+ -3415 c3 -3125 4 -3425 20 -3536 77 -559 254 -1032 547 -1464 448 -658 1119
17
+ -1132 1883 -1330 84 -22 194 -47 245 -56 l94 -17 51 50 c62 60 6500 6393 7972
18
+ 7842 566 558 1057 1034 1090 1059 88 66 222 128 330 153 80 18 115 21 227 17
19
+ 115 -4 146 -9 228 -36 89 -30 195 -84 258 -132 62 -48 177 -170 218 -232 214
20
+ -320 240 -734 68 -1083 -24 -49 -67 -121 -96 -159 -30 -40 -1370 -1366 -3167
21
+ -3135 -4048 -3983 -4435 -4364 -4439 -4373 -2 -5 659 -8 1468 -8 l1472 0 283
22
+ 277 c155 153 2011 1979 4124 4058 l3841 3780 -3 2960 c-4 3105 -2 2997 -48
23
+ 3270 -223 1328 -1252 2396 -2569 2665 -230 47 -381 62 -626 64 l-221 1 -924
24
+ -910 c-508 -501 -2335 -2299 -4059 -3995 -1724 -1696 -3247 -3195 -3385 -3330
25
+ -245 -241 -314 -299 -425 -355 -349 -176 -762 -98 -1034 196 -328 353 -364
26
+ 915 -86 1330 55 81 -188 -159 3768 3733 1860 1830 3382 3330 3382 3332 0 2
27
+ -708 4 -1574 4 l-1574 0 -2009 -1977z"/>
28
+ <path d="M15890 4235 c-861 -847 -2044 -2012 -2630 -2589 -586 -576 -1066
29
+ -1052 -1068 -1057 -5 -13 2069 -12 2223 1 962 80 1807 542 2378 1298 328 435
30
+ 545 951 626 1492 36 240 42 458 39 1450 l-3 945 -1565 -1540z"/>
31
+ </g>
32
+ </svg>
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "Fica Theme",
3
+ "short_name": "Fica Theme",
4
+ "icons": [
5
+ {
6
+ "src": "/android-chrome-192x192.png",
7
+ "sizes": "192x192",
8
+ "type": "image/png"
9
+ },
10
+ {
11
+ "src": "/android-chrome-512x512.png",
12
+ "sizes": "512x512",
13
+ "type": "image/png"
14
+ }
15
+ ],
16
+ "theme_color": "#ffffff",
17
+ "background_color": "#ffffff",
18
+ "display": "standalone"
19
+ }
Binary file
data/bin/run CHANGED
@@ -1,150 +1,195 @@
1
- #!/usr/bin/env bash
2
-
3
- #
4
- # Name of the theme
5
- #
6
- THEME="jekyll-theme-fica"
7
-
8
- #
9
- # the name of the script
10
- #
11
- SCRIPT="bin/"$( basename "$0" )
12
-
13
- #
14
- # Current version
15
- #
16
- VERSION="0.2.0"
17
-
18
- #
19
- # Colors
20
- RED='\033[0;31m'
21
- YELLOW='\033[0;33m'
22
- CYAN='\033[0;36m'
23
- NC='\033[0m' # No Color
24
-
25
- #
26
- # help option
27
- #
28
- function usage
29
- {
30
- echo -e "$CYAN$THEME$NC the modern theme with minimal look"
31
- echo -e ""
32
- echo -e "Usage:"
33
- echo -e "$SCRIPT $CYAN[subcommand]$NC"
34
- echo -e ""
35
- echo -e ""
36
- echo -e "Subcommand:"
37
- echo -e " $YELLOW upgrade, u $NC Upgrades $TEME to the latest version"
38
- echo -e " $YELLOW help, h $NC displays all the subcommand available and how to use it"
39
- echo -e " $YELLOW version, v $NC show the version of the theme"
40
- echo -e " $YELLOW server, s $NC Runs the server locally"
41
- echo -e " $YELLOW insdep, idp $NC Installs all the dependencies"
42
- echo -e " $YELLOW chktheme, ckte $NC Checks the theme for errors"
43
- }
44
-
45
- #
46
- # Upgrade the theme to the latest version
47
- #
48
- function Upgrade
49
- {
50
- echo "Upgrading $THEME to $VERSION"
51
- sed -i "s/gem 'jekyll-theme-fica', '~> 0.1.9'/gem 'jekyll-theme-fica', '~> 2.0.0'/gi" ./Gemfile
52
- echo "Upgrade Complete!"
53
- }
54
-
55
- #
56
- # Runing the server locally
57
- #
58
- function server
59
- {
60
- echo "Starting Server....."
61
- bundle exec jekyll serve
62
- }
63
-
64
- #
65
- # Installs all dependencies
66
- #
67
- function install_dependencies
68
- {
69
- echo "Installing Dependencies of $THEME"
70
- gem install bundler
71
- bundle install
72
- }
73
-
74
- function error
75
- {
76
- printf "${RED}Subcommand not recognized.${NC}"
77
- echo ""
78
- usage
79
- }
80
-
81
- function version
82
- {
83
- printf "$CYAN$THEME$NC v$VERSION"
84
- }
85
-
86
- #
87
- # Theme check
88
- #
89
- function chktheme
90
- {
91
- printf "Running ${YELLOW}jekyll doctor ${NC}"
92
- echo ""
93
- jekyll doctor
94
- echo ""
95
- printf "Running ${YELLOW}jekyll build ${NC}"
96
- echo ""
97
- jekyll build
98
- }
99
-
100
- #
101
- # Process subcommands
102
- #
103
- while (( $# ))
104
- do
105
- case "$1" in
106
-
107
-
108
- Upgrade | u)
109
- Upgrade
110
- install_dependencies
111
- exit 0
112
- ;;
113
-
114
- insdep | idp)
115
- install_dependencies
116
- exit 0
117
- ;;
118
-
119
- server | s)
120
- server
121
- exit 0
122
- ;;
123
-
124
- help | h)
125
- usage
126
- exit 0
127
- ;;
128
-
129
- version | v)
130
- version
131
- exit 0
132
- ;;
133
-
134
- chktheme | ckte)
135
- chktheme
136
- exit 0
137
- ;;
138
-
139
-
140
- *)
141
- error
142
- exit 1
143
- ;;
144
-
145
- esac
146
- done
147
-
148
- printf "${RED}A subcommand is required.${NC}"
149
- echo ""
150
- usage
1
+ #!/usr/bin/env bash
2
+
3
+ #
4
+ # Name of the theme
5
+ #
6
+ THEME="jekyll-theme-fica"
7
+
8
+ #
9
+ # the name of the script
10
+ #
11
+ SCRIPT="bin/"$( basename "$0" )
12
+
13
+ #
14
+ # Current version
15
+ #
16
+ VERSION="0.2.2"
17
+
18
+ #
19
+ # Colors
20
+ #
21
+ RED='\033[0;31m'
22
+ YELLOW='\033[0;33m'
23
+ CYAN='\033[0;36m'
24
+ NC='\033[0m' # No Color
25
+
26
+ #
27
+ # help option
28
+ #
29
+ function usage
30
+ {
31
+ echo -e "$CYAN$THEME$NC the modern theme with minimal look"
32
+ echo -e ""
33
+ echo -e "Usage:"
34
+ echo -e "$SCRIPT $CYAN[subcommand]$NC"
35
+ echo -e ""
36
+ echo -e ""
37
+ echo -e "Subcommand:"
38
+ echo -e " $YELLOW upgrade, u $NC Upgrades $TEME to the latest version"
39
+ echo -e " $YELLOW help, h $NC displays all the subcommand available and how to use it"
40
+ echo -e " $YELLOW version, v $NC show the version of the theme"
41
+ echo -e " $YELLOW server, s $NC Runs the server locally"
42
+ echo -e " $YELLOW insdep, ip $NC Installs all the dependencies"
43
+ echo -e " $YELLOW chktheme, ct $NC Checks the theme for errors"
44
+ echo -e " $YELLOW bldgem, bm $NC builds the theme and uploads it to RubyGems"
45
+ }
46
+
47
+ #
48
+ # Upgrade the theme to the latest version
49
+ #
50
+ function Upgrade
51
+ {
52
+ echo "Upgrading $THEME to $VERSION"
53
+ sed -i "s/gem 'jekyll-theme-fica', '~> 0.1.9'/gem 'jekyll-theme-fica', '~> 2.2.0'/gi" ./Gemfile
54
+ echo "Upgrade Complete!"
55
+ # insdep
56
+ }
57
+
58
+ #
59
+ # Runing the server locally
60
+ #
61
+ function server
62
+ {
63
+ echo "Starting Server....."
64
+ bundle exec jekyll serve
65
+ }
66
+
67
+ #
68
+ # Installs all dependencies
69
+ #
70
+ function install_dependencies
71
+ {
72
+ echo "Installing Dependencies of $THEME"
73
+ gem install bundler
74
+ bundle install
75
+ }
76
+
77
+ function error
78
+ {
79
+ printf "${RED}Subcommand not recognized.${NC}"
80
+ echo ""
81
+ usage
82
+ }
83
+
84
+ function version
85
+ {
86
+ printf "$CYAN$THEME$NC v$VERSION"
87
+ }
88
+
89
+ #
90
+ # Theme check
91
+ #
92
+ function chktheme
93
+ {
94
+ echo ""
95
+ printf "Running ${YELLOW}Bundle ${NC}"
96
+ echo ""
97
+ bundle clean --force
98
+ install_dependencies
99
+ echo ""
100
+ printf "Running ${YELLOW}jekyll doctor ${NC}"
101
+ echo ""
102
+ jekyll doctor
103
+ echo ""
104
+ printf "Running ${YELLOW}jekyll build ${NC}"
105
+ echo ""
106
+ jekyll build
107
+ }
108
+
109
+ #
110
+ # gem build and upload
111
+ #
112
+ function gm_bld
113
+ {
114
+ echo Building gemspec.....
115
+ gem build jekyll-theme-fica.gemspec
116
+ echo Build complete
117
+
118
+ while true; do
119
+
120
+ read -p "Do you need to upload the the gem to RubyGem.org ? (y/n) " yn
121
+
122
+ case $yn in
123
+ [yY] ) echo ok, we will proceed;
124
+ echo upload Gem file
125
+ read gm_uld
126
+ gem push $gm_uld
127
+ exit;;
128
+ [nN] ) echo exiting...;
129
+ exit;;
130
+ * ) echo invalid response;
131
+ esac
132
+
133
+
134
+ done
135
+ }
136
+
137
+ #
138
+ # Process subcommands
139
+ #
140
+
141
+ while (( $# ))
142
+ do
143
+ case "$1" in
144
+
145
+
146
+ bldgem | bm)
147
+ gm_bld
148
+ exit 0
149
+ ;;
150
+
151
+ Upgrade | u)
152
+ Upgrade
153
+ install_dependencies
154
+ exit 0
155
+ ;;
156
+
157
+ insdep | ip)
158
+ install_dependencies
159
+ exit 0
160
+ ;;
161
+
162
+ server | s)
163
+ server
164
+ exit 0
165
+ ;;
166
+
167
+ help | h)
168
+ usage
169
+ exit 0
170
+ ;;
171
+
172
+ version | v)
173
+ version
174
+ exit 0
175
+ ;;
176
+
177
+ chktheme | ct)
178
+ chktheme
179
+ exit 0
180
+ ;;
181
+
182
+
183
+ *)
184
+ error
185
+ exit 1
186
+ ;;
187
+
188
+ esac
189
+ done
190
+
191
+
192
+
193
+ printf "${RED}A subcommand is required.${NC}"
194
+ echo ""
195
+ usage
data/js/Main.js ADDED
@@ -0,0 +1,74 @@
1
+ const nav = document.getElementById("site-nav")
2
+ const navcheck = document.getElementById("site-nav-check")
3
+ const screenWidth = window.innerWidth;
4
+ const headers= document.getElementsByTagName('h1', "h2", "h3", "h4", "h5")
5
+ window.addEventListener("resize", function () {
6
+ if (window.innerWidth !== screenWidth) {
7
+ // Do something
8
+ if (screenWidth < 1993) {
9
+ document.getElementById("banner-content").style.transform = "translateX(0)";
10
+ }
11
+ }
12
+ }
13
+ );
14
+ navcheck.addEventListener('click', () => {
15
+ if (navcheck.checked) {
16
+ nav.style.position = "fixed";
17
+ document.documentElement.style.overflow = "hidden";
18
+ } else {
19
+ nav.style.position = "static";
20
+ document.documentElement.style.overflow = "auto";
21
+ }
22
+ });
23
+ // window.onscroll = function() {NavBar()};
24
+
25
+ // var navbar = document.getElementById("nav");
26
+ // var navbaroffset = navbar.offsetTop;
27
+
28
+ // function NavBar() {
29
+ // if (window.pageYOffset >= 30) {
30
+ // navbar.classList.add("sticky")
31
+ // } else {
32
+ // navbar.classList.remove("sticky");
33
+ // }
34
+ // }
35
+
36
+ // function scrollTo(element, to, duration) {
37
+ // if (duration <= 0) return;
38
+ // var difference = to - element.scrollTop;
39
+ // var perTick = difference / duration * 10;
40
+
41
+ // setTimeout(function() {
42
+ // element.scrollTop = element.scrollTop + perTick;
43
+ // if (element.scrollTop === to) return;
44
+ // scrollTo(element, to, duration - 10);
45
+ // }, 10);
46
+ // }
47
+ // scrollTo(document.body, headers.offsetTop, 600);
48
+ window.addEventListener("DOMContentLoaded", () => {
49
+ const observer = new IntersectionObserver((entries) => {
50
+ if (document.querySelector("#toc")) {
51
+ entries.forEach((entry) => {
52
+ const id = entry.target.getAttribute("id");
53
+ if (entry.isIntersecting === true) {
54
+ document.querySelector(`main li a[href="#${id}"]`).parentElement.classList.add("active");
55
+ document
56
+ .querySelector(`main li a[href="#${id}"]`)
57
+ .parentElement.classList.remove("decative");
58
+ } else {
59
+ document
60
+ .querySelector(`main li a[href="#${id}"]`)
61
+ .parentElement.classList.remove("active");
62
+ document
63
+ .querySelector(`main li a[href="#${id}"]`)
64
+ .parentElement.classList.add("decative");
65
+ }
66
+ });
67
+ }
68
+ });
69
+
70
+ // Track all sections that have an `id` applied
71
+ document.querySelectorAll("h1[id], h2[id], h3[id]").forEach((h1, h2, h3) => {
72
+ observer.observe(h1, h2, h3);
73
+ });
74
+ });
data/js/back-to-top.js CHANGED
@@ -1,48 +1,39 @@
1
- const BackToTop = document.querySelector("#back-to-top");
2
-
3
- window.addEventListener("scroll", scrollFunction);
4
-
5
- function scrollFunction() {
6
- if (window.pageYOffset > 200) { // Show BackToTop
7
- if(!BackToTop.classList.contains("BTT-Entrance")) {
8
- BackToTop.classList.remove("BTT-Exit");
9
- BackToTop.classList.add("BTT-Entrance");
10
- BackToTop.style.display = "block";
11
- }
12
- }
13
- else { // Hide BackToTop
14
- if(BackToTop.classList.contains("BTT-Entrance")) {
15
- BackToTop.classList.remove("BTT-Entrance");
16
- BackToTop.classList.add("BTT-Exit");
17
- setTimeout(function() {
18
- BackToTop.style.display = "none";
19
- }, 250);
20
- }
21
- }
22
- }
23
-
24
- BackToTop.addEventListener("click", smoothScrollBackToTop);
25
-
26
- function smoothScrollBackToTop() {
27
- const targetPosition = 0;
28
- const startPosition = window.pageYOffset;
29
- const distance = targetPosition - startPosition;
30
- const duration = 750;
31
- let start = null;
32
-
33
- window.requestAnimationFrame(step);
34
-
35
- function step(timestamp) {
36
- if (!start) start = timestamp;
37
- const progress = timestamp - start;
38
- window.scrollTo(0, easeInOutCubic(progress, startPosition, distance, duration));
39
- if (progress < duration) window.requestAnimationFrame(step);
40
- }
41
- }
42
-
43
- function easeInOutCubic(t, b, c, d) {
44
- t /= d/2;
45
- if (t < 1) return c/2*t*t*t + b;
46
- t -= 2;
47
- return c/2*(t*t*t + 2) + b;
48
- };
1
+ const BackToTop = document.querySelector("#back-to-top");
2
+
3
+ window.addEventListener("scroll", scrollFunction);
4
+
5
+ function scrollFunction() {
6
+ if (window.pageYOffset > 200) {
7
+ // Show BackToTop
8
+ if (!BackToTop.classList.contains("BTT-Entrance")) {
9
+ BackToTop.classList.remove("BTT-Exit");
10
+ BackToTop.classList.add("BTT-Entrance");
11
+ BackToTop.style.display = "block";
12
+ }
13
+ } else {
14
+ // Hide BackToTop
15
+ if (BackToTop.classList.contains("BTT-Entrance")) {
16
+ BackToTop.classList.remove("BTT-Entrance");
17
+ BackToTop.classList.add("BTT-Exit");
18
+ setTimeout(function () {
19
+ BackToTop.style.display = "none";
20
+ }, 250);
21
+ }
22
+ }
23
+ }
24
+
25
+ BackToTop.addEventListener("click", smoothScrollBackToTop);
26
+
27
+ function smoothScrollBackToTop() {
28
+ window.scrollTo(
29
+ 0,
30
+ 0
31
+ );
32
+ }
33
+
34
+ function easeInOutCubic(t, b, c, d) {
35
+ t /= d / 2;
36
+ if (t < 1) return (c / 2) * t * t * t + b;
37
+ t -= 2;
38
+ return (c / 2) * (t * t * t + 2) + b;
39
+ }
data/logo.png CHANGED
Binary file
data/post/index.html CHANGED
@@ -1,4 +1,4 @@
1
- ---
2
- layout: post_home
3
- site-title: Posts
1
+ ---
2
+ layout: post_list
3
+ site-title: Posts
4
4
  ---