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

Remove unnecessary layout spacing #850

Merged
merged 1 commit into from
Oct 13, 2022
Merged
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
2 changes: 1 addition & 1 deletion src/components/views/LocalModList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
v-if="key.enabled">Disable</a>
<a class='card-footer-item' @click="enableMod(key)" v-else>Enable</a>
</template>
<a class='card-footer-item' @click="viewDependencyList(key)">View associated</a>
<a class='card-footer-item' @click="viewDependencyList(key)">Associated</a>
<Link :url="`${key.getWebsiteUrl()}${key.getVersionNumber().toString()}`"
:target="'external'"
class="card-footer-item">
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/OnlineModList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</template>
<a class='card-footer-item' @click='showDownloadModal(key)'>Download</a>
<Link :url="key.getPackageUrl()" :target="'external'" class='card-footer-item'>
View on Website
Website <i class="fas fa-external-link-alt margin-left margin-left--half-width"></i>
</Link>
<template v-if="key.getDonationLink() !== undefined">
<DonateButton :mod="key"/>
Expand Down
12 changes: 10 additions & 2 deletions src/css/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ select {
// custom
.menu {
display: block;
padding: 1em;
padding: 1em 0 1em 1em;
position: sticky;
top: 0;

Expand Down Expand Up @@ -127,9 +127,9 @@ select {

.row-card {
background-color: rgba(255, 255, 255, 0);
margin: 0 1em 4px 0;
transition: background-color 0.2s, box-shadow 0.2s linear;
border-bottom: 1px solid $scheme-border;
margin: 0 0 4px;

&--expanded {
border-bottom-width: 0;
Expand Down Expand Up @@ -360,6 +360,14 @@ code {
}
}

.margin-left {
margin-left: 1em;

&--half-width {
margin-left: 0.5rem;
}
}

.margin-bottom {
margin-bottom: 1em;
}
Expand Down
45 changes: 17 additions & 28 deletions src/pages/GameSelectionScreen.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,60 +32,38 @@
</div>
<div class="columns">
<div class="column is-full">
<br/>

<div class="sticky-top is-shadowless background-bg z-top">
<div class="container" v-if="viewMode === 'Card'">
<nav class="level">
<div class="container">
<nav class="level mb-2" v-if="viewMode === 'Card'">
<div class="level-item">
<div class="card-header-title">
<div class="input-group input-group--flex margin-right">
<label for="local-search" class="non-selectable">Search</label>
<input id="local-search" v-model='filterText' class="input margin-right" type="text" placeholder="Search for a game"/>
</div>
</div>
</div>
<div>
<br/>
<i class="button fas fa-list" @click="toggleViewMode"></i>
</div>
</nav>
<div class="level">
<div class="level-item">
<div class="tabs">
<ul class="text-center">
<li v-for="(key, index) in gameInstanceTypes" :key="`tab-${key}`"
:class="[{'is-active': activeTab === key}]">
<a @click="changeTab(key)">{{key}}</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container" v-else-if="viewMode === 'List'">
<nav class="level">
<nav class="level mb-2" v-else-if="viewMode === 'List'">
<div class="level-item">
<div class="card-header-title">
<div class="input-group input-group--flex margin-right">
<label for="local-search" class="non-selectable">Search</label>
<input id="local-search" v-model='filterText' class="input margin-right" type="text" placeholder="Search for a game"/>
</div>
</div>
</div>
<div class="margin-right">
<br/>
<a class="button is-info"
:disabled="selectedGame === null && !this.runningMigration" @click="selectGame(selectedGame)">Select
game</a>
</div>
<div class="margin-right">
<br/>
<a class="button"
:disabled="selectedGame === null && !this.runningMigration" @click="selectDefaultGame(selectedGame)">Set as default</a>
</div>
<div>
<br/>
<i class="button fas fa-th-large" @click="toggleViewMode"></i>
</div>
</nav>
Expand All @@ -107,8 +85,7 @@
<article class="media">
<div class="media-content">
<div class="content pad--sides" v-if="viewMode === 'Card'">
<h1 class="title is-4">{{ activeTab }}s</h1>
<div>
<div class="game-cards-container">
<div v-for="(game, index) of filteredGameList" :key="`${index}-${game.displayName}-${selectedGame === game}-${isFavourited(game)}`" class="inline-block margin-right margin-bottom">

<div class="inline">
Expand Down Expand Up @@ -165,7 +142,6 @@
</div>
</a>
</div>
<br/>
</div>
</div>
</article>
Expand Down Expand Up @@ -459,3 +435,16 @@ export default class GameSelectionScreen extends Vue {

}
</script>


<style lang="scss" scoped>
.game-cards-container {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
}
.mb-2 {
margin-bottom: 0.5rem !important;
}
</style>