Skip to content
Snippets Groups Projects
Commit ba72ddb9 authored by squidfunk's avatar squidfunk
Browse files

Fixed #4: Click on Logo/Title without Github-Repository: None

parent e7a41822
No related branches found
No related tags found
No related merge requests found
mkdocs-material-0.x.x (2016-xx-xx) mkdocs-material-0.x.x (2016-xx-xx)
* Fixed #3: Ordered lists within an unordered list have ::before content * Fixed #3: Ordered lists within an unordered list have ::before content
* Fixed #4: Click on Logo/Title without Github-Repository: "None"
* Moved Modernizr to top to ensure basic usability in IE8 * Moved Modernizr to top to ensure basic usability in IE8
mkdocs-material-0.1.2 (2016-02-16) mkdocs-material-0.1.2 (2016-02-16)
......
This diff is collapsed.
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
{% block extrahead %}{% endblock %} {% block extrahead %}{% endblock %}
</head> </head>
<body> <body>
{% if repo_name == 'GitHub' %} {% if repo_name == 'GitHub' and repo_url %}
{% set repo_id = repo_url | replace('https://github.com/', '') %} {% set repo_id = repo_url | replace('https://github.com/', '') %}
{% if repo_id[-1:] == '/' %} {% if repo_id[-1:] == '/' %}
{% set repo_id = repo_id[:-1] %} {% set repo_id = repo_id[:-1] %}
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
var base_url = '{{ base_url }}'; var base_url = '{{ base_url }}';
var repo_id = '{{ repo_id }}'; var repo_id = '{{ repo_id }}';
</script> </script>
<script src="{{ base_url }}/assets/javascripts/application-c6d2e828bd.js"></script> <script src="{{ base_url }}/assets/javascripts/application-a10a824a49.js"></script>
{% for path in extra_javascript %} {% for path in extra_javascript %}
<script src="{{ path }}"></script> <script src="{{ path }}"></script>
{% endfor %} {% endfor %}
......
<nav aria-label="Navigation"> <nav aria-label="Navigation">
<a href="{{ repo_url }}" class="project"> {% set home = repo_url | default('/', true) %}
<a href="{{ home }}" class="project">
<div class="banner"> <div class="banner">
{% if config.extra.logo %} {% if config.extra.logo %}
<div class="logo"> <div class="logo">
...@@ -17,7 +18,7 @@ ...@@ -17,7 +18,7 @@
</a> </a>
<div class="scrollable"> <div class="scrollable">
<div class="wrapper"> <div class="wrapper">
{% if repo_name == 'GitHub' %} {% if repo_name == 'GitHub' and repo_url %}
<ul class="repo"> <ul class="repo">
<li class="repo-download"> <li class="repo-download">
{% set version = config.extra.version | default('master') %} {% set version = config.extra.version | default('master') %}
......
{ {
"assets/images/favicon.ico": "assets/images/favicon-e565ddfa3b.ico", "assets/images/favicon.ico": "assets/images/favicon-e565ddfa3b.ico",
"assets/javascripts/application.js": "assets/javascripts/application-c6d2e828bd.js", "assets/javascripts/application.js": "assets/javascripts/application-a10a824a49.js",
"assets/javascripts/modernizr.js": "assets/javascripts/modernizr-4ab42b99fd.js", "assets/javascripts/modernizr.js": "assets/javascripts/modernizr-4ab42b99fd.js",
"assets/stylesheets/application.css": "assets/stylesheets/application-eaf860cca2.css" "assets/stylesheets/application.css": "assets/stylesheets/application-eaf860cca2.css"
} }
\ No newline at end of file
...@@ -502,6 +502,7 @@ document.addEventListener('DOMContentLoaded', function() { ...@@ -502,6 +502,7 @@ document.addEventListener('DOMContentLoaded', function() {
* ------------------------------------------------------------------------- */ * ------------------------------------------------------------------------- */
/* Get Stars for current repository */ /* Get Stars for current repository */
if (repo_id) {
pegasus('https://api.github.com/repos/' + repo_id).then( pegasus('https://api.github.com/repos/' + repo_id).then(
/* Request successful, we got the stars */ /* Request successful, we got the stars */
...@@ -522,4 +523,5 @@ document.addEventListener('DOMContentLoaded', function() { ...@@ -522,4 +523,5 @@ document.addEventListener('DOMContentLoaded', function() {
console.error(data, xhr.status); console.error(data, xhr.status);
} }
); );
}
}); });
\ No newline at end of file
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
regular expressions out-of-the-box. Since there might be a slash at the regular expressions out-of-the-box. Since there might be a slash at the
end of the repository name, we just do a string comparison and kill it. end of the repository name, we just do a string comparison and kill it.
--> -->
{% if repo_name == 'GitHub' %} {% if repo_name == 'GitHub' and repo_url %}
{% set repo_id = repo_url | replace('https://github.com/', '') %} {% set repo_id = repo_url | replace('https://github.com/', '') %}
{% if repo_id[-1:] == '/' %} {% if repo_id[-1:] == '/' %}
{% set repo_id = repo_id[:-1] %} {% set repo_id = repo_id[:-1] %}
......
<!-- Navigation --> <!-- Navigation -->
<nav aria-label="Navigation"> <nav aria-label="Navigation">
{% set home = repo_url | default('/', true) %}
<!-- Project information --> <!-- Project information -->
<a href="{{ repo_url }}" class="project"> <a href="{{ home }}" class="project">
<!-- Name and logo --> <!-- Name and logo -->
<div class="banner"> <div class="banner">
...@@ -32,7 +33,7 @@ ...@@ -32,7 +33,7 @@
<div class="wrapper"> <div class="wrapper">
<!-- Repository --> <!-- Repository -->
{% if repo_name == 'GitHub' %} {% if repo_name == 'GitHub' and repo_url %}
<ul class="repo"> <ul class="repo">
<li class="repo-download"> <li class="repo-download">
{% set version = config.extra.version | default('master') %} {% set version = config.extra.version | default('master') %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment