[gtk-web/new-website: 129/191] converted realtive links to absolute links



commit a08776198f5ba82ca1f14433c2d6bebc0b00fe6a
Author: ravgeetdhillon <ravgeetdhillon gmail com>
Date:   Sun Jul 28 12:35:50 2019 +0530

    converted realtive links to absolute links

 _includes/footer.html        | 32 ++++++++++++++++++++++++++++++++
 _includes/header.html        |  4 ++--
 _layouts/documentation.html  | 36 ------------------------------------
 collections/_docs/macos.md   |  4 +---
 collections/_docs/windows.md |  4 +---
 5 files changed, 36 insertions(+), 44 deletions(-)
---
diff --git a/_includes/footer.html b/_includes/footer.html
index c0a1c53..4b3f4a0 100644
--- a/_includes/footer.html
+++ b/_includes/footer.html
@@ -57,5 +57,37 @@ to make changes related to the content, edit the `_data/navigation.yml`
   </div>
 </footer>
 
+<script>
+  // converts relative paths of markdown based images to absolute path
+  var i, l, img, markdownImages;
+  markdownImages = document.querySelectorAll("img");
+  l = markdownImages.length;
+  for (i = 0; i < l; i++) {
+    img = markdownImages[i];
+    imgNodeValue = img.attributes.src.nodeValue;
+    if ( imgNodeValue.search("https://";) == 0 || imgNodeValue.search("http://";) == 0 ) {
+      continue;
+    }
+    else {
+      img.setAttribute("src", "{{ site.url }}" + imgNodeValue);
+    }
+  }
+
+  // converts relative paths of markdown based links to absolute path
+  var i, l, img, markdownLinks;
+  markdownLinks = document.querySelectorAll("a");
+  l = markdownLinks.length;
+  for (i = 0; i < l; i++) {
+    link = markdownLinks[i];
+    linkNodeValue = link.attributes.href.nodeValue;
+    if ( linkNodeValue.search("https://";) == 0 || linkNodeValue.search("http://";) == 0 || linkNodeValue[0] 
== '#' ) {
+      continue;
+    }
+    else {
+      link.setAttribute("href", "{{ site.url }}" + linkNodeValue);
+    }
+  }
+</script>
+
 </body>
 </html>
\ No newline at end of file
diff --git a/_includes/header.html b/_includes/header.html
index 113465e..458097f 100644
--- a/_includes/header.html
+++ b/_includes/header.html
@@ -30,7 +30,7 @@ to make changes related to the content, edit the `_data/navigation.yml`
        <script src="{{ '/assets/jquery/dist/jquery.min.js' | prepend: site.url }}"></script>
        <script src="{{ '/assets/popper.js/dist/umd/popper.min.js' | prepend: site.url }}"></script>
        <script src="{{ '/assets/bootstrap/dist/js/bootstrap.min.js' | prepend: site.url }}"></script>
-       <script src="{{ '/assets/slick-carousel/slick/slick.min.js' | prepend: site.url }}"></script>   
+       <script src="{{ '/assets/slick-carousel/slick/slick.min.js' | prepend: site.url }}"></script>
 </head>
 
 <body>
@@ -44,7 +44,7 @@ to make changes related to the content, edit the `_data/navigation.yml`
   <header class="navbar small bg-{{ bg_color }}">
     <nav class="container navbar-expand-md px-0 px-md-3">
       <a href="{{ site.url }}" class="navbar-brand text-{{ text_color }}"><img src="{{ 
'/assets/img/logo-gtk.png' | prepend: site.url }}" class="pr-2" style="width:40px;" /><strong>GTK</strong></a>
-      <a class="btn navbar-toggler border-0 p-0" role="button" data-toggle="collapse" 
data-target="#navbarSupportedContent">
+      <a class="btn navbar-toggler border-0 p-0" role="button" data-toggle="collapse" 
data-target="#navbarSupportedContent" href="#">
         <i class="fas fa-ellipsis-h text-{{ text_color }}"></i>
       </a>
       <div class="collapse navbar-collapse" id="navbarSupportedContent">
