Skip to content

Commit dea71e7

Browse files
authored
Merge pull request #38 from GaryFuzheyu/main
Update docs
2 parents 571cacf + 756215e commit dea71e7

5 files changed

Lines changed: 168 additions & 25 deletions

File tree

docs/_static/custom.css

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
/* Custom CSS for MarkDiffusion Documentation */
2+
3+
/* Increase sidebar width and ensure no gap */
4+
.wy-nav-side {
5+
width: 350px !important;
6+
left: 0 !important;
7+
}
8+
9+
/* Ensure sidebar top section (purple area) matches width */
10+
.wy-side-nav-search {
11+
width: 350px !important;
12+
box-sizing: border-box !important;
13+
margin: 0 !important;
14+
padding: 1.618em !important;
15+
}
16+
17+
/* Ensure menu items match sidebar width */
18+
.wy-menu.wy-menu-vertical {
19+
width: 350px !important;
20+
box-sizing: border-box !important;
21+
margin: 0 !important;
22+
padding: 0 !important;
23+
}
24+
25+
/* Ensure highlighted/current items fill the width */
26+
.wy-menu-vertical li.current {
27+
width: 350px !important;
28+
}
29+
30+
.wy-menu-vertical li.current > a {
31+
width: 100% !important;
32+
box-sizing: border-box !important;
33+
}
34+
35+
/* Hide sidebar scrollbar and prevent it from taking space */
36+
.wy-side-scroll {
37+
overflow-y: scroll !important;
38+
scrollbar-width: none !important; /* Firefox */
39+
-ms-overflow-style: none !important; /* IE and Edge */
40+
width: 100% !important;
41+
}
42+
43+
.wy-side-scroll::-webkit-scrollbar {
44+
display: none !important; /* Chrome, Safari and Opera */
45+
width: 0 !important;
46+
height: 0 !important;
47+
}
48+
49+
/* Ensure the navigation container fills the entire sidebar */
50+
.wy-side-nav-search,
51+
.wy-menu.wy-menu-vertical {
52+
overflow-x: hidden !important;
53+
}
54+
55+
/* Adjust content area to accommodate wider sidebar */
56+
.wy-nav-content-wrap {
57+
margin-left: 350px !important;
58+
}
59+
60+
/* Increase max width of content area to use more screen space */
61+
.wy-nav-content {
62+
max-width: 1200px !important;
63+
}
64+
65+
/* Make the overall page wider on large screens */
66+
@media screen and (min-width: 1400px) {
67+
.wy-nav-side {
68+
width: 380px !important;
69+
left: 0 !important;
70+
}
71+
72+
.wy-side-nav-search {
73+
width: 380px !important;
74+
box-sizing: border-box !important;
75+
}
76+
77+
.wy-menu.wy-menu-vertical {
78+
width: 380px !important;
79+
box-sizing: border-box !important;
80+
}
81+
82+
.wy-menu-vertical li.current {
83+
width: 380px !important;
84+
}
85+
86+
.wy-nav-content-wrap {
87+
margin-left: 380px !important;
88+
}
89+
90+
.wy-nav-content {
91+
max-width: 1400px !important;
92+
}
93+
}
94+
95+
/* Ensure sidebar text wraps properly with the increased width */
96+
.wy-menu-vertical li.toctree-l1 > a,
97+
.wy-menu-vertical li.toctree-l2 > a,
98+
.wy-menu-vertical li.toctree-l3 > a {
99+
white-space: normal !important;
100+
line-height: 1.4 !important;
101+
padding: 0.4045em 1.618em !important;
102+
width: 100% !important;
103+
box-sizing: border-box !important;
104+
}
105+
106+
/* Add slight padding to long navigation items */
107+
.wy-menu-vertical li.current > a {
108+
padding: 0.4045em 1.618em !important;
109+
width: 100% !important;
110+
box-sizing: border-box !important;
111+
}
112+
113+
/* Ensure all list items fill the width */
114+
.wy-menu-vertical li {
115+
width: 100% !important;
116+
}
117+
118+
/* Ensure current item background fills the width */
119+
.wy-menu-vertical li.current > a,
120+
.wy-menu-vertical li.on a,
121+
.wy-menu-vertical li.current > a:hover,
122+
.wy-menu-vertical li.on a:hover {
123+
background: #e3e3e3 !important;
124+
width: 100% !important;
125+
box-sizing: border-box !important;
126+
}
127+
128+
/* Ensure nested menu items also fill width */
129+
.wy-menu-vertical ul {
130+
width: 100% !important;
131+
}
132+
133+
.wy-menu-vertical ul li a {
134+
width: 100% !important;
135+
box-sizing: border-box !important;
136+
}
137+
138+
/* Remove purple color from visited links in content area */
139+
.wy-nav-content a:visited {
140+
color: #2980B9 !important;
141+
}
142+
143+
.wy-nav-content a:link {
144+
color: #2980B9 !important;
145+
}
146+

