rsg-theme 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. checksums.yaml +7 -0
  2. data/_boilerplate/404.md +25 -0
  3. data/_boilerplate/CODE_OF_CONDUCT.md +12 -0
  4. data/_boilerplate/LICENSE.md +83 -0
  5. data/_boilerplate/USAGE.md +86 -0
  6. data/_boilerplate/aio.md +13 -0
  7. data/_boilerplate/index.md +169 -0
  8. data/_includes/aio-script.md +25 -0
  9. data/_includes/all_keypoints.html +31 -0
  10. data/_includes/base_path.html +41 -0
  11. data/_includes/carpentries.html +70 -0
  12. data/_includes/custom-schedule.html +72 -0
  13. data/_includes/episode_break.html +15 -0
  14. data/_includes/episode_keypoints.html +18 -0
  15. data/_includes/episode_navbar.html +44 -0
  16. data/_includes/episode_overview.html +76 -0
  17. data/_includes/episode_title.html +9 -0
  18. data/_includes/favicons.html +27 -0
  19. data/_includes/gh_variables.html +45 -0
  20. data/_includes/github-ribbon.html +1 -0
  21. data/_includes/javascript.html +55 -0
  22. data/_includes/lesson_footer.html +52 -0
  23. data/_includes/life_cycle.html +34 -0
  24. data/_includes/links.md +46 -0
  25. data/_includes/main_title.html +14 -0
  26. data/_includes/manual_episode_order.html +116 -0
  27. data/_includes/navbar.html +113 -0
  28. data/_includes/rsg/intro.html +15 -0
  29. data/_includes/rsg/setup.html +6 -0
  30. data/_includes/rsg/who.html +40 -0
  31. data/_includes/syllabus.html +126 -0
  32. data/_includes/warning-curriculum.html +8 -0
  33. data/_includes/warning-flavor.html +7 -0
  34. data/_includes/workshop_ad.html +47 -0
  35. data/_includes/workshop_calendar.html +8 -0
  36. data/_includes/workshop_footer.html +27 -0
  37. data/_layouts/base.html +54 -0
  38. data/_layouts/break.html +10 -0
  39. data/_layouts/episode.html +11 -0
  40. data/_layouts/lesson.html +8 -0
  41. data/_layouts/page.html +7 -0
  42. data/_layouts/reference.html +6 -0
  43. data/_layouts/schedule.html +9 -0
  44. data/_layouts/workshop.html +56 -0
  45. data/assets/css/bootstrap-theme.css +587 -0
  46. data/assets/css/bootstrap-theme.css.map +1 -0
  47. data/assets/css/bootstrap.css +6834 -0
  48. data/assets/css/bootstrap.css.map +1 -0
  49. data/assets/css/fonts.css +13 -0
  50. data/assets/css/katex.min.css +1 -0
  51. data/assets/css/lesson.scss +417 -0
  52. data/assets/css/syntax.css +69 -0
  53. data/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  54. data/assets/fonts/glyphicons-halflings-regular.svg +288 -0
  55. data/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  56. data/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  57. data/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
  58. data/assets/fonts/ubuntu-v11-latin-regular.eot +0 -0
  59. data/assets/fonts/ubuntu-v11-latin-regular.svg +363 -0
  60. data/assets/fonts/ubuntu-v11-latin-regular.ttf +0 -0
  61. data/assets/fonts/ubuntu-v11-latin-regular.woff +0 -0
  62. data/assets/fonts/ubuntu-v11-latin-regular.woff2 +0 -0
  63. data/assets/js/anchor.min.js +9 -0
  64. data/assets/js/bootstrap.min.js +6 -0
  65. data/assets/js/jquery.min.js +2 -0
  66. data/assets/js/jquery.min.map +1 -0
  67. data/assets/js/katex-auto-render.min.js +1 -0
  68. data/assets/js/katex.min.js +1 -0
  69. data/assets/js/lesson.js +56 -0
  70. data/bin/boilerplate/_extras/figures.md +79 -0
  71. metadata +154 -0
