Open cirospat opened 6 years ago
potrebbe essere qualcosa così da inserire nel conf.py:
setup(
packages=['top'],
package_data={'top': [
'*.html',
'*.css',
'*.js',
'/img/*.png',
'/img/*.db',
]},
include_package_data=True,
],
)
o può darsi che bisogna inserire il codice nel file "theme_override.css" .... https://github.com/cirospat/newproject/blob/master/docs/static/theme_overrides.css ho provato ma non funziona, non viene visualizzata la freccia sulle pagine di Read the Docs
Nel conf.py non devi aggiungere nulla per il back to top
Guarda il codice nel nostro repository https://github.com/gbvitrano/HfcQGIS/blob/master/_templates/layout.html, abbiamo cambiato un po le cose.
{% block extrahead %}
{{ super() }}
<!-- css back top -->
<!--<link href="../_static/jquerysctipttop.css" rel="stylesheet" type="text/css" />-->
<link href="{{ pathto("_static/jquerysctipttop.css", True) }}" rel="stylesheet" type="text/css" />
<!--<link href="../_static/backTop.css" rel="stylesheet" type="text/css" />-->
<link href="{{ pathto("_static/backTop.css", True) }}" rel="stylesheet" type="text/css" />
<!-- Script -->
<!--<script type="text/javascript" src="../_static/jquery.min.js"></script> -->
<script type="text/javascript" src="{{ pathto("_static/jquery.min.js", True) }}"></script>
{% endblock %}```
il footer è rimasto lo stesso
{{ super() }}
<!-- script Back To Top -->
<div class="footerc">
<a id='backTop'>Back To Top</a>
<!-- script toptoback automatico mobile/desktop -->
<!-- <script type="text/javascript" src="../_static/jquery.backTop.min.js"></script> -->
<script type="text/javascript" src="{{ pathto("_static/jquery.backTop.min.js", True) }}"></script>
<script>
$(document).ready( function() {
$('#backTop').backTop({
'position' : 400,
'speed' : 300,
'color' : 'red',
});
});
</script>
</div>
<script>
$(document).ready(function(){
$('.csbuttons').cSButtons({total : #total","url" : "http://hfcqgis.opendatasicilia.it/it/latest/",});
});
</script>
<!-- Go to www.addthis.com/dashboard to customize your tools -->
<!-- INCOLLA QUI IL TUO CODICE -->
{% endblock %}```
praticamente l'ho copiato di sana pianta e ora funziona
i componenti dello script della freccia "back to the top" da far visualizzare sulle pagine html di read the docs sono qui qui: https://github.com/cirospat/newproject/tree/master/docs/top
la sintassi dello script è questa:
.....
ma non so come inserire le istruzioni dello script "back to the top" sul file conf.py che è qui: https://github.com/cirospat/newproject/blob/master/docs/conf.py