docs/conf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@
8080
# so a file named "default.css" will overwrite the builtin "default.css".
8181
html_static_path = ['_static']
8282

83+
# Custom CSS files
84+
html_css_files = [
85+
'custom.css',
86+
]
87+
8388
# Custom sidebar templates, must be a dictionary that maps document names
8489
# to template names.
8590
html_sidebars = {

docs/index.rst

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ MarkDiffusion Documentation
1717
:target: https://colab.research.google.com/drive/1N1C9elDAB5zwF4FxKKYMCqR3eSpCSqAW?usp=sharing
1818
:alt: Colab
1919

20-
.. image:: https://img.shields.io/badge/Readthedocs-%2300A89C?style=for-the-badge&logo=readthedocs&logoColor=%238CA1AF
21-
:target: https://markdiffusion.readthedocs.io
22-
:alt: DOC
23-
2420
.. image:: https://img.shields.io/badge/PYPI-%23193440?style=for-the-badge&logo=pypi&logoColor=%233775A9
2521
:target: https://pypi.org/project/markdiffusion
2622
:alt: PYPI
@@ -64,15 +60,20 @@ Key Features
6460
:width: 100%
6561
:align: center
6662

63+
|
64+
|
6765
6866
A Quick Example of Generating and Detecting Watermarked Image via MarkDiffusion Toolkit
69-
---------------
67+
-----------------------------------------------------------------------------------------
7068

7169
.. image:: ../img/A_Quick_Example.png
7270
:alt: A quick example of generating and detecting watermarked image via MarkDiffusion toolkit
7371
:width: 100%
7472
:align: center
7573

74+
|
75+
|
76+
7677
Documentation Contents
7778
----------------------
7879

@@ -84,7 +85,7 @@ Documentation Contents
8485

8586
.. toctree::
8687
:maxdepth: 2
87-
:caption: Background Information and
88+
:caption: Background Info &
8889
Detailed Guidance
8990

9091
user_guide/algorithms
@@ -117,10 +118,4 @@ Documentation Contents
117118
citation
118119
resources
119120

120-
Indices and tables
121-
==================
122-
123-
* :ref:`genindex`
124-
* :ref:`modindex`
125-
* :ref:`search`
126121

docs/quickstart.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
Quick Start
2-
===========
1+
.. _quickstart:
32

43
Google Colab Demo
5-
-----------------
4+
=================
65

76
If you're interested in trying out MarkDiffusion without installing anything, you can use
87
`Google Colab <https://colab.research.google.com/drive/1N1C9elDAB5zwF4FxKKYMCqR3eSpCSqAW?usp=sharing>`_
98
to see how it works.
109

1110
Installation
12-
------------
11+
============
1312

1413
**(Recommended)** We released PyPI package for MarkDiffusion. You can install it directly with pip:
1514

@@ -35,7 +34,7 @@ conda-forge package, which can be installed with the following commands:
3534
be included in the release. You will need to install those separately if necessary.
3635

3736
How to Use the Toolkit
38-
----------------------
37+
======================
3938

4039
After installation, there are two ways to use MarkDiffusion:
4140

@@ -148,7 +147,7 @@ via the markdiffusion library—please review it for guidance. Here's a quick ex
148147
print(detection_result)
149148
150149
Next Steps
151-
----------
150+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
152151

153152
Now that you're familiar with the basics, explore more:
154153

docs/test_system/comprehensive_test.rst

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ This comprehensive test module is located in the ``test/`` directory.
77
Test Coverage Statistics
88
------------------------
99

10-
- **Total Test Cases**: 454 unit tests
11-
- **Code Coverage**: Approximately 90%
10+
- **Total Test Cases**: 658 unit tests
11+
- **Code Coverage**: Approximately 95%
1212
- **Coverage Scope**: Nearly all functional modules
1313
- **Uncovered Code**: Primarily exception handling and edge case logic
1414

@@ -19,8 +19,6 @@ Test Structure
1919

2020
The test suite is organized into several test files:
2121

22-
Core Functionality Tests
23-
~~~~~~~~~~~~~~~~~~~~~~~~
2422

2523
**test_watermark_algorithms.py**
2624
Tests for initialization, generation, detection, inversion, and visualization of all watermark algorithms.
@@ -31,9 +29,6 @@ Core Functionality Tests
3129
**test_dataset.py**
3230
Tests for dataset classes (StableDiffusionPromptsDataset, MSCOCODataset, VBenchDataset).
3331

34-
Utility and Module Tests
35-
~~~~~~~~~~~~~~~~~~~~~~~~~
36-
3732
**test_utils.py**
3833
Tests for utility functions used throughout the toolkit.
3934

@@ -46,6 +41,9 @@ Utility and Module Tests
4641
**test_video_editor.py**
4742
Tests for video editing modules.
4843

44+
**test_edge_cases.py**
45+
Tests for some edge cases.
46+
4947
Running the Tests
5048
-----------------
5149

0 commit comments

Comments
 (0)