Skip to content

Commit

Permalink
cleaning up the docs (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
dfm committed Mar 18, 2021
1 parent ee3acd6 commit be2f7b0
Show file tree
Hide file tree
Showing 19 changed files with 100 additions and 27 deletions.
Binary file modified docs/_static/favicon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 0 additions & 20 deletions docs/_themes/daft/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,4 @@ <h2>{{ theme_tagline }}</h2>
<a href="https://raw.github.com/daft-dev/daft/master/LICENSE.rst">MIT License</a>.
</div>

<a href="https://github.com/daft-dev/daft" class="github">
<img style="position: absolute; top: 0; right: 0; border: 0;"
src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png" alt="Fork me on GitHub"
class="github" />
</a>

<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-35127040-1']);
_gaq.push(['_trackPageview']);

(function () {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script>

{%- endblock %}
7 changes: 1 addition & 6 deletions docs/_themes/daft/static/code.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
.highlight-python {
border-left: 2px solid #ccc;
padding-left: 10px;
margin-left: -10px;
}

.highlight {
background: none;
margin: 20px;
}

.highlight pre {
Expand Down
23 changes: 22 additions & 1 deletion docs/_themes/daft/static/daft.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ a.headerlink:hover {
font-family: "Source Code Pro", Courier, monospace;
}

.document, .footer, .related {
.document, .footer {
width: 600px;
margin: 0 auto;
padding: 0;
}

.body:first-child h1 {
Expand Down Expand Up @@ -80,6 +81,10 @@ a.headerlink:hover {
text-transform: uppercase;
}

#index-examples {
display: block;
}

#examples-block h2 {
display: none;
}
Expand Down Expand Up @@ -187,3 +192,19 @@ input.searchfield:focus {
margin: 0;
padding: 0;
}

@media only screen and (max-width: 640px) {
.document, .footer {
width: 100%;
margin: 0;
padding: 0;
}

.documentwrapper {
margin: 0 20px;
}

#index-examples {
display: none;
}
}
2 changes: 2 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ Daft

.. raw:: html

<div id="index-examples">
<div id="examples-block"></div>
<div id="more-examples" style="text-align: right;font-size: 0.8em;">
<a href="examples">More…</a>
</div>
</div>
<script src="_static/examples.js?v=2"></script>
<script>
show_examples("_images", "_static", "examples", 6);
Expand Down
Binary file removed images/classic.pdf
Binary file not shown.
Binary file removed images/classic.png
Binary file not shown.
Binary file added images/favicon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions images/favicon.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import daft

with daft.PGM() as pgm:
pgm.add_node(
daft.Node(
"d",
"D",
0,
0,
plot_params=dict(fc="white"),
fontsize=17,
offset=(0, -1),
label_params=dict(fontweight="bold"),
)
)
pgm.render()
pgm.figure.patch.set_facecolor("none")
pgm.ax.patch.set_facecolor("none")
pgm.figure.savefig("favicon.png", transparent=True)
Binary file modified images/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions images/logo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import daft

with daft.PGM() as pgm:
pgm.add_node(
daft.Node(
"d",
"D",
0,
0,
plot_params=dict(fc="#d8dee9"),
fontsize=17,
offset=(0, -2),
label_params=dict(fontweight="bold", color="#2e3440"),
)
)
pgm.add_node(
daft.Node(
"a",
"A",
1,
0,
plot_params=dict(fc="#4c566a"),
fontsize=17,
offset=(0, -2),
label_params=dict(color="#eceff4"),
)
)
pgm.add_node(
daft.Node(
"f",
"F",
2,
0,
plot_params=dict(fc="#d8dee9"),
fontsize=17,
offset=(0, -2),
label_params=dict(color="#2e3440"),
)
)
pgm.add_node(
daft.Node(
"t",
"T",
3,
0,
plot_params=dict(fc="#d8dee9"),
fontsize=17,
offset=(0, -2),
label_params=dict(color="#2e3440"),
)
)
pgm.add_edge("d", "a")
pgm.add_edge("a", "f")
pgm.add_edge("f", "t")
pgm.render()
pgm.figure.savefig("logo.png", transparent=True, dpi=250)
Binary file removed images/nocircles.pdf
Binary file not shown.
Binary file removed images/nocircles.png
Binary file not shown.
Binary file removed images/nogray.pdf
Binary file not shown.
Binary file removed images/nogray.png
Binary file not shown.
Binary file removed images/weaklensing.pdf
Binary file not shown.
Binary file removed images/weaklensing.png
Binary file not shown.
Binary file removed images/wordy.pdf
Binary file not shown.
Binary file removed images/wordy.png
Binary file not shown.

0 comments on commit be2f7b0

Please sign in to comment.