Skip to content

Commit

Permalink
Little changes for flag dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
jayehernandez committed Dec 12, 2020
1 parent 54eabb6 commit 9c26470
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
12 changes: 11 additions & 1 deletion client/src/style/flag.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@
margin-top: $spacing;
margin-left: $spacing;
margin-right: calc(#{$spacing} + 0.2em);

&.mt0 {
margin-top: 0;
}
}

.language-name {
max-width: calc(56px + 2 * #{$spacing});
margin: 0 auto;
}
}

.flag-options {
margin-top: 20px;
margin-bottom: 10px;
color: $primary-color;
}
11 changes: 9 additions & 2 deletions client/src/views/Flag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,20 @@
) {{ flagLanguage | titleize }}
transition(name="fade")
div(v-if="showLanguageDropdown")
.flag-list(v-for="language in otherLanguages")
.flag.fadeIn(v-wow data-wow-duration="2s" :key="dailyData.translations[language].flag")
.flag-options Show in:
.flag-list(v-for="(language, index) in otherLanguages")
.flag.fadeIn(
v-wow
data-wow-duration="2s"
:key="dailyData.translations[language].flag"
v-bind:class=`{ mt0: index === 0 }`
)
i(
:class="dailyData.translations[language].flag"
class="twa twa-4x"
@click="toggleActiveLanguage(language); showLanguageDropdown = false;"
)
.language-name {{ language | titleize }}
</template>

<script>
Expand Down

0 comments on commit 9c26470

Please sign in to comment.