Commits

Crane Jin committed d539ff9

Fixed words navigation bar style issue.

Comments (0)

Files changed (4)

static/styles/mysite.css

 }
 
 .word-nav > ul {
-  list-style: none outside node;
+  list-style: none outside none;
 }
 
 .word-nav > ul > li {

templates/footer.html

 {{define "footer"}}
 <div class="container footer">
-  <p class="pull-right" style="margin-right:20px;">
-  <a class="footer-link" href="#">Back to top</a> 
-  </p>
-  <p style="margin-left:20px;">
-  Powered by
-  <a class="footer-link" href="http://golang.org">Go lang</a> and <a class="footer-link" href="http://www.mongodb.org">MongoDB</a> . Running on <a class="footer-link" href="http://aws.amazon.com/ec2/instance-types/">Amazon Ec2 Linux Micro Instance</a> (613MB memory, 1.0GHz cpu) 
-  </p>
-  <script type="text/javascript">
-    var _gaq = _gaq || [];
-    _gaq.push(['_setAccount', 'UA-26929117-1']);
-    _gaq.push(['_trackPageview']);
+<p class="pull-right" style="margin-right:20px;">
+<a class="footer-link" href="#">Back to top</a> 
+</p>
+<p style="margin-left:20px;">
+Powered by
+<a class="footer-link" href="http://golang.org">Go lang</a> and <a class="footer-link" href="http://www.mongodb.org">MongoDB</a> . Running on <a class="footer-link" href="http://aws.amazon.com/ec2/instance-types/">Amazon Ec2 Linux Micro Instance</a> (613MB memory, 1.0GHz cpu) 
+</p>
+{{if .}}
+{{else}}
+<script type="text/javascript">
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-26929117-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);
-     })();
+(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>
- </div>
- {{end}}
+</script>
+{{end}}
+</div>
+{{end}}

templates/words.html

               {{range .Words}}
               <div class="article row">
                 <h3>
+                  <a name="{{.Item.Word}}"></a>
                   {{.Item.Word}}
-                  <a name="{{.Item.Word}}"></a>
                 </h3>
                 <span class="word-rating" title="weight: {{.Weight}}" style="background-position:{{.RatingOffset}}px 0px;"></span>
                 {{if .Item.Scenes}}
                   {{range .Item.Scenes}}
                   <li>
                     <p>
-                    {{textToHtml .}}
+                    {{safeComment .}}
                     </p>
                   </li>
                   {{end}} 
             </div>
           </div>
         </div>
-        {{template "footer"}}
+        {{template "footer" true}}
         <!--
         <script language="JavaScript" src="http://dict.cn/daily.php"></script>
         -->

templates/wordslist.html

         </div>
       </div>
     </div>
-    {{template "footer"}}
+    {{template "footer" true}}
     <!--
     <script language="JavaScript" src="http://dict.cn/daily.php"></script>
     -->