]> rtime.felk.cvut.cz Git - edu/osp-wiki.git/commitdiff
Change integration of google translator
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 20 Feb 2014 15:05:52 +0000 (16:05 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 20 Feb 2014 15:05:52 +0000 (16:05 +0100)
local.css
templates/page.tmpl

index acbc2adf69edb22a7896326030db73a6881a834e..c15a8040aa276b302629c5c59fb1dd87fb160c92 100644 (file)
--- a/local.css
+++ b/local.css
@@ -49,6 +49,12 @@ body {
   left: 0;
 }
 
+#pagebody {
+    position: absolute;
+    top: 107px;
+    width: 100%;
+}
+
 .pageheader .header {
     padding: 1em 1em 1em 1em;
 }
@@ -89,7 +95,6 @@ body {
 }
 
 #content {
-  margin-top: 107px;
   padding-top: 1ex;
   max-width: 60em;
 }
@@ -257,6 +262,12 @@ legend {
   border: 0px;
 }
 
+.sidebar #google_translate_element {
+    position: absolute;
+    bottom: 5px;
+    right: 10px;
+}
+
 .sidebar ul {
   margin:0;
   padding:0;
index 5bb4c857ea0312c911c98325d940933d54a9c1f3..96ad8104df68f7beb7a98bd9760f1ea8034b72ab 100644 (file)
 <TMPL_IF SIDEBAR>
 <TMPL_IF HTML5><aside class="sidebar"><TMPL_ELSE><div class="sidebar"></TMPL_IF>
 <TMPL_VAR SIDEBAR>
+<div id="google_translate_element"></div><script type="text/javascript">
+function googleTranslateElementInit() {
+  new google.translate.TranslateElement({pageLanguage: 'cs', includedLanguages: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element');
+}
+</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
 <TMPL_IF HTML5></aside><TMPL_ELSE></div></TMPL_IF>
 </TMPL_IF>
 
 <TMPL_IF HTML5></section><TMPL_ELSE></div></TMPL_IF>
 
 <div id="pagebody">
-<div id="google_translate_element"></div><script type="text/javascript">
-function googleTranslateElementInit() {
-  new google.translate.TranslateElement({pageLanguage: 'cs', includedLanguages: 'en', layout: google.translate.TranslateElement.FloatPosition.TOP_LEFT}, 'google_translate_element');
-}
-</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
 <TMPL_IF HTML5><section id="content"><TMPL_ELSE><div id="content"></TMPL_IF>
 <TMPL_VAR CONTENT>
 <TMPL_IF HTML5></section><TMPL_ELSE></div></TMPL_IF>