Commits

dan mackinlay  committed f9daf46

many surprisingly tricky styling changes

  • Participants
  • Parent commits 426f9d4

Comments (0)

Files changed (3)

File _ext/possumpalace.py

     app.add_config_value('cul_username', None, '')
     app.add_config_value('publicness', 'private', True)
     app.add_transform(SuppressBlockquotes)
+
+    #hack to make my inline references not be shit
+
+    from sphinx.domains.std import StandardDomain
+    from sphinx.roles import XRefRole
     
+    StandardDomain.roles ['ref'] = XRefRole(
+        lowercase=True, innernodeclass=nodes.literal,
+        warn_dangling=True)
+
     # see http://sphinx.pocoo.org/ext/appapi.html#sphinx.application.Sphinx.add_object_type
     # this enables
     #app.add_object_type(directivename, rolename, indextemplate='', parse_node=None, ref_nodeclass=None, objname='')
     """
     PossumPalace-specific reST to HTML tweaks.
     """
-
     # Don't use border=1, which docutils does by default.
     def visit_table(self, node):
         self.body.append(self.starttag(node, 'table', CLASS='docutils'))

File _themes/algo/static/algo.css_t

 
 div.content dd {
   margin-left: 1.2em;
-  margin-top: .4em;
-  margin-bottom: 1em;
+  margin-top: 0.4em;
+  margin-bottom: 0.4em;
+}
+div.content dt {
+  margin-left: 0;
+  margin-top: 0.8em;
+}
+/* -- other body styles ----------------------------------------------------- */
+
+ol.arabic {
+    list-style: decimal;
+}
+
+ol.loweralpha {
+    list-style: lower-alpha;
+}
+
+ol.upperalpha {
+    list-style: upper-alpha;
+}
+
+ol.lowerroman {
+    list-style: lower-roman;
+}
+
+ol.upperroman {
+    list-style: upper-roman;
+}
+
+dl {
+    margin-bottom: 15px;
+}
+
+dd p {
+    margin-top: 0px;
+}
+
+dd ul, dd table {
+    margin-bottom: 10px;
+}
+
+dd {
+    margin-top: 3px;
+    margin-bottom: 10px;
+    margin-left: 30px;
+}
+
+dt:target, .highlighted {
+    background-color: #fbe54e;
+}
+
+dl.glossary dt {
+    font-weight: bold;
+    font-size: 1.1em;
+}
+
+.field-list ul {
+    margin: 0;
+    padding-left: 1em;
+}
+
+.field-list p {
+    margin: 0;
+}
+
+.refcount {
+    color: #060;
+}
+
+.optional {
+    font-size: 1.3em;
+}
+
+.versionmodified {
+    font-style: italic;
+}
+
+.system-message {
+    background-color: #fda;
+    padding: 5px;
+    border: 3px solid red;
+}
+
+.footnote:target  {
+    background-color: #ffa;
+}
+
+.line-block {
+    display: block;
+    margin-top: 1em;
+    margin-bottom: 1em;
+}
+
+.line-block .line-block {
+    margin-top: 0;
+    margin-bottom: 0;
+    margin-left: 1.5em;
+}
+
+.guilabel, .menuselection {
+    font-family: sans-serif;
+}
+
+.accelerator {
+    text-decoration: underline;
+}
+
+.classifier {
+    font-style: oblique;
+}
+
+abbr, acronym {
+    border-bottom: dotted 1px;
+    cursor: help;
+}
+
+/* -- code displays --------------------------------------------------------- */
+
+pre {
+    overflow: auto;
+    overflow-y: hidden;  /* fixes display issues on Chrome browsers */
+}
+
+td.linenos pre {
+    padding: 5px 0px;
+    border: 0;
+    background-color: transparent;
+    color: #aaa;
+}
+
+table.highlighttable {
+    margin-left: 0.5em;
+}
+
+table.highlighttable td {
+    padding: 0 0.5em 0 0.5em;
+}
+
+tt.descname {
+    background-color: transparent;
+    font-weight: bold;
+    font-size: 1.2em;
+}
+
+tt.descclassname {
+    background-color: transparent;
+}
+
+tt.xref, a tt {
+    background-color: transparent;
+    font-weight: bold;
+}
+
+h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
+    background-color: transparent;
+}
+
+.viewcode-link {
+    float: right;
+}
+
+.viewcode-back {
+    float: right;
+    font-family: sans-serif;
+}
+
+div.viewcode-block:target {
+    margin: -1px -10px;
+    padding: 0 10px;
+}
+
+/* -- math display ---------------------------------------------------------- */
+
+img.math {
+    vertical-align: middle;
+}
+
+div.body div.math p {
+    text-align: center;
+}
+
+span.eqno {
+    float: right;
+}
+
+/* -- printout stylesheet --------------------------------------------------- */
+
+@media print {
+    div.document,
+    div.documentwrapper,
+    div.bodywrapper {
+        margin: 0 !important;
+        width: 100%;
+    }
+
+    div.sphinxsidebar,
+    div.related,
+    div.footer,
+    #top-link {
+        display: none;
+    }
+}
+
+
+/* -- admonitions ----------------------------------------------------------- */
+
+div.admonition {
+    margin-top: 10px;
+    margin-bottom: 10px;
+    padding: 7px;
+    background-color: #DDD;
+}
+
+div.admonition dt {
+    font-weight: bold;
+}
+
+div.admonition dl {
+    margin-bottom: 0;
+}
+
+div.admonition p.admonition-title {
+    margin-top: 0;
+    margin-bottom: 0.5ex;
+    margin-right: 1ex;
+    font-weight: bold;
+    padding: 0;
+    border-bottom: 1px dashed #000;
+}
+
+div.body p.centered {
+    text-align: center;
+/*    margin-top: 25px;
+*/}
+
+/* Dropdowns */
+.dropdown .collapsed {
+/*  color: #F00;*/
+}
+
+div.dropdown {
+  max-width: {{ theme_dropdownwidth }};
+  font-size: .9em;
+  text-align: left;
+  border-left: 1em solid {{ theme_headerlinkcolor }};
+  border-bottom: 1px solid {{ theme_headerlinkcolor }};
+  padding-left: 0.3em;
+  margin-bottom: 0.3em;
+  margin-top: 0.3em;
+}
+
+div.dropdown h3 {
+  color: #2e3436;
+  font-variant: small-caps;
+  font-size: 130%;
+  margin-bottom: 0;
+  margin-top: 0.3em;
+}
+
+div.dropdown ul {
+  list-style-type: none;
+  margin-left: 2em;
+}
+
+div.dropdown li.toctree-l1 a {
+  display: block;
+/*  padding: 1px;
+  border: 1px solid #dddddd;
+  background-color: #eeeeec;
+  margin-bottom: .4em;
+  padding-left: 3px;
+  color: #2e3436;*/
+}
+
+div.dropdown li.toctree-l2 a {
+  background-color: transparent;
+  border: none;
+  border-bottom: 1px solid #dddddd;
+}
+
+div.dropdown li.toctree-l2:last-child a {
+  border-bottom: none;
+}
+
+div.dropdown li.current, div.dropdown li.current li.current {
+/*  border-right: 5px solid {{ theme_headerlinkcolor }};
+  border-top: 1px dashed {{ theme_headerlinkcolor }};
+  border-bottom: 1px dashed {{ theme_headerlinkcolor }};*/
+  font-weight: bold;
+  list-style-type: none;
+  font-style: italic;
+}
+
+div.dropdown li.current li {
+  font-weight: normal;
+  font-style: italic;
+  list-style-type: none;
+}
+
+div.dropdown li.current li.toctree-l2 a {
+  border-right: none;
+  border-top: none;
+  border-bottom: none;
+}
+
+
+/* Footer ---------------------------------------- */
+
+div.footer {
+  font-size: .8em;
+  background: {{ theme_footerbg }};
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
+
+div.footer, div.footer a {
+  color: {{ theme_footercolor }};
+}
+
+div.footer .right {
+  text-align: right;
+  width: 60%
+}
+
+div.footer .left {
+  text-transform: uppercase;
+  width: 35%
+  
+}
+
+
+/* Styles copied form basic theme */
+
+/* -- search page ----------------------------------------------------------- */
+
+ul.search {
+    margin: 10px 0 0 20px;
+    padding: 0;
+}
+
+ul.search li {
+    padding: 5px 0 5px 20px;
+    background-image: url(file.png);
+    background-repeat: no-repeat;
+    background-position: 0 7px;
+}
+
+ul.search li a {
+    font-weight: bold;
+}
+
+ul.search li div.context {
+    color: #888;
+    margin: 2px 0 0 30px;
+    text-align: left;
+}
+
+ul.keywordmatches li.goodmatch a {
+    font-weight: bold;
+}
+
+/* -- index page ------------------------------------------------------------ */
+
+table.contentstable {
+    width: 90%;
+}
+
+table.contentstable p.biglink {
+    line-height: 150%;
+}
+
+a.biglink {
+    font-size: 1.3em;
+}
+
+span.linkdescr {
+    font-style: italic;
+    padding-top: 5px;
+    font-size: 90%;
+}
+
+/* -- general index --------------------------------------------------------- */
+
+table.indextable td {
+    text-align: left;
+    vertical-align: top;
+}
+
+table.indextable dl, table.indextable dd {
+    margin-top: 0;
+    margin-bottom: 0;
+}
+
+table.indextable tr.pcap {
+    height: 10px;
+}
+
+table.indextable tr.cap {
+    margin-top: 10px;
+    background-color: #f2f2f2;
+}
+
+img.toggler {
+    margin-right: 3px;
+    margin-top: 3px;
+    cursor: pointer;
+}
+
+/*--------------bonus points - mobile styling inline ----------*/
+@media only screen and (max-device-width: 480px) {
+/*    #header a.logo {
+        padding-left: 70px;
+        background-image: url('/images/logo-64x64.png');
+    }*/
 }
 
 /*---------------------- body text styles -------------------------*/
 
 /* I'd really prefer to suppress Sphinx's <em> insertion by stopping it.*/
-div.content a.reference em { font-style: normal; }
+div.content a.reference.internal em { font-style: normal; }
 
 div.content .section {
   margin-top: 1.7em;
   font-size: 80%;
   font-style: italic;
 }
-
-/* Dropdowns */
-.dropdown .collapsed {
-/*  color: #F00;*/
-}
-
-div.dropdown {
-  max-width: {{ theme_dropdownwidth }};
-  font-size: .9em;
-  text-align: left;
-  border-left: 1em solid {{ theme_headerlinkcolor }};
-  border-bottom: 1px solid {{ theme_headerlinkcolor }};
-  padding-left: 0.3em;
-  margin-bottom: 0.3em;
-  margin-top: 0.3em;
-}
-
-div.dropdown h3 {
-  color: #2e3436;
-  font-variant: small-caps;
-  font-size: 130%;
-  margin-bottom: 0;
-  margin-top: 0.3em;
-}
-
-div.dropdown ul {
-  list-style-type: none;
-  margin-left: 2em;
-}
-
-div.dropdown li.toctree-l1 a {
-  display: block;
-/*  padding: 1px;
-  border: 1px solid #dddddd;
-  background-color: #eeeeec;
-  margin-bottom: .4em;
-  padding-left: 3px;
-  color: #2e3436;*/
-}
-
-div.dropdown li.toctree-l2 a {
-  background-color: transparent;
-  border: none;
-  border-bottom: 1px solid #dddddd;
-}
-
-div.dropdown li.toctree-l2:last-child a {
-  border-bottom: none;
-}
-
-div.dropdown li.current, div.dropdown li.current li.current {
-/*  border-right: 5px solid {{ theme_headerlinkcolor }};
-  border-top: 1px dashed {{ theme_headerlinkcolor }};
-  border-bottom: 1px dashed {{ theme_headerlinkcolor }};*/
-  font-weight: bold;
-  list-style-type: none;
-  font-style: italic;
-}
-
-div.dropdown li.current li {
-  font-weight: normal;
-  font-style: italic;
-  list-style-type: none;
-}
-
-div.dropdown li.current li.toctree-l2 a {
-  border-right: none;
-  border-top: none;
-  border-bottom: none;
-}
-
-
-/* Footer */
-
-div.footer {
-  font-size: .8em;
-  background: {{ theme_footerbg }};
-  padding-top: 10px;
-  padding-bottom: 10px;
-}
-
-div.footer, div.footer a {
-  color: {{ theme_footercolor }};
-}
-
-div.footer .right {
-  text-align: right;
-  width: 60%
-}
-
-div.footer .left {
-  text-transform: uppercase;
-  width: 35%
-  
-}
-
-
-/* Styles copied form basic theme */
-
-/* -- search page ----------------------------------------------------------- */
-
-ul.search {
-    margin: 10px 0 0 20px;
-    padding: 0;
-}
-
-ul.search li {
-    padding: 5px 0 5px 20px;
-    background-image: url(file.png);
-    background-repeat: no-repeat;
-    background-position: 0 7px;
-}
-
-ul.search li a {
-    font-weight: bold;
-}
-
-ul.search li div.context {
-    color: #888;
-    margin: 2px 0 0 30px;
-    text-align: left;
-}
-
-ul.keywordmatches li.goodmatch a {
-    font-weight: bold;
-}
-
-/* -- index page ------------------------------------------------------------ */
-
-table.contentstable {
-    width: 90%;
-}
-
-table.contentstable p.biglink {
-    line-height: 150%;
-}
-
-a.biglink {
-    font-size: 1.3em;
-}
-
-span.linkdescr {
-    font-style: italic;
-    padding-top: 5px;
-    font-size: 90%;
-}
-
-/* -- general index --------------------------------------------------------- */
-
-table.indextable td {
-    text-align: left;
-    vertical-align: top;
-}
-
-table.indextable dl, table.indextable dd {
-    margin-top: 0;
-    margin-bottom: 0;
-}
-
-table.indextable tr.pcap {
-    height: 10px;
-}
-
-table.indextable tr.cap {
-    margin-top: 10px;
-    background-color: #f2f2f2;
-}
-
-img.toggler {
-    margin-right: 3px;
-    margin-top: 3px;
-    cursor: pointer;
-}
-
-/*--------------bonus points - mobile styling inline ----------*/
-@media only screen and (max-device-width: 480px) {
-/*    #header a.logo {
-        padding-left: 70px;
-        background-image: url('/images/logo-64x64.png');
-    }*/
-}
-

File default_conf.py

 
 extlinks = {'culref': ('http://www.citeulike.org/user/livingthingdan/article/%s', None)}
 
+html_translator_class = "possumpalace.PossumPalaceHTMLTranslator"