From 339aed8f2f5facf2eee123699cf98e249faaa4e2 Mon Sep 17 00:00:00 2001 From: Saeid Darvish Date: Sun, 25 May 2025 14:34:43 +0200 Subject: [PATCH 1/2] add a auto-detected dark-style --- README.md | 26 +- .../sphinx_minoo_theme/includes/header.html | 16 +- .../sphinx_minoo_theme/includes/top.html | 3 +- .../sphinx_minoo_theme/static/minoo-dark.css | 224 ++++++++++++++++++ source/conf.py | 4 +- 5 files changed, 255 insertions(+), 18 deletions(-) create mode 100644 source/_templates/sphinx_minoo_theme/static/minoo-dark.css diff --git a/README.md b/README.md index 924e170..4114ca9 100644 --- a/README.md +++ b/README.md @@ -33,40 +33,41 @@ This book is designed for Persian-speaking learners without prior experience wit To get started with this book, you can: -- Simply visit [PythonPersian.com](https://pythonpersian.com/) and start reading. +- Simply visit [PythonPersian.com](https://pythonpersian.com/) and start reading. - Download the source code from GitHub and run it on your local machine: ``` $ git clone https://github.com/saeiddrv/PythonPersianTutorial.git - + + $ cd PythonPersianTutorial + $ pip install -U pip $ pip install virtualenv $ python -m virtualenv .venv $ source .venv/bin/activate - - $ cd PythonPersianTutorial + $ pip install -r requirements.txt - + $ make html - + $ cd ./build/html $ python -m http.server 8000 ``` then visit http://127.0.0.1:8000 - + - Download the source code from GitHub and run it in Docker: - + ``` $ git clone https://github.com/saeiddrv/PythonPersianTutorial.git - + $ cd PythonPersianTutorial - + $ docker build -t pypersian . $ docker run -d --name pypersian -p 80:8000 pypersian ``` then visit http://127.0.0.1 - + ## Contributions @@ -74,7 +75,7 @@ If you'd like to contribute to the book, you can fork the repository on GitHub a ## Credits -This book was authored by [**Saeid Darvish**](https://saeiddrv.com). +This book was authored by [**Saeid Darvishghazvini**](https://saeiddrv.com). ## License @@ -83,4 +84,3 @@ This book is licensed under the Creative Commons Attribution-NonCommercial-Share ## Acknowledgments Special thanks to the Python community and the contributors of open-source Python packages and libraries, without whom this book would not have been possible. - diff --git a/source/_templates/sphinx_minoo_theme/includes/header.html b/source/_templates/sphinx_minoo_theme/includes/header.html index e072b9e..485ec8e 100644 --- a/source/_templates/sphinx_minoo_theme/includes/header.html +++ b/source/_templates/sphinx_minoo_theme/includes/header.html @@ -38,9 +38,11 @@ {% if theme_direction == "ltr" %} {% else %} - + {% endif %} + + {%- block linktags %} {%- if hasdoc('about') %} @@ -99,3 +101,15 @@ + + diff --git a/source/_templates/sphinx_minoo_theme/includes/top.html b/source/_templates/sphinx_minoo_theme/includes/top.html index b2564f9..5de9338 100644 --- a/source/_templates/sphinx_minoo_theme/includes/top.html +++ b/source/_templates/sphinx_minoo_theme/includes/top.html @@ -10,7 +10,6 @@   {{ title }} {% else %}   {{glossary.root_page}} -   در کدرز {% endif %} {% if pagename != "search" %} {% if display_github %} @@ -38,7 +37,7 @@ حمایت مالی - +