sanskrit-documentation-theme 0.1.6 → 0.1.7

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: 431c4689b8562aa215660657cc675035d3ef922efa97e6ef8a504c4a3259fd58
4
- data.tar.gz: f3339268b4312e1dacb15f53f234ded6f6c427f996054d35dc7bbe1608aae907
3
+ metadata.gz: dcac7ab015342989af1e71b2310b617ddf442848035412365757ecd83f2b9d93
4
+ data.tar.gz: f78594160152c56abbe240ad79697ddc4a1d5e8979117a52feb03621929faceb
5
5
  SHA512:
6
- metadata.gz: 803063ca75c5c5be32e03b960313022a97243103c358237a401b7e324f51d509f59408e96ebc90d9b9e9e7ccf5c19594b696097ec58c214911a5d245bd2a5314
7
- data.tar.gz: 6803d288e32c076cecdbeb6009802a30ef0bdd9ddc94f2d39350b1a5cf0d6e16b5f85c4f27568da4d2fccf1525f55b4ec7d67db5091c94467cec5dd68966b8ca
6
+ metadata.gz: c5113bc9a0afc9cf9e502a98d0891270a4c96c25ee26d44fef0613e436e01d5cd3b2af01e691bcab3e31d3b576d658ed16f3b61392b3b70f2b9dc1e6047078c7
7
+ data.tar.gz: f16ee5d92fa5a07a6146ac574f078d98517c03d509fcc4f6976387dccdc64fd62a53379829a958c0b9c1a37f0890302c36df2ed8fb2420f52145865de547b7a1
data/README.md CHANGED
@@ -10,8 +10,9 @@ This is the "Sanskrit" collaborative documentation theme for use with the Jekyll
10
10
  Some notable things you get with this theme (in decreasing order of interest):
11
11
  - A collapsible "accordion" sidebar
12
12
  - A collapsible "accordion" table-of-contents for each page.
13
- - A layout which automatically
13
+ - A layout which automatically adjusts to the user's screen size.
14
14
  - An "Edit me" link on top of each page.
15
+ - Basic ability to include contents from another page using the same theme within anoher.
15
16
  - Search engine optimization and webmaster stuff - which you would use with various search engines.
16
17
  - Google custom search configuration
17
18
  - Disqus for comments.
@@ -19,6 +20,10 @@ Some notable things you get with this theme (in decreasing order of interest):
19
20
  - Special formatting consideration for fonts which need to be displayed bigger (eg: Devanagari for sanskrit.)
20
21
  - the usual Jekyll blog.
21
22
  - Post tag support
23
+ - Portability
24
+ - We try to minimize the use of liquid templating language in favor of accomplishing stuff (menus, tables of contents, page inclusions) with javascript. This makes it a bit easier to move to another static website generator like hugo in the future.
25
+ - Lower build time.
26
+ - Since we prefer using javascript to jekyll liquid magic, our build times can be an order of magnitude smaller (7 sec instead of 93 sec in one case).
22
27
 
23
28
  ### Screenshots and examples
24
29
  - See this test site: <https://sanskrit-coders.github.io/sanskrit-documentation-theme/>!
@@ -45,7 +50,7 @@ Steps:
45
50
  ### Search / webmaster tips
46
51
  - sitemap.xml can be explicitly submitted to various search engines.
47
52
 
