Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add translate (#6) and fix alignment (#7) #10

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@
<script defer="" src="util.js"></script>
<script defer="" src="translation.js"></script>
<script defer="" src="script.js"></script>

<script
type="text/javascript"
src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"
></script>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement(
{ pageLanguage: "en" },
"google_translate_element"
);
}
</script>

</head>

Expand All @@ -31,7 +44,7 @@
<li><a href="contact/index.html">About Us +</a></li>
<li><a href="contact/index.html">FAQs</a></li>
<li><a href="contact/index.html">Contact Us</a></li>
<div class="text-s">
<!-- <div class="text-s">
<button onclick="fontInc()">
<li class="textsize">A<sup>+</sup></li>
</button>
Expand All @@ -41,7 +54,8 @@
<button onclick="toggleLanguage()">
<li class="textsize">हिन्दी</li>
</button>
</div>
</div> -->
<li id="google_translate_element"></li>
</ul>
</nav>

Expand Down
24 changes: 19 additions & 5 deletions frontend/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,21 @@ nav {

nav ul {
/* margin: 150px auto 0; */
padding: 0;
display: table;
padding: 25px;
display: flex;
align-items: center;
align-content: space-around;
text-align: center;
display: table;
list-style: none;
width: 100%;
justify-content: center;
justify-content: space-evenly;
}

nav ul li {
margin: 0 1rem;
padding: 15px 20px;
display: table-cell;
position: relative;
/* padding: 15px 0; */
}

nav ul li a {
Expand Down Expand Up @@ -99,6 +99,20 @@ nav .logo {
box-sizing: border-box;
}

/* Multiple languages using translate */
#google_translate_element img, .goog-te-banner {
display: none;
}

select.goog-te-combo {
height: 25px;
border-radius: 30px;
}

.goog-logo-link {
height: 1px;
}

/* Font icon + - */
.text-s button {
color: #f4f4f4;
Expand Down