-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docdiff: initial work to toggle enabled/disabled (#63)
![Peek 2023-04-25 16-43](https://user-images.githubusercontent.com/244656/234422680-79c4562a-f2d0-475d-b8a7-a76757ef514b.gif) Closes #62 Closes #23 Closes #11
- Loading branch information
Showing
11 changed files
with
356 additions
and
24 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<html> | ||
<head> | ||
<title>DocDiff Addons - Read the Docs</title> | ||
</head> | ||
<body> | ||
<div id="main"> | ||
<h1>DocDiff Changed</h1> | ||
<p>This is a great feature for external versions previews.</p> | ||
<p>Paragraph deleted</p> | ||
</div> | ||
|
||
<readthedocs-docdiff | ||
base-url="http://localhost:8000/docdiff.changed.html" | ||
root-selector="#main" | ||
></readthedocs-docdiff> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<html> | ||
<head> | ||
<title>DocDiff Addons - Read the Docs</title> | ||
</head> | ||
<body> | ||
<div id="main"> | ||
<h1>DocDiff Addons</h1> | ||
<p>This is a great feature for pull request previews.</p> | ||
</div> | ||
|
||
<readthedocs-docdiff | ||
base-url="http://localhost:8000/docdiff.changed.html" | ||
root-selector="#main" | ||
inject-styles="true" | ||
></readthedocs-docdiff> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* Example copied from */ | ||
/* https://www.w3schools.com/howto/howto_css_switch.asp */ | ||
|
||
/* The switch - the box around the slider */ | ||
:host .switch { | ||
position: relative; | ||
display: inline-block; | ||
width: 60px; | ||
height: 34px; | ||
} | ||
|
||
/* Hide default HTML checkbox */ | ||
:host .switch input { | ||
opacity: 0; | ||
width: 0; | ||
height: 0; | ||
} | ||
|
||
/* The slider */ | ||
:host .slider { | ||
position: absolute; | ||
cursor: pointer; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
background-color: #ccc; | ||
-webkit-transition: 0.4s; | ||
transition: 0.4s; | ||
} | ||
|
||
:host .slider:before { | ||
position: absolute; | ||
content: ""; | ||
height: 26px; | ||
width: 26px; | ||
left: 4px; | ||
bottom: 4px; | ||
background-color: white; | ||
-webkit-transition: 0.4s; | ||
transition: 0.4s; | ||
} | ||
|
||
:host input:checked + .slider { | ||
background-color: #2196f3; | ||
} | ||
|
||
:host input:focus + .slider { | ||
box-shadow: 0 0 1px #2196f3; | ||
} | ||
|
||
:host input:checked + .slider:before { | ||
-webkit-transform: translateX(26px); | ||
-ms-transform: translateX(26px); | ||
transform: translateX(26px); | ||
} | ||
|
||
/* Rounded sliders */ | ||
:host .slider.round { | ||
border-radius: 34px; | ||
} | ||
|
||
:host .slider.round:before { | ||
border-radius: 50%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.doc-diff-added { | ||
background-color: rgb(171, 242, 188); | ||
text-decoration: none; | ||
} | ||
|
||
.doc-diff-modified { | ||
} | ||
|
||
.doc-diff-removed { | ||
background-color: rgba(255, 129, 130, 0.4); | ||
text-decoration: none; | ||
} |
Oops, something went wrong.