48
- ###‌ Pick up theme updates
53
+ ### Pick up theme updates
49
54
  If you are using the `remote-theme` method described above, github might not automatically pick up changes made to the theme and regenerate your site. To force github to regenerate your site, a tip from [here](https://github.com/benbalter/jekyll-remote-theme/issues/16):
50
55
  `git commit --allow-empty -m "Force rebuild of site"; git push`
51
56
 
data/_includes/head.html CHANGED
@@ -5,6 +5,7 @@
5
5
  <meta name="keywords" content="{{page.tags}}{% if page.tags %}, {% endif %} {{page.keywords}}">
6
6
  <title>{{ page.title }} | {{ site.site_title }}</title>
7
7
 
8
+ <!--bootstrap is used to set auto-adjusting (sidebar+content) grid column widths.-->
8
9
  <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
9
10
  <link rel="stylesheet" href="{{site.baseurl | append: "/assets/css/modern-business.css"}}">
10
11
  <!-- Latest compiled and minified CSS -->
@@ -13,23 +14,26 @@
13
14
  <link rel="stylesheet" href="{{site.baseurl | append: "/assets/css/element-styles-general.css"}}">
14
15
  <link rel="stylesheet" href="{{site.baseurl | append: "/assets/css/class-styles-general.css"}}">
15
16
  <link rel="stylesheet" href="{{site.baseurl | append: "/assets/css/device-specific.css"}}">
17
+ <link rel="stylesheet" href="{{site.baseurl | append: "/assets/css/topnav.css"}}">
16
18
  <link rel="stylesheet" href="{{site.baseurl | append: "/assets/css/navbar-toc.css"}}">
19
+ <link rel="stylesheet" href="{{site.baseurl | append: "/assets/css/embeds.css"}}">
17
20
  <link rel="stylesheet" href="{{site.baseurl | append: "/assets/css/boxshadowproperties.css"}}">
18
- <!-- most color styles are extracted out to here -->
19
- <link rel="stylesheet" href="{{site.baseurl | append: "/assets/css/theme-blue.css"}}">
20
21
 
21
- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
22
-
23
- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
24
- <script src="{{ site.baseurl | append: "/assets/js/jquery.navgoco.min.js" }}"></script>
25
-
26
-
27
- <!-- Latest compiled and minified JavaScript -->
22
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
23
+ <!-- Latest compiled and minified JavaScript. Note that this requires jquery. -->
28
24
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
29
25
  <!-- Anchor.js -->
30
26
  <script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/2.0.0/anchor.min.js"></script>
31
- <script src="{{ site.baseurl | append: "/assets/js/toc.js" }}"></script>
32
- <script src="{{ site.baseurl | append: "/assets/js/customscripts.js" }}"></script>
27
+
28
+ {% include jekyll_vars_to_js.html %}
29
+
30
+ <script src="{{site.baseurl | append: "/assets/js/navgoco.js"}}"></script>
31
+ <script src="{{ site.baseurl | append: "/assets/js/on_doc_ready/sidebar.js" }}"></script>
32
+ <script src="{{ site.baseurl | append: "/assets/js/on_doc_ready/toc.js" }}"></script>
33
+ <script src="{{ site.baseurl | append: "/assets/js/on_doc_ready/handle_includes.js" }}"></script>
34
+ <script src="{{ site.baseurl | append: "/assets/js/on_doc_ready/main.js" }}"></script>
35
+ <script src="{{ site.baseurl | append: "/assets/js/on_doc_ready/video_embed.js" }}"></script>
36
+ <script src="{{ site.baseurl | append: "/assets/js/on_doc_ready/audio_embed.js" }}"></script>
33
37
 
34
38
  <link rel="shortcut icon" href="{{ site.baseurl | append: "/assets/images/favicon.ico" }}">
35
39
 
@@ -0,0 +1,27 @@
1
+ <!--Load some jekyll variables and data for use in javascript-->
2
+ <script>
3
+ var siteData = {{site.data | jsonify}};
4
+ var siteBaseurl = "{{site.baseurl}}";
5
+ // console.debug(siteData);
6
+
7
+ var pageUrlToTitle = {};
8
+ {% for site_page in site.pages %}
9
+ pageUrlToTitle["{{site_page.url}}"] = "{{site_page.title}}";
10
+ {%endfor%};
11
+
12
+ // For directory listing:
13
+ var pageDirectoryToUrl = {};
14
+ for (var pageUrl in pageUrlToTitle) {
15
+ if(pageUrlToTitle.hasOwnProperty(pageUrl)) {
16
+ var dirPath = pageUrl.split("/").slice(0,-1).join("/");
17
+ if (pageDirectoryToUrl.hasOwnProperty(dirPath)) {
18
+ pageDirectoryToUrl[dirPath].push(pageUrl);
19
+ } else {
20
+ pageDirectoryToUrl[dirPath] = [pageUrl];
21
+ }
22
+ }
23
+ }
24
+
25
+ var pageSettings = {{page|jsonify}};
26
+ // console.debug(pageDirectoryToUrl);
27
+ </script>
@@ -1,16 +1,6 @@
1
- {% assign item = site.data.sidebars[page.sidebar] %}
2
-
1
+ <!-- toggle sidebar button -->
3
2
  <ul id="displayed_sidebar" class="nav">
4
- <li class="sidebarTitle">{{item.title}}</li>
5
- {% for subitem in item.contents %}
6
- {% include /functions/recursive_item_to_list.html item=subitem level=1 %}
7
- {% endfor %}
8
- {% comment %} if you aren't using the accordion, uncomment this block:
9
- <p class="external">
10
- <a href="#" id="collapseAll">Collapse All</a> | <a href="#" id="expandAll">Expand All</a>
11
- </p>
12
- {% endcomment %}
3
+ <li class="sidebarTitle"></li>
4
+ <!--fa below stands for a font awesome icon.-->
5
+ <li><a id="hide-sb-link" href="#"><i id="tg-sb-icon" class="fa fa-toggle-on"></i>Hide?</a></li>
13
6
  </ul>
14
-
15
- <!-- this highlights the active parent class in the navgoco sidebar. this is critical so that the parent expands when you're viewing a page. This must appear below the sidebar code above. Otherwise, if placed inside customscripts.js, the script runs before the sidebar code runs and the class never gets inserted.-->
16
- <script>$("li.active").parents('li').toggleClass("active");</script>
@@ -1,30 +1,20 @@
1
1
  <!-- Navigation -->
2
- <nav class="navbar navbar-inverse navbar-static-top">
2
+ <nav class="navbar">
3
3
  <div class="container topnavlinks">
4
+ <!--Heavily based on http://yago.io/Bootsketch/styleguide/components_-_navbar.html# .-->
4
5
  <div class="navbar-header">
5
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
6
- <span class="sr-only">Toggle navigation</span>
7
- <span class="icon-bar"></span>
8
- <span class="icon-bar"></span>
9
- <span class="icon-bar"></span>
10
- </button>
11
- <a class="fa fa-home fa-lg navbar-brand" href="{{"/index.html" | prepend: site.baseurl}}">&nbsp;<span class="projectTitle"> {{site.site_title}}</span></a>
6
+ <!--fa is font-awesome.-->
7
+ <a class="fa fa-home fa-lg projectTitle" href="{{"/index.html" | prepend: site.baseurl}}">&nbsp;{{site.site_title}}</a>
12
8
  </div>
13
9
  <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
14
- <ul class="nav navbar-nav navbar-right">
15
- <!-- toggle sidebar button -->
16
- <li><a id="tg-sb-link" href="#"><i id="tg-sb-icon" class="fa fa-toggle-on"></i> Nav</a></li>
17
-
10
+ <ul class="navbar-nav navbar-right">
18
11
  {% assign topnav = site.data.sidebars[page.topnav] %}
19
12
  <!-- {{topnav}} -->
20
13
  <li class="dropdown">
21
- <a href="#" class="dropdown-toggle" data-toggle="dropdown">
14
+ <a href="#" class="btn btn-default" data-toggle="dropdown">
22
15
  {{ topnav.title }}
23
16
  <b class="caret"></b></a>
24
- <ul class="dropdown-menu">
25
- {% for subitem in topnav.contents %}
26
- {% include /functions/recursive_item_to_list.html item=subitem level=1 %}
27
- {% endfor %}
17
+ <ul id="topnav_dropdown" class="dropdown-menu">
28
18
  </ul>
29
19
  </li>
30
20
  <!-- conditional logic to control which topnav appears for the audience defined in the configuration file.-->
@@ -50,7 +40,7 @@
50
40
  <!--end search-->
51
41
  </li>
52
42
  <li>
53
- <a href=" {{ site.baseurl}}/assets/google-us.html">Google us!</a>
43
+ <a class="btn btn-default" href="{{ site.baseurl}}/assets/google-us.html">Google us!</a>
54
44
  </li>
55
45
  </ul>
56
46
  </div>
@@ -2,69 +2,6 @@
2
2
  <html>
3
3
  <head>
4
4
  {% include head.html %}
5
- <script>
6
- $(document).ready(function() {
7
- // Initialize navgoco with default options
8
- $("#displayed_sidebar").navgoco({
9
- caretHtml: '',
10
- accordion: true,
11
- openClass: 'active', // open
12
- save: false, // leave false or nav highlighting doesn't work right
13
- cookie: {
14
- name: 'navgoco',
15
- expires: false,
16
- path: '/'
17
- },
18
- slide: {
19
- duration: 400,
20
- easing: 'swing'
21
- }
22
- });
23
- $("#toc_ul").navgoco({
24
- caretHtml: '',
25
- accordion: true,
26
- openClass: 'active', // open
27
- save: false, // leave false or nav highlighting doesn't work right
28
- cookie: {
29
- name: 'navgoco',
30
- expires: false,
31
- path: '/'
32
- },
33
- slide: {
34
- duration: 400,
35
- easing: 'swing'
36
- }
37
- });
38
-
39
- $("#collapseAll").click(function(e) {
40
- e.preventDefault();
41
- $("#displayed_sidebar").navgoco('toggle', false);
42
- });
43
-
44
- $("#expandAll").click(function(e) {
45
- e.preventDefault();
46
- $("#displayed_sidebar").navgoco('toggle', true);
47
- });
48
-
49
- });
50
-
51
- </script>
52
- <script>
53
- $(function () {
54
- $('[data-toggle="tooltip"]').tooltip()
55
- })
56
- </script>
57
- <script>
58
- $(document).ready(function() {
59
- $("#tg-sb-link").click(function() {
60
- $("#tg-sb-sidebar").toggle();
61
- $("#tg-sb-content").toggleClass('col-md-9');
62
- $("#tg-sb-content").toggleClass('col-md-12');
63
- $("#tg-sb-icon").toggleClass('fa-toggle-on');
64
- $("#tg-sb-icon").toggleClass('fa-toggle-off');
65
- });
66
- });
67
- </script>
68
5
  {% if page.datatable == true %}
69
6
  <!-- Include the standard DataTables bits -->
70
7
  <link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.13/css/jquery.dataTables.css">
@@ -96,11 +33,16 @@
96
33
  <div class="row">
97
34
  {% assign content_col_size = "col-md-12" %}
98
35
  {% unless page.hide_sidebar %}
99
- <!-- Sidebar Column -->
36
+ <!-- Sidebar Column.
37
+ See https://getbootstrap.com/docs/3.3/css/ for exmplanation of values such as col-md-3.
38
+ -->
100
39
  <div class="col-md-3" id="tg-sb-sidebar">
101
40
  {% include sidebar.html %}
102
41
  </div>
103
- {% assign content_col_size = "col-md-9" %}
42
+ <!--3 columns out of 12 are taken by the sidebar on large devices. Hence using 9.
43
+ Don't want minimum size so to get flowing text small screens, hence using xs.
44
+ -->
45
+ {% assign content_col_size = "col-xs-9" %}
104
46
  {% endunless %}
105
47
 
106
48
  <!-- Content Column -->
@@ -112,7 +54,7 @@
112
54
  <!-- /.container -->
113
55
  </div>
114
56
  <!-- /#main -->
115
- </div>
57
+ </div>
116
58
 
117
59
  </body>
118
60
  {% if site.google_analytics %}
data/_layouts/page.html CHANGED
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
+ <!-- toggle sidebar button -->
5
+ <a id="tg-sb-link" href="#"><i id="tg-sb-icon-content-pane" class="fa fa-toggle-on"></i>Sidebar</a>
4
6
 
5
7
  <div class="post-header">
6
8
  <h1 class="post-title-main">{{ page.title }}</h1>
@@ -37,28 +39,25 @@ layout: default
37
39
  {% endif %}
38
40
 
39
41
  {% unless page.toc == false %}
40
- {% include toc.html %}
42
+ <div id="toc_header">
43
+ <i id="toggle-toc-icon" class="fa fa-toggle-on"></i> What's in this page? <i class="fa fa-space-shuttle"></i>
44
+ <span style="font-size: smaller">Expand? <i id="toggle-toc-expansion-icon" class="fa fa-toggle-off"></i></a></span>
45
+ </div>
46
+ <div id="toc"></div>
41
47
  {% endunless %}
42
48
 
43
49
 
44
50
  {% if site.github_editme_path %}
45
51
 
46
- <a target="_blank" href="https://github.com/{{site.github_editme_path}}{{page.path}}" class="btn btn-default githubEditButton" role="button"><i class="fa fa-github fa-lg"></i> Edit me</a>
52
+ {% comment %}
53
+ btn and btn-default are bootstrap classes.
54
+ {% endcomment %}
55
+ <a target="_blank" href="https://github.com/{{site.github_editme_path}}{{page.path}}" class="btn btn-default" role="button"><i class="fa fa-github fa-lg"></i> Edit me</a>
47
56
 
48
57
  {% endif %}
49
58
 
50
59
 
51
- {% if page.format_inline_comments %}
52
- {% assign inline_comment_type1_regex = '\[\[(.+?)\]\]' %}
53
- {% assign inline_comment_type1_regex_replacement = '<div class="inline_comment">[\1]</div>' %}
54
- {% assign inline_comment_type2_regex = '\(=(.+?)\)' %}
55
- {% assign inline_comment_type2_regex_replacement = '<div class="inline_comment">(=\1)</div>' %}
56
- {% assign dummy_example = '(=कश्चित्)' %}
57
- <!--Handles stuff like: जरते (=स्तौति) स्वा॒धीः or त्रे॒धा {रूपाणि अग्नि-विद्युत्-सूर्यास्} त्र॒याणि॑-->
58
- {{content| regex_replace: inline_comment_type1_regex, inline_comment_type1_regex_replacement | regex_replace: inline_comment_type2_regex, inline_comment_type2_regex_replacement}}
59
- {% else %}
60
- {{content}}
61
- {% endif %}
60
+ {{content}}
62
61
 
63
62
  <div class="tags">
64
63
  {% if page.tags != null %}
@@ -2,15 +2,58 @@
2
2
  ---
3
3
  // The dashes above are required by jekyll.
4
4
  // This file generates a css.
5
+
5
6
  /************************************************************/
6
- /* Some boxes*/
7
+ /* Handle inline comments*/
7
8
 
8
9
  .inline_comment {
9
10
  font-size: 70%;
10
11
  color: firebrick;
11
12
  display: inline;
13
+ vertical-align: sub;
14
+ }
15
+
16
+ *[emphasis_as_inline_comments] {
17
+ em {
18
+ // Copied from inline_comments class above.
19
+ font-size: 80%;
20
+ color: firebrick;
21
+ display: inline;
22
+ vertical-align: sub;
23
+ }
24
+ }
25
+
26
+ /************************************************************/
27
+ .summary {
28
+ color: #808080;
29
+ border-left: 5px solid #ED1951;
30
+ font-size: 100%;
31
+ }
32
+
33
+ .btn-primary {
34
+ color: #ffffff;
35
+ background-color: #be8100;
36
+ border-color: #be8100;
37
+ }
38
+
39
+ .btn-primary {
40
+ &:hover, &:focus, &:active, &.active {
41
+ background-color: #248ec2;
42
+ border-color: #be8100;
43
+ }
12
44
  }
13
45
 
46
+ .printTitle {
47
+ color: #015CAE !important;
48
+ }
49
+
50
+ .anchorjs-link:hover {
51
+ color: #216f9b;
52
+ }
53
+
54
+ /************************************************************/
55
+ /* Some boxes*/
56
+
14
57
  .bs-callout {
15
58
  padding: 20px;
16
59
  margin: 20px 0;
@@ -81,10 +124,6 @@
81
124
  color: gray;
82
125
  }
83
126
 
84
- .btn-default {
85
- margin-bottom: 10px;
86
- }
87
-
88
127
  /*For use with https://getbootstrap.com/docs/3.3/components/ */
89
128
 
90
129
  .glyphicons-2x {
@@ -121,14 +160,6 @@ p.external a {
121
160
  font-size: 130%;
122
161
  }
123
162
 
124
- *[emphasis_as_inline_comments] {
125
- em {
126
- // Copied from inline_comments class above.
127
- font-size: 70%;
128
- color: firebrick;
129
- display: inline;
130
- }
131
- }
132
163
  /************************************************************/
133
164
 
134
165
  p.post-meta {
@@ -242,14 +273,6 @@ p.post-meta {
242
273
 
243
274
  /************************************************************/
244
275
 
245
- .projectTitle {
246
- font-weight: bold;
247
- }
248
-
249
- .githubEditButton {
250
- margin-bottom: 7px;
251
- }
252
-
253
276
  *:hover > .anchorjs-link {
254
277
  transition: color .25s linear;
255
278
  text-decoration: none;
@@ -79,11 +79,12 @@ h1[id], h2[id], h3[id], h4[id], h5[id], h6[id], dt[id] {
79
79
  }
80
80
 
81
81
  h1 {
82
- color: #015CAE;
82
+ color: #ae0d00;
83
83
  font-size: 250% !important;
84
84
  font-weight: bold;
85
85
  }
86
86
  h2 {
87
+ color: #015CAE;
87
88
  &.userMapTitle {
88
89
  font-family: Arial;
89
90
  }
@@ -92,11 +93,12 @@ h2 {
92
93
  font-weight: bold;
93
94
  }
94
95
  h3 {
95
- color: #ED1951;
96
+ color: #015CAE;
96
97
  font-size: 180% !important;
97
98
  font-weight: bold;
98
99
  }
99
100
  h4 {
101
+ color: #015CAE;
100
102
  font-size: 150% !important;
101
103
  font-weight: bold;
102
104
  &.panel-title {
@@ -119,11 +121,13 @@ h6 {
119
121
 
120
122
  html, body {
121
123
  font-size: 100%;
124
+ height: 100%;
125
+ width: 100%;
122
126
  }
123
127
 
124
128
  div {
125
129
  &.content {
126
- max-width: 110px;
130
+ //max-width: 110px;
127
131
  }
128
132
  &.alert code {
129
133
  background-color: transparent !important;