@@ -0,0 +1,56 @@
1
+ // Make all tables striped by default.
2
+ $("table").addClass("table table-striped");
3
+
4
+
5
+ // Handle foldable challenges and solutions (on click and at start).
6
+ $(".solution").click(function(event) {
7
+ var trigger = $(event.target).has(".fold-unfold").length > 0
8
+ || $(event.target).filter(".fold-unfold").length > 0;
9
+ if (trigger) {
10
+ $(">*:not(h2)", this).toggle(400);
11
+ $(">h2>span.fold-unfold", this).toggleClass("glyphicon-collapse-down glyphicon-collapse-up");
12
+ event.stopPropagation();
13
+ }
14
+ });
15
+ $(".solution").each(function() {
16
+ $(">*:not(h2)", this).toggle();
17
+ var h2 = $("h2:first", this);
18
+ h2.append("<span class='fold-unfold glyphicon glyphicon-collapse-down'></span>");
19
+ });
20
+
21
+
22
+ // Handle searches.
23
+ // Relies on document having 'meta' element with name 'search-domain'.
24
+ function google_search() {
25
+ var query = document.getElementById("google-search").value;
26
+ var domain = $("meta[name=search-domain]").attr("value");
27
+ window.open("https://www.google.com/search?q=" + query + "+site:" + domain);
28
+ }
29
+
30
+ // function to shrink the life cycle bar when scrolling
31
+ $(function(){
32
+ $('#life-cycle').data('size','big');
33
+ });
34
+
35
+ $(window).scroll(function(){
36
+ if($(document).scrollTop() > 0)
37
+ {
38
+ if($('#life-cycle').data('size') == 'big')
39
+ {
40
+ $('#life-cycle').data('size','small');
41
+ $('#life-cycle').stop().animate({
42
+ padding: '5px'
43
+ },100);
44
+ }
45
+ }
46
+ else
47
+ {
48
+ if($('#life-cycle').data('size') == 'small')
49
+ {
50
+ $('#life-cycle').data('size','big');
51
+ $('#life-cycle').stop().animate({
52
+ padding: '15px'
53
+ },100);
54
+ }
55
+ }
56
+ });
@@ -0,0 +1,79 @@
1
+ ---
2
+ title: Figures
3
+ ---
4
+
5
+ {% include base_path.html %}
6
+ {% include manual_episode_order.html %}
7
+
8
+ <script>
9
+ window.onload = function() {
10
+ var lesson_episodes = [
11
+ {% for lesson_episode in lesson_episodes %}
12
+ {% if site.episode_order %}
13
+ {% assign episode = site.episodes | where: "slug", lesson_episode | first %}
14
+ {% else %}
15
+ {% assign episode = lesson_episode %}
16
+ {% endif %}
17
+ "{{ episode.url }}"{% unless forloop.last %},{% endunless %}
18
+ {% endfor %}
19
+ ];
20
+
21
+ var xmlHttp = []; /* Required since we are going to query every episode. */
22
+ for (i=0; i < lesson_episodes.length; i++) {
23
+
24
+ xmlHttp[i] = new XMLHttpRequest();
25
+ xmlHttp[i].episode = lesson_episodes[i]; /* To enable use this later. */
26
+ xmlHttp[i].onreadystatechange = function() {
27
+
28
+ if (this.readyState == 4 && this.status == 200) {
29
+ var parser = new DOMParser();
30
+ var htmlDoc = parser.parseFromString(this.responseText,"text/html");
31
+ var htmlDocArticle = htmlDoc.getElementsByTagName("article")[0];
32
+
33
+ var article_here = document.getElementById(this.episode);
34
+ var images = htmlDocArticle.getElementsByTagName("img");
35
+
36
+ if (images.length > 0) {
37
+ var h1text = htmlDocArticle.getElementsByTagName("h1")[0].innerHTML;
38
+
39
+ var htitle = document.createElement('h2');
40
+ htitle.innerHTML = h1text;
41
+ article_here.appendChild(htitle);
42
+
43
+ var image_num = 0;
44
+ for (let image of images) {
45
+ image_num++;
46
+
47
+ var title = document.createElement('p');
48
+ title.innerHTML = "<strong>Figure " + image_num + ".</strong> " + image.alt;
49
+ article_here.appendChild(title);
50
+
51
+ article_here.appendChild(image.cloneNode(false));
52
+
53
+ if (image_num < images.length) {
54
+ var hr = document.createElement('hr');
55
+ article_here.appendChild(hr);
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ episode_url = "{{ relative_root_path }}" + lesson_episodes[i];
62
+ xmlHttp[i].open("GET", episode_url);
63
+ xmlHttp[i].send(null);
64
+ }
65
+ }
66
+ </script>
67
+
68
+ {% comment %} Create anchor for each one of the episodes. {% endcomment %}
69
+
70
+ {% for lesson_episode in lesson_episodes %}
71
+ {% if site.episode_order %}
72
+ {% assign episode = site.episodes | where: "slug", lesson_episode | first %}
73
+ {% else %}
74
+ {% assign episode = lesson_episode %}
75
+ {% endif %}
76
+ <article id="{{ episode.url }}" class="figures"></article>
77
+ {% endfor %}
78
+
79
+ {% include links.md %}
metadata ADDED
@@ -0,0 +1,154 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rsg-theme
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Southampton Research Software Group
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-06-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: jekyll
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 3.9.2
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 3.9.2
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 2.2.10
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 2.2.10
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: 12.3.3
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 12.3.3
55
+ description:
56
+ email:
57
+ - p.j.grylls@southampton.ac.uk
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - _boilerplate/404.md
63
+ - _boilerplate/CODE_OF_CONDUCT.md
64
+ - _boilerplate/LICENSE.md
65
+ - _boilerplate/USAGE.md
66
+ - _boilerplate/aio.md
67
+ - _boilerplate/index.md
68
+ - _includes/aio-script.md
69
+ - _includes/all_keypoints.html
70
+ - _includes/base_path.html
71
+ - _includes/carpentries.html
72
+ - _includes/custom-schedule.html
73
+ - _includes/episode_break.html
74
+ - _includes/episode_keypoints.html
75
+ - _includes/episode_navbar.html
76
+ - _includes/episode_overview.html
77
+ - _includes/episode_title.html
78
+ - _includes/favicons.html
79
+ - _includes/gh_variables.html
80
+ - _includes/github-ribbon.html
81
+ - _includes/javascript.html
82
+ - _includes/lesson_footer.html
83
+ - _includes/life_cycle.html
84
+ - _includes/links.md
85
+ - _includes/main_title.html
86
+ - _includes/manual_episode_order.html
87
+ - _includes/navbar.html
88
+ - _includes/rsg/intro.html
89
+ - _includes/rsg/setup.html
90
+ - _includes/rsg/who.html
91
+ - _includes/syllabus.html
92
+ - _includes/warning-curriculum.html
93
+ - _includes/warning-flavor.html
94
+ - _includes/workshop_ad.html
95
+ - _includes/workshop_calendar.html
96
+ - _includes/workshop_footer.html
97
+ - _layouts/base.html
98
+ - _layouts/break.html
99
+ - _layouts/episode.html
100
+ - _layouts/lesson.html
101
+ - _layouts/page.html
102
+ - _layouts/reference.html
103
+ - _layouts/schedule.html
104
+ - _layouts/workshop.html
105
+ - assets/css/bootstrap-theme.css
106
+ - assets/css/bootstrap-theme.css.map
107
+ - assets/css/bootstrap.css
108
+ - assets/css/bootstrap.css.map
109
+ - assets/css/fonts.css
110
+ - assets/css/katex.min.css
111
+ - assets/css/lesson.scss
112
+ - assets/css/syntax.css
113
+ - assets/fonts/glyphicons-halflings-regular.eot
114
+ - assets/fonts/glyphicons-halflings-regular.svg
115
+ - assets/fonts/glyphicons-halflings-regular.ttf
116
+ - assets/fonts/glyphicons-halflings-regular.woff
117
+ - assets/fonts/glyphicons-halflings-regular.woff2
118
+ - assets/fonts/ubuntu-v11-latin-regular.eot
119
+ - assets/fonts/ubuntu-v11-latin-regular.svg
120
+ - assets/fonts/ubuntu-v11-latin-regular.ttf
121
+ - assets/fonts/ubuntu-v11-latin-regular.woff
122
+ - assets/fonts/ubuntu-v11-latin-regular.woff2
123
+ - assets/js/anchor.min.js
124
+ - assets/js/bootstrap.min.js
125
+ - assets/js/jquery.min.js
126
+ - assets/js/jquery.min.map
127
+ - assets/js/katex-auto-render.min.js
128
+ - assets/js/katex.min.js
129
+ - assets/js/lesson.js
130
+ - bin/boilerplate/_extras/figures.md
131
+ homepage: https://github.com/Southampton-RSG-Training/rsg-theme
132
+ licenses:
133
+ - MIT
134
+ metadata: {}
135
+ post_install_message:
136
+ rdoc_options: []
137
+ require_paths:
138
+ - lib
139
+ required_ruby_version: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - ">="
142
+ - !ruby/object:Gem::Version
143
+ version: '0'
144
+ required_rubygems_version: !ruby/object:Gem::Requirement
145
+ requirements:
146
+ - - ">="
147
+ - !ruby/object:Gem::Version
148
+ version: '0'
149
+ requirements: []
150
+ rubygems_version: 3.1.4
151
+ signing_key:
152
+ specification_version: 4
153
+ summary: A theme ready to use for The RSG lessons.
154
+ test_files: []