diff --git a/_layouts/documentation.html b/_layouts/documentation.html
index fc0aacf..23f267d 100644
--- a/_layouts/documentation.html
+++ b/_layouts/documentation.html
@@ -75,44 +75,8 @@ any changes made to this file will affect all the documentation pages
   function openSideNav() {
     document.querySelector(".nav-side").style.width = "250px";
   }
-
   function closeSideNav() {
     document.querySelector(".nav-side").style.width = "0";
   }
-
-  // implements the bootstrap tooltip functionality
-  $(document).ready(function () {
-    $('[data-toggle="tooltip"]').tooltip();
-  });
-
-  // converts relative paths of markdown based images to absolute path
-  var i, l, img, markdownImages;
-  markdownImages = document.querySelectorAll(".markdown-body img");
-  l = markdownImages.length;
-  for (i = 0; i < l; i++) {
-    img = markdownImages[i];
-    imgNodeValue = img.attributes.src.nodeValue;
-    if ( imgNodeValue.search("https://";) == 0 || imgNodeValue.search("http://";) == 0 ) {
-      continue;
-    }
-    else {
-      img.setAttribute("src", "{{ site.url }}" + imgNodeValue);
-    }
-  }
-
-  // converts relative paths of markdown based links to absolute path
-  var i, l, img, markdownLinks;
-  markdownLinks = document.querySelectorAll(".markdown-body a");
-  l = markdownLinks.length;
-  for (i = 0; i < l; i++) {
-    link = markdownLinks[i];
-    linkNodeValue = link.attributes.href.nodeValue;
-    if ( linkNodeValue.search("https://";) == 0 || linkNodeValue.search("http://";) == 0 || linkNodeValue[0] 
== '#' ) {
-      continue;
-    }
-    else {
-      link.setAttribute("href", "{{ site.url }}" + linkNodeValue);
-    }
-  }
 </script>
 {% include footer.html %}
\ No newline at end of file
diff --git a/collections/_docs/macos.md b/collections/_docs/macos.md
index 34857f8..7ea64f6 100644
--- a/collections/_docs/macos.md
+++ b/collections/_docs/macos.md
@@ -44,6 +44,4 @@ Support for building, bundling, and the integration library is provided by a [ma
 
 ## Contributing
 
-Bugs, patches and enhancements for building, integration, or bundling may be submitted to [Bugzilla, with 
Product=gtk-mac-integration](https://bugzilla.gnome.org/enter_bug.cgi?product=gtk-mac-integration). Bug 
reports on any other package, including GTK itself, should be submitted against that package, not 
gtk-mac-integration; the GTK component for the Quartz backend is "Backend: Quartz".
-
-***
\ No newline at end of file
+Bugs, patches and enhancements for building, integration, or bundling may be submitted to [Bugzilla, with 
Product=gtk-mac-integration](https://bugzilla.gnome.org/enter_bug.cgi?product=gtk-mac-integration). Bug 
reports on any other package, including GTK itself, should be submitted against that package, not 
gtk-mac-integration; the GTK component for the Quartz backend is "Backend: Quartz".
\ No newline at end of file
diff --git a/collections/_docs/windows.md b/collections/_docs/windows.md
index 2459bf1..b71eab7 100644
--- a/collections/_docs/windows.md
+++ b/collections/_docs/windows.md
@@ -126,6 +126,4 @@ You may use MSYS2 to [build your GTK application and create an installer to dist
 
 You are welcome to redistribute GTK binaries, including applications that bundle them, on other web sites, 
CD-ROM, and other media. You don't have to ask for permission. That's one of the points of Free Software. 
 
-One important thing that the [GNU licenses](http://www.fsf.org/licenses/licenses.html) require is that you 
must also redistribute the source code. This usually means at least the gettext, GLib, GTK, Pango and ATK 
sources.
-
-***
\ No newline at end of file
+One important thing that the [GNU licenses](http://www.fsf.org/licenses/licenses.html) require is that you 
must also redistribute the source code. This usually means at least the gettext, GLib, GTK, Pango and ATK 
sources.
\ No newline at end of file


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]