Skip to content

Commit

Permalink
Merge pull request #120 from TYPO3-Documentation/develop-marble
Browse files Browse the repository at this point in the history
4.5.2 (2021-03-26)
==================

*  Have 'How to edit' button point to `GithubMethod.html
   <https://docs.typo3.org/m/typo3/docs-how-to-document/master/en-us/WritingDocsOfficial/GithubMethod.html>`__

*  Always show the 'How to edit' button when the 'Edit on ...' button is shown

*  Built in offline Sphinx search autocompletion: Turn autoSelect off, use text
   'Not found in word stems'

*  Remove flex property from logo link, so that it doesn't extend the clickable
   area past the image
  • Loading branch information
marble authored Mar 26, 2021
2 parents b52952b + 10896ac commit 6668cb4
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 8 deletions.
16 changes: 16 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@
History
=======


4.5.2 (2021-03-26)
==================

* Have 'How to edit' button point to `GithubMethod.html
<https://docs.typo3.org/m/typo3/docs-how-to-document/master/en-us/WritingDocsOfficial/GithubMethod.html>`__

* Always show the 'How to edit' button when the 'Edit on ...' button is shown

* Built in offline Sphinx search autocompletion: Turn autoSelect off, use text
'Not found in word stems'

* Remove flex property from logo link, so that it doesn't extend the clickable
area past the image


4.5.1 (2021-03-13)
==================

Expand Down
7 changes: 3 additions & 4 deletions js/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ document.addEventListener('DOMContentLoaded', function () { 'use strict';
update(suggestions);
},
minLength: 4,
emptyMsg: 'No elements found',
emptyMsg: 'Not found in word stems',
render: function (item) {
var div = document.createElement("div");
div.textContent = item.label;
Expand All @@ -80,7 +80,8 @@ document.addEventListener('DOMContentLoaded', function () { 'use strict';
onSelect: function (item) {
searchinput.value = item.label;
searchform.submit();
}
},
disableAutoSelect: true
});
}
});
Expand Down Expand Up @@ -123,7 +124,5 @@ jQuery(document).ready(function () { 'use strict';

// start with collapsed menu on a TYPO3 Exceptions page
jQuery('li.toctree-l1.current').filter(":contains('TYPO3 Exceptions')").removeClass('current');
jQuery('#btnEditOnGitHub').mouseenter(function () { jQuery('#btnHowToEdit').show();});
jQuery('#btnHowToEdit').parent().mouseleave(function () {jQuery('#btnHowToEdit').hide();});

});
40 changes: 40 additions & 0 deletions package.json.main-with-grunt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "sphinx-typo3-theme",
"version": "1.0.0",
"private": true,
"dependencies": {},
"devDependencies": {
"@fortawesome/fontawesome-free": "^5.13.0",
"TYPO3CMS-Guide-HowToDocument": "github:TYPO3-Documentation/TYPO3CMS-Guide-HowToDocument",
"autocompleter": "^6.0.3",
"bootstrap": "^4.4.1",
"connect-livereload": "^0.6.1",
"grunt": "^1.1.0",
"grunt-cli": "^1.3.2",
"grunt-contrib-clean": "2.0.0",
"grunt-contrib-copy": "1.0.0",
"grunt-contrib-uglify": "^4.0.1",
"grunt-contrib-watch": "^1.1.0",
"grunt-exec": "^3.0.0",
"grunt-sass": "^3.1.0",
"grunt-stylelint": "^0.15.0",
"http-server": "^0.12.3",
"jquery": "^3.5.0",
"modernizr": "^3.11.0",
"node-sass": "^4.14.0",
"popper.js": "^1.16.1",
"stylelint": "^13.3.3",
"underscore": "^1.10.2"
},
"scripts": {
"watch": "grunt watch",
"frontend": "grunt frontend",
"build": "grunt build",
"render": "grunt render",
"serve": "http-server ./build/Result/project/0.0.0/"
},
"engines": {
"node": ">=10.16",
"yarn": ">= 1.0.0"
}
}
9 changes: 7 additions & 2 deletions sphinx_typo3_theme/breadcrumbs.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@
</ol>
{%- if pagename != "search" %}
<div class="breadcrumb-additions">
<a class="btn btn-sm btn-primary" id="btnHowToEdit" style="display:none"
href="https://docs.typo3.org/m/typo3/docs-how-to-document/master/en-us/GitHub/"
{%- if theme_h2edit_url and
((theme_github_repository and theme_github_branch) or
((builder == 'html') and (display_github or
display_bitbucket))) %}
<a class="btn btn-sm btn-primary" id="btnHowToEdit"
href="{{ theme_h2edit_url }}"
rel="nofollow noopener" target="_blank">
<span class="btn-icon"><span class="fas fa-info-circle"></span></span>
<span class="btn-text">How to edit</span>
</a>
{%- endif %}
{%- if theme_github_repository and theme_github_branch %}
{%- if theme_github_sphinx_locale %}
{%- set localizationprefix = "Localization." + theme_github_sphinx_locale + "/" %}
Expand Down
4 changes: 3 additions & 1 deletion sphinx_typo3_theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,9 @@
{%- block pageheader %}
{%- if logo and logo != 'None' %}

<div class="logo">
{%- if logo_url %}
<a href="{{ logo_url }}" {% if logo_title %}title="{{ logo_title|e }}" {% endif %}class="logo">
<a href="{{ logo_url }}" {% if logo_title %}title="{{ logo_title|e }}" {% endif %}>

{%- endif %}
<img src="{{ pathto('_static/' + logo, 1) }}"
Expand All @@ -129,6 +130,7 @@
</a>

{%- endif %}
</div>

{%- endif %}
{%- endblock %}
Expand Down
2 changes: 1 addition & 1 deletion sphinx_typo3_theme/static/js/theme.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions sphinx_typo3_theme/theme.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ logo_height = 130
logo_title = TYPO3 Documentation
logo_url = https://docs.typo3.org/
logo_width = 484
#
h2edit_url = https://docs.typo3.org/m/typo3/docs-how-to-document/master/en-us/WritingDocsOfficial/GithubMethod.html

0 comments on commit 6668cb4

Please sign in to comment.