allègement hightlight.js

This commit is contained in:
kyodev 2017-06-13 16:12:28 +02:00
parent 7bad3af548
commit 9641ce5073
7 changed files with 218 additions and 5 deletions

View File

@ -61,7 +61,7 @@ sites/
# pages html générées
```
### développement, build auto
## développement, build auto
* démarrer un serveur local, build et rafraîchissement automatique du navigateur
```shell
@ -75,7 +75,7 @@ mais le build sera sur la page uniquement, sans rechargement profond du navigate
* lancer **firefox** sur http://localhost:8000
### build manuel
## build manuel
dans ce cas, un répertoire de pages html (site/) est créé à côté du répertoire des pages markdown (docs/ par défaut).
ce répertoire _site_ est à poussé une site de pages statiques, à la différence de _docs_ où les pages doivent être
@ -85,3 +85,9 @@ dans le même ordre d'idée, on peut utiliser:
mkdocs build --dirty
```
incidences à voir
## thème mkdocs
* allègement hightlight.js avec seulement les langages:
`bash css diff html/xml http ini json javascript makefile markdown python shell(-session)`
`text` désactive la coloration syntaxique
* [manuel](https://highlightjs.org/usage/)

View File

@ -21,7 +21,8 @@
<link href="{{ base_url }}/css/bootstrap-mod.css" rel="stylesheet">
<link href="{{ base_url }}/css/font-awesome-4.5.0.css" rel="stylesheet">
<link href="{{ base_url }}/css/base.css" rel="stylesheet">
<link rel="stylesheet" href="{{ base_url }}/css/highlight.css">
<!-- <link rel="stylesheet" href="{{ base_url }}/css/highlight.css"> -->
<link rel="stylesheet" href="{{ base_url }}/css/hightlight-simple.css">
{%- for path in extra_css %}
<link href="{{ path }}" rel="stylesheet">
{%- endfor %}
@ -36,7 +37,8 @@
<script src="{{ base_url }}/js/jquery-1.10.2.min.js"></script>
<script src="{{ base_url }}/js/bootstrap-3.0.3.min.js"></script>
<script src="{{ base_url }}/js/highlight.pack.js"></script>
<!-- <script src="{{ base_url }}/js/highlight.pack.js"></script> -->
<script src="{{ base_url }}/js/highlight-simple.pack.js"></script>
{%- endblock %}
{%- block analytics %}
@ -73,6 +75,11 @@
{% if config.site_url %}<a href="{{ config.site_url }}">{%- if config.site_name %}{{config.site_name}}{%- endif %}</a>{% endif %}
{%- if config.copyright %} - license {{ config.copyright }}{%- endif %}
- Page éditée le {{ build_date_utc }} (UTC)
{%- block repo %}
{%- if config.repo_url %}
- <a href="{{ config.repo_url }}">{{ config.repo_name }}</a>
{%- endif %}
{%- endblock %}
</p>
{%- endblock %}
</footer>

View File

@ -0,0 +1,99 @@
/*
github.com style (c) Vasily Polovnyov <vast@whiteants.net>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
color: #333;
/* background: #f8f8f8; */
}
.hljs-comment,
.hljs-quote {
color: #998;
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-subst {
color: #333;
font-weight: bold;
}
.hljs-number,
.hljs-literal,
.hljs-variable,
.hljs-template-variable,
.hljs-tag .hljs-attr {
color: #008080;
}
.hljs-string,
.hljs-doctag {
color: #d14;
}
.hljs-title,
.hljs-section,
.hljs-selector-id {
color: #900;
font-weight: bold;
}
.hljs-subst {
font-weight: normal;
}
.hljs-type,
.hljs-class .hljs-title {
color: #458;
font-weight: bold;
}
.hljs-tag,
.hljs-name,
.hljs-attribute {
color: #000080;
font-weight: normal;
}
.hljs-regexp,
.hljs-link {
color: #009926;
}
.hljs-symbol,
.hljs-bullet {
color: #990073;
}
.hljs-built_in,
.hljs-builtin-name {
color: #0086b3;
}
.hljs-meta {
color: #999;
font-weight: bold;
}
.hljs-deletion {
background: #fdd;
}
.hljs-addition {
background: #dfd;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,99 @@
/*
Original highlight.js style (c) Ivan Sagalaev <maniac@softwaremaniacs.org>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
/* background: #F0F0F0; */
}
/* Base color: saturation 0; */
.hljs,
.hljs-subst {
color: #444;
}
.hljs-comment {
color: #888888;
}
.hljs-keyword,
.hljs-attribute,
.hljs-selector-tag,
.hljs-meta-keyword,
.hljs-doctag,
.hljs-name {
font-weight: bold;
}
/* User color: hue: 0 */
.hljs-type,
.hljs-string,
.hljs-number,
.hljs-selector-id,
.hljs-selector-class,
.hljs-quote,
.hljs-template-tag,
.hljs-deletion {
color: #880000;
}
.hljs-title,
.hljs-section {
color: #880000;
font-weight: bold;
}
.hljs-regexp,
.hljs-symbol,
.hljs-variable,
.hljs-template-variable,
.hljs-link,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #BC6060;
}
/* Language color: hue: 90; */
.hljs-literal {
color: #78A960;
}
.hljs-built_in,
.hljs-bullet,
.hljs-code,
.hljs-addition {
color: #397300;
}
/* Meta color: hue: 200 */
.hljs-meta {
color: #1f7199;
}
.hljs-meta-string {
color: #4d99bf;
}
/* Misc effects */
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -67,7 +67,6 @@
</li>
{%- endif %}
{%- endblock %}
-->
{%- block repo %}
{%- if config.repo_url %}
<li>
@ -82,6 +81,7 @@
</li>
{%- endif %}
{%- endblock %}
-->
</ul>
</div>
</div>