Skip to content

Commit 3d17af8

Browse files
author
Saeid Darvish
authored
Merge pull request #32 from saeiddrv/draft
add make-colors class to main css
2 parents 0458298 + 6aa25dd commit 3d17af8

3 files changed

Lines changed: 30 additions & 10 deletions

File tree

_templates/sphinx_minoo_theme/includes/header.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
{% if theme_direction == "ltr" %}
3939
<link rel="stylesheet" type=text/css href="{{ pathto('_static/minoo-ltr.css', 1) }}">
4040
{% else %}
41-
<link rel="stylesheet" type=text/css href="{{ pathto('_static/minoo-20210219.css', 1) }}">
41+
<link rel="stylesheet" type=text/css href="{{ pathto('_static/minoo-20210327.css', 1) }}">
4242
{% endif %}
4343

4444
{%- block linktags %}
@@ -99,7 +99,7 @@
9999
</script>
100100
{% endif %}
101101

102-
<script type="text/javascript" src="{{ pathto('_static/minoo.js', 1) }}"></script>
102+
<script type="text/javascript" src="{{ pathto('_static/minoo-20210327.js', 1) }}"></script>
103103
<script type="text/javascript" src="{{ pathto('_static/modernizr.min.js', 1) }}"></script>
104104

105105
<script async defer src="https://buttons.github.io/buttons.js"></script>

_templates/sphinx_minoo_theme/static/minoo-20210219.css renamed to _templates/sphinx_minoo_theme/static/minoo-20210327.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,4 +395,21 @@ a.side-donate{
395395
a.hover{
396396
background-color: #4CAF50;
397397
}
398+
/* -------- make other colors -------- */
399+
400+
.toctree-wrapper li.make-red >a {background-color: #ec407a;}
401+
.toctree-wrapper .make-red >a:hover {border-right: 5px #f48fb1 solid;}
402+
.toctree-wrapper li.make-red.toctree-l1 i {color: #f48fb1!important;}
403+
.toctree-wrapper li.make-red>ul>li>a {background-color: #f48fb1;}
404+
405+
.toctree-wrapper li.make-green >a {background-color: #00695c;}
406+
.toctree-wrapper .make-green >a:hover {border-right: 5px #4db6ac solid;}
407+
.toctree-wrapper li.make-green.toctree-l1 i {color: #4db6ac!important;}
408+
.toctree-wrapper li.make-green>ul>li>a {background-color: #4db6ac;}
409+
410+
411+
.toctree-wrapper li.make-black >a {background-color: #37474f;}
412+
.toctree-wrapper .make-black >a:hover {border-right: 5px #90a4ae solid;}
413+
.toctree-wrapper li.make-black.toctree-l1 i {color: #90a4ae!important;}
414+
.toctree-wrapper li.make-black>ul>li>a {background-color: #90a4ae;}
398415

_templates/sphinx_minoo_theme/static/minoo.js renamed to _templates/sphinx_minoo_theme/static/minoo-20210327.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,17 +123,20 @@ $( document ).ready(function() {
123123

124124
// custome function
125125
$("li[id^='wrapper-toctree-l1-'] a").each(function() {
126-
if ($(this).text().indexOf("گزارش توسعه")>=0) {
127-
$(this).addClass('reportmenufield');
126+
if ($(this).text().indexOf("گزارش توسعه")>=0) {
127+
$(this).parent().addClass('make-red');
128128
}
129-
if ($(this).text().indexOf("پیش‌گفتار")>=0) {
130-
$(this).addClass('reportmenufield');
129+
if ($(this).text().indexOf("پیش‌گفتار")>=0) {
130+
$(this).parent().addClass('make-red');
131131
}
132-
if ($(this).text().indexOf("گزارش حمایت‌های مالی")>=0) {
133-
$(this).addClass('reportmenufield');
132+
if ($(this).text().indexOf("گزارش حمایت‌های مالی")>=0) {
133+
$(this).parent().addClass('make-red');
134134
}
135-
if ($(this).text().indexOf("خودآزمایی") >= 0) {
136-
$(this).addClass('exercisesmenufield');
135+
if ($(this).text().indexOf("بهترین منابع آموزش پایتون") >= 0) {
136+
$(this).parent().addClass('make-green');
137+
}
138+
if ($(this).text().indexOf("محیط تعاملی پایتون") >= 0) {
139+
$(this).parent().addClass('make-green');
137140
}
138141
});
139142
// end custome function

0 commit comments

Comments
 (0)