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

Commit #902

Closed
Closed
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
15 changes: 14 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@

<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<!-- <link rel="icon" href="./agriculture-icon-png-2804.png" type="'image/png"> -->

<!-- translator scripts -->
<script src="https://translate.google.com/translate_a/element.js?cb=loadGoogleTranslate" ></script>
</head>

<body>
Expand Down Expand Up @@ -86,7 +89,11 @@
<a href="login.html">
<button id="log-in-btn" class="login-btn">Login</button>
</a>
</nav>

<a>
<div id="google_element" align="right" > </div>

</a> </nav>
</header>

<section class="home" id="home">
Expand Down Expand Up @@ -453,6 +460,12 @@ <h2>Quick Links</h2>

<script>

// Translator script
function loadGoogleTranslate(){
new google.translate.TranslateElement("google_element");

}

window.addEventListener('scroll', function() {
var scrollPosition = window.scrollY;
var backToTopButton = document.getElementById('backtoTop');
Expand Down
25 changes: 24 additions & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,30 @@ section {
color: transparent;
}
}

#google_element{
width: 250px;
}
.VIpgJd-ZVi9od-l4eHX-hSRGPd{
display: none !important;}
.VIpgJd-ZVi9od-ORHb-OEVmcd{
display: none;
}
.VIpgJd-ZVi9od-l4eHX-hSRGPd{
display: none;
}
.skiptranslate{
font-size: 0 !important;
}
.VIpgJd-ZVi9od-ORHb{
display: none !important;
background: none !important;
text:none !important;
}
.VIpgJd-ZVi9od-ORHb-OEVmcd .skiptranslate{
display: none !important;
background: none !important;
visibility: hidden !important;}

.navbar a:not(.active):hover {
color: var(--main-color);
}
Expand Down