Skip to content

Commit ddda951

Browse files
authored
Added pytorch-ignite docs nav bar button (#310)
1 parent 806abf8 commit ddda951

File tree

3 files changed

+30
-7
lines changed

3 files changed

+30
-7
lines changed

src/components/NavBar.vue

+9-6
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
<span class="pname">Code Generator</span>
1212
</RouterLink>
1313
</h1>
14-
<div class="left-side-badges">
14+
<div class="right-side-badges">
15+
<NavIgniteDocs />
16+
<NavIgniteWebsite />
1517
<NavHelp />
1618
<NavGitHub />
1719
<NavTwitter />
@@ -24,7 +26,6 @@
2426
>
2527
v{{ version }}@{{ currentCommit.slice(0, 7) }}
2628
</a>
27-
<NavIgniteWebsite />
2829
</div>
2930
</nav>
3031
</template>
@@ -36,6 +37,7 @@ import NavDownload from './NavDownload.vue'
3637
import NavColab from './NavColab.vue'
3738
import NavGitHub from './NavGitHub.vue'
3839
import NavIgniteWebsite from './NavIgniteWebsite.vue'
40+
import NavIgniteDocs from './NavIgniteDocs.vue'
3941
import NavTwitter from './NavTwitter.vue'
4042
import NavHelp from './NavHelp.vue'
4143
@@ -47,7 +49,8 @@ export default {
4749
NavGitHub,
4850
NavIgniteWebsite,
4951
NavTwitter,
50-
NavHelp
52+
NavHelp,
53+
NavIgniteDocs
5154
},
5255
setup() {
5356
const currentCommit = __COMMIT__ // from vite.config.js
@@ -76,10 +79,10 @@ h1 img {
7679
justify-content: space-between;
7780
border-bottom: 1px solid var(--c-white-dark);
7881
}
79-
.left-side-badges {
82+
.right-side-badges {
8083
display: flex;
81-
align-items: center;
82-
font-size: 0.9em;
84+
align-items: right;
85+
font-size: 0.95em;
8386
}
8487
/* media queries */
8588
@media (max-width: 915px) {

src/components/NavIgniteDocs.vue

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<template>
2+
<a
3+
class="external-links"
4+
href="https://pytorch.org/ignite/engine.html"
5+
target="_blank"
6+
rel="noopener noreferrer"
7+
>
8+
<svg width="1.4em" height="1.4em" viewBox="0 0 240 240" class="icons">
9+
<path
10+
d="M125,236.82c-30.69,0-56.73-20.71-71.42-56.83-12.9-31.73-1.6-67.37,7-78.55l7.13-9.25,1,11.64c1,11.43,9.06,25.07,16.9,28.63a7.84,7.84,0,0,0,3.55.8C79.41,110.19,81.23,85.85,86,71.41c9-26.9,31.26-45.92,44.05-52.15L136.81,16l-.17,7.46c-.47,21.53.89,39.23,9.1,55.65,5.32,10.64,12.45,21.08,18.73,30.29,1.73,2.53,3.41,5,5,7.37,12,17.94,12.14,36.6,8.32,48.07a60.53,60.53,0,0,1-9.75,17.9c-5.25,6.63-11.47,11.39-18,13.75l-3.1-8.57c10.58-3.83,18.93-16.15,22.2-26,3.14-9.43,2.89-24.93-7.25-40.14-1.57-2.35-3.23-4.78-4.94-7.28-6.45-9.45-13.76-20.16-19.36-31.36-7.94-15.89-10.08-32.44-10.14-51.74-11.21,7.78-26.16,23.08-32.75,42.85-1,3-9.51,30.6,4.68,59.37l1.69,3.44L98,139.36a15.53,15.53,0,0,1-16.12,1.41C73.49,137,66.45,127.08,62.62,117c-5.38,13.93-9.52,37.67-.61,59.58,13.22,32.5,36.17,51.14,63,51.14,27.47,0,51.78-18.88,65-50.49,6.16-14.69,7.17-37.43,2.42-54.07-3.54-12.38-8.82-22.49-17.9-36.75-2.28,4.85-5.43,9.82-8.63,12l-5.06-7.58c2.63-1.75,7.19-11,8.08-15.41l2.16-10.92,6.12,9.3c12.43,18.92,19.56,31.37,24,46.91,5.35,18.72,4.2,43.43-2.78,60.09-6.87,16.4-17,30.25-29.2,40C156.1,231.27,140.8,236.82,125,236.82Z"
11+
fill="currentColor"
12+
></path>
13+
</svg>
14+
<span class="icon-text">PyTorch-Ignite Docs</span>
15+
</a>
16+
</template>
17+
18+
<style scoped>
19+
@import url('./css/nav-right.css');
20+
</style>

src/components/NavIgniteWebsite.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<svg width="1.4em" height="1.4em" viewBox="0 0 240 240" class="icons">
99
<path
1010
d="M125,236.82c-30.69,0-56.73-20.71-71.42-56.83-12.9-31.73-1.6-67.37,7-78.55l7.13-9.25,1,11.64c1,11.43,9.06,25.07,16.9,28.63a7.84,7.84,0,0,0,3.55.8C79.41,110.19,81.23,85.85,86,71.41c9-26.9,31.26-45.92,44.05-52.15L136.81,16l-.17,7.46c-.47,21.53.89,39.23,9.1,55.65,5.32,10.64,12.45,21.08,18.73,30.29,1.73,2.53,3.41,5,5,7.37,12,17.94,12.14,36.6,8.32,48.07a60.53,60.53,0,0,1-9.75,17.9c-5.25,6.63-11.47,11.39-18,13.75l-3.1-8.57c10.58-3.83,18.93-16.15,22.2-26,3.14-9.43,2.89-24.93-7.25-40.14-1.57-2.35-3.23-4.78-4.94-7.28-6.45-9.45-13.76-20.16-19.36-31.36-7.94-15.89-10.08-32.44-10.14-51.74-11.21,7.78-26.16,23.08-32.75,42.85-1,3-9.51,30.6,4.68,59.37l1.69,3.44L98,139.36a15.53,15.53,0,0,1-16.12,1.41C73.49,137,66.45,127.08,62.62,117c-5.38,13.93-9.52,37.67-.61,59.58,13.22,32.5,36.17,51.14,63,51.14,27.47,0,51.78-18.88,65-50.49,6.16-14.69,7.17-37.43,2.42-54.07-3.54-12.38-8.82-22.49-17.9-36.75-2.28,4.85-5.43,9.82-8.63,12l-5.06-7.58c2.63-1.75,7.19-11,8.08-15.41l2.16-10.92,6.12,9.3c12.43,18.92,19.56,31.37,24,46.91,5.35,18.72,4.2,43.43-2.78,60.09-6.87,16.4-17,30.25-29.2,40C156.1,231.27,140.8,236.82,125,236.82Z"
11-
fill="currentColor"
11+
fill="darkred"
1212
></path>
1313
</svg>
1414
<span class="icon-text">pytorch-ignite.ai</span>

0 commit comments

Comments
 (0)