Skip to content

Commit

Permalink
Merge pull request #484 from ananyag309/branch
Browse files Browse the repository at this point in the history
added gtranslator to graph visualizer page
  • Loading branch information
sakeel-103 authored Oct 30, 2024
2 parents 63dd816 + 8c2bbe2 commit 3af90b0
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/app/components/Graphs/acyclicgraph.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@
#backToTop:hover {
background-color: #7a7a7a;
}

.gtranslate_wrapper {
position: fixed; /* Fixed position */
bottom: 20px; /* Distance from the bottom */
left: 20px; /* Distance from the left */
z-index: 1000; /* Ensure it appears above other elements */
}
</style>
</head>

Expand Down Expand Up @@ -141,6 +148,17 @@ <h2>Interactive Acyclic Graph</h2>

<button id="backToTop" onclick="scrollToTop()">Back to Top</button>

<div class="gtranslate_wrapper">
<script>
window.gtranslateSettings = {
"default_language": "en",
"detect_browser_language": true,
"wrapper_selector": ".gtranslate_wrapper"
};
</script>
<script src="https://cdn.gtranslate.net/widgets/latest/popup.js" defer></script>
</div>

<script>
const graphContainer = d3.select('#graphContainer');
const width = graphContainer.node().clientWidth;
Expand Down
8 changes: 8 additions & 0 deletions src/app/components/Graphs/directedgraph.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@
background-color: #7a7a7a;
}
</style>


</head>

<body>
Expand Down Expand Up @@ -142,6 +144,12 @@ <h2>Interactive Directed Graph</h2>

<button id="backToTop" onclick="scrollToTop()">Back to Top</button>

<div style="position: fixed; left: 20px; bottom: 20px; z-index: 1000;">
<div class="gtranslate_wrapper"></div>
<script>window.gtranslateSettings = {"default_language":"en", "detect_browser_language":true,"wrapper_selector":".gtranslate_wrapper"}</script>
<script src="https://cdn.gtranslate.net/widgets/latest/popup.js" defer></script>
</div>

<script>
const graphContainer = d3.select('#graphContainer');
const width = graphContainer.node().clientWidth;
Expand Down
19 changes: 19 additions & 0 deletions src/app/components/Graphs/tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@
.back-to-top:hover {
background-color: #7a7a7a;
}


.gtranslate_wrapper {
position: fixed; /* Fixed position */
bottom: 20px; /* Distance from the bottom */
left: 20px; /* Distance from the left */
z-index: 1000; /* Ensure it appears above other elements */
}
</style>
</head>

Expand Down Expand Up @@ -141,6 +149,17 @@ <h2>Interactive Tree Visualization</h2>

<button class="back-to-top" onclick="scrollToTop()">Back to Top</button>

<div class="gtranslate_wrapper">
<script>
window.gtranslateSettings = {
"default_language": "en",
"detect_browser_language": true,
"wrapper_selector": ".gtranslate_wrapper"
};
</script>
<script src="https://cdn.gtranslate.net/widgets/latest/popup.js" defer></script>
</div>

<script>
const treeContainer = d3.select('#treeContainer');
const width = treeContainer.node().clientWidth;
Expand Down
20 changes: 20 additions & 0 deletions src/app/components/Graphs/undirectedgraph.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@
#backToTop:hover {
background-color: #7a7a7a;
}


.gtranslate_wrapper {
position: fixed; /* Fixed position */
bottom: 20px; /* Distance from the bottom */
left: 20px; /* Distance from the left */
z-index: 1000; /* Ensure it appears above other elements */
}

</style>
</head>

Expand Down Expand Up @@ -141,6 +150,17 @@ <h2>Interactive Undirected Graph</h2>

<button id="backToTop" onclick="scrollToTop()">Back to Top</button>

<div class="gtranslate_wrapper">
<script>
window.gtranslateSettings = {
"default_language": "en",
"detect_browser_language": true,
"wrapper_selector": ".gtranslate_wrapper"
};
</script>
<script src="https://cdn.gtranslate.net/widgets/latest/popup.js" defer></script>
</div>

<script>
const graphContainer = d3.select('#graphContainer');
const width = graphContainer.node().clientWidth;
Expand Down
19 changes: 19 additions & 0 deletions src/app/components/Graphs/weightedgraph.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@
#backToTop:hover {
background-color: #7a7a7a;
}


.gtranslate_wrapper {
position: fixed; /* Fixed position */
bottom: 20px; /* Distance from the bottom */
left: 20px; /* Distance from the left */
z-index: 1000; /* Ensure it appears above other elements */
}
</style>
</head>

Expand Down Expand Up @@ -143,6 +151,17 @@ <h2>Interactive Weighted Graph</h2>

<button id="backToTop" onclick="scrollToTop()">Back to Top</button>

<div class="gtranslate_wrapper">
<script>
window.gtranslateSettings = {
"default_language": "en",
"detect_browser_language": true,
"wrapper_selector": ".gtranslate_wrapper"
};
</script>
<script src="https://cdn.gtranslate.net/widgets/latest/popup.js" defer></script>
</div>

<script>
const graphContainer = d3.select('#graphContainer');
const width = graphContainer.node().clientWidth;
Expand Down

0 comments on commit 3af90b0

Please sign in to comment.