[monodoc] Fix the root display once and for all: web does not do editing
authorMiguel de Icaza <miguel@gnome.org>
Tue, 28 Dec 2010 19:05:28 +0000 (14:05 -0500)
committerMiguel de Icaza <miguel@gnome.org>
Wed, 29 Dec 2010 01:56:11 +0000 (20:56 -0500)
mcs/tools/monodoc/Monodoc/provider.cs
mcs/tools/monodoc/Resources/home.html

index 2d74d601b5abd9b28bb7087ee0840da1b023456f..552c27498c994d6127e8e42a7a94feb0cf6a6ee8 100644 (file)
@@ -1454,12 +1454,16 @@ public class RootTree : Tree {
                                sb.Replace ("@@FONT_FAMILY@@", SettingsHandler.Settings.preferred_font_family);
                                sb.Replace ("@@FONT_SIZE@@", SettingsHandler.Settings.preferred_font_size.ToString());
                                //contributions
+                               var visible = SettingsHandler.Settings.EnableEditing ? "block;" : "none;";
                                if ((oldContrib + contribs) == 0) {
                                        sb.Replace ("@@CONTRIB_DISP@@", "display: none;");
+                                        sb.Replace ("@@NO_CONTRIB_DISP@@", "display: " + visible);
                                } else {
+                                       sb.Replace ("@@CONTRIB_DISP@@", "display: " + visible);
                                        sb.Replace ("@@NO_CONTRIB_DISP@@", "display: none;");
                                        sb.Replace ("@@CONTRIBS@@", con.ToString ());
                                }
+                               sb.Replace ("@@EDITING_ENABLED@@", "display: " + visible);
                                        
                                // load the url of nodes
                                String add_str;
index dc8c5460e5225e8eb297439e96589ddb74a89d39..573f64355d581434b16684d401f10ab57a0d62bd 100644 (file)
@@ -7,18 +7,6 @@ body, table {
        font-size: @@FONT_SIZE@@%;
 }
 
-#title {
-       width: 94%;
-       margin-left: 1%;
-       padding: 2%;
-       border: 2px solid black;
-       background: #b0c4de;
-       font-size: 140%;
-       font-weight: bold;
-       font-variant: small-caps;
-       text-align: center;
-       }
-
 /* ECMA BLOCK */
 #docs {
        margin-bottom: 1em;
@@ -32,12 +20,14 @@ body, table {
        color: black;
        background: #fff3f3;
        border: 1px solid #ffc9c9;
+       @@EDITING_ENABLED@@
        }
 #contribTitle {
        text-align: left;
        font-weight: bold;
        padding: .4em;
        font-size: 110%;
+       @@CONTRIB_DISP@@
 }
 #contrib #content {
        padding: .4em;
@@ -52,25 +42,58 @@ body, table {
        text-indent: 1em;
        text-align: justify;
        }
+#header
+{
+    position: relative;
+    margin-bottom: 0px;
+    color: #000;
+    padding: 0 0 0 15px;
+    background: url('headerbg.png');
+    background-position: right;
+    background-repeat: no-repeat;
+    background-color: #679EF1;
+    height: 40px;
+    border-bottom: 1px solid #98C2F7;
+    border-bottom: 1px dotted #3363BD;
+}
+
+#header h1
+{
+    font-weight: bold;
+    padding: 0;
+    margin: 0;
+    color: #fff;
+    border: none;
+    line-height: 1.8em;
+    font-family: Arial, Helvetica, sans-serif;
+    font-size: 22px !important;
+}
 </style>
+<link type="text/css" rel="stylesheet" href="mono-ecma.css"/>
 </head>
 
-<div id="title">Mono Documentation Library</div>
-
-<div id="docs">
-       <ul>
-           @@API_DOCS@@
-       </ul>
+<div id="header">
+  <div id="title">
+    <h1>Mono Documentation Library</h1>
+  </div>
 </div>
 
-<div id="contrib">
-       <div id="contribTitle">Contributions</div>
-       <div id="content">
-               <div id="some-contrib">
-                       @@CONTRIBS@@
-               </div>
-               <div id="no-contrib">
-                       <p><b>You have not made any contributions yet.</b></p>
-                       <p>The Documentation of the libraries is not complete and your contributions would be greatly appreciated. The procedure is easy, browse to the part of the documentation you want to contribute to and click on the <font color="blue">[Edit]</font> link to start writing documentation.</p>
-                       <p>When you are happy with your changes, use the Contributing--&gt; Upload Contribution--&gt; menu to send your contributions to our server.</p></div>  </div>
+<div class="Content">
+  <div id="docs">
+       <ul>
+           @@API_DOCS@@
+       </ul>
+  </div>
+  
+  <div id="contrib">
+       <div id="contribTitle">Contributions</div>
+       <div id="content">
+               <div id="some-contrib">
+                       @@CONTRIBS@@
+               </div>
+               <div id="no-contrib">
+                       <p><b>You have not made any contributions yet.</b></p>
+                       <p>The Documentation of the libraries is not complete and your contributions would be greatly appreciated. The procedure is easy, browse to the part of the documentation you want to contribute to and click on the <font color="blue">[Edit]</font> link to start writing documentation.</p>
+                       <p>When you are happy with your changes, use the Contributing--&gt; Upload Contribution--&gt; menu to send your contributions to our server.</p></div>  </div>
+  </div>
 </div>