styled search tab and created tabs folder in css directory

This commit is contained in:
Roberto Tonino 2020-05-09 18:47:03 +02:00
parent 0933cb1e5e
commit 13f276f9fa
11 changed files with 69 additions and 49 deletions

View File

@ -1,9 +1,9 @@
@import './normalize.css'; @import './normalize.css';
@import './typography.css'; @import './typography.css';
* { /* * {
transition: background-color 500ms ease-in-out; transition: background-color 500ms ease-in-out;
} } */
html { html {
height: 100%; height: 100%;

View File

@ -138,11 +138,6 @@ p,
margin-left: auto; margin-left: auto;
} }
.secondary-text .material-icons {
font-size: 17px !important;
margin-left: 4px;
}
button { button {
font-family: inherit; font-family: inherit;
font-weight: 600; font-weight: 600;

View File

@ -1,18 +0,0 @@
.search_tabcontent,
.main_tabcontent,
.favorites_tabcontent {
display: none;
}
.main_tabcontent h1 {
margin-bottom: 12px;
}
.tab button {
background-color: var(--primary-background);
color: var(--main-text);
}
.tab button.active {
background-color: var(--accent-color);
}

View File

@ -1,6 +1,19 @@
#main_search > .search_section { #main_search .search_section {
float: none; float: none;
cursor: pointer; cursor: pointer;
border-top: 1px solid var(--separator);
padding-top: 20px;
padding-bottom: 20px;
}
/* Top Result */
.top_result_header {
font-size: 2rem;
}
.search_header {
font-size: 1.75rem;
margin-bottom: 25px;
} }
.top_result { .top_result {
@ -25,11 +38,17 @@
margin-bottom: 4px; margin-bottom: 4px;
} }
.secondary-text { /* Releases */
.release .secondary-text {
opacity: 0.75; opacity: 0.75;
font-size: 14px; font-size: 14px;
} }
.release .secondary-text .material-icons {
font-size: 17px !important;
margin-left: 4px;
}
.release_grid { .release_grid {
display: grid; display: grid;
grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
@ -43,17 +62,6 @@
overflow-y: hidden; overflow-y: hidden;
} }
.release {
display: inline-block;
width: 156px;
}
.release .cover_container {
width: 156px;
height: 156px;
margin-bottom: 10px;
}
.track_row > td > img { .track_row > td > img {
width: 32px; width: 32px;
height: 32px; height: 32px;

View File

@ -0,0 +1,35 @@
@import './download-tab.css';
@import './home-tab.css';
@import './search-tab.css';
@import './settings-tab.css';
@import './tracklist-tab.css';
.search_tabcontent,
.main_tabcontent,
.favorites_tabcontent {
display: none;
}
.main_tabcontent h1 {
margin-bottom: 12px;
}
.tab button {
background-color: var(--primary-background);
color: var(--main-text);
}
.tab button.active {
background-color: var(--accent-color);
}
.release {
display: inline-block;
width: 156px;
}
.release .cover_container {
width: 156px;
height: 156px;
margin-bottom: 10px;
}

View File

@ -10,11 +10,6 @@
@import './modules/sidebar.css'; @import './modules/sidebar.css';
@import './modules/middle-section.css'; @import './modules/middle-section.css';
@import './modules/tabs.css'; @import './modules/tabs/tabs.css';
@import './modules/stackedTabs.css'; @import './modules/stackedTabs.css';
@import './modules/settings.css';
@import './modules/main-search.css';
@import './modules/download-tab.css';
@import './modules/track-preview.css'; @import './modules/track-preview.css';
@import './modules/tracklist-tab.css';
@import './modules/home-tab.css';

View File

@ -65,19 +65,24 @@ <h2>Start searching!</h2>
<!-- ### Main Search Tab ### --> <!-- ### Main Search Tab ### -->
<div id="main_search" class="search_tabcontent"> <div id="main_search" class="search_tabcontent">
<template v-for="section in results.allTab.ORDER"> <template v-for="section in results.allTab.ORDER">
<div <section
v-if="(section != 'TOP_RESULT' && results.allTab[section].data.length > 0) || (results.allTab[section].length > 0)" v-if="(section != 'TOP_RESULT' && results.allTab[section].data.length > 0) || (results.allTab[section].length > 0)"
class="search_section"> class="search_section">
<h1 @click="changeSearchTab(section)">{{ names[section] }}</h1> <h2 @click="changeSearchTab(section)" class="search_header"
:class="{ top_result_header : section === 'TOP_RESULT'}">
{{ names[section] }}
</h2>
<!-- Top result --> <!-- Top result -->
<div v-if="section == 'TOP_RESULT'" class="top_result clickable" @click="handleClickTopResult" <div v-if="section == 'TOP_RESULT'" class="top_result clickable" @click="handleClickTopResult"
:data-id="results.allTab.TOP_RESULT[0].id"> :data-id="results.allTab.TOP_RESULT[0].id">
<div class="cover_container"> <div class="cover_container">
<img :src="results.allTab.TOP_RESULT[0].picture" <img :src="results.allTab.TOP_RESULT[0].picture"
:class="(results.allTab.TOP_RESULT[0].type == 'artist' ? 'circle' : 'rounded') + ' coverart'"></img> :class="(results.allTab.TOP_RESULT[0].type == 'artist' ? 'circle' : 'rounded') + ' coverart'" />
<div role="button" aria-label="download" @contextmenu.prevent="openQualityModal" <div role="button" aria-label="download" @contextmenu.prevent="openQualityModal"
@click.stop="addToQueue" :data-link="results.allTab.TOP_RESULT[0].link" @click.stop="addToQueue" :data-link="results.allTab.TOP_RESULT[0].link"
class="download_overlay"><i class="material-icons">get_app</i></div> class="download_overlay">
<i class="material-icons">get_app</i>
</div>
</div> </div>
<div class="info_box"> <div class="info_box">
<p class="primary-text">{{ results.allTab.TOP_RESULT[0].title }}</p> <p class="primary-text">{{ results.allTab.TOP_RESULT[0].title }}</p>
@ -150,7 +155,7 @@ <h1 @click="changeSearchTab(section)">{{ names[section] }}</h1>
<p class="secondary-text">{{release.NB_SONG+' tracks'}}</p> <p class="secondary-text">{{release.NB_SONG+' tracks'}}</p>
</div> </div>
</div> </div>
</div> </section>
</template> </template>
<div <div
v-if="results.allTab.ORDER.every(section => section == 'TOP_RESULT' ? results.allTab[section].length == 0 : results.allTab[section].data.length == 0)"> v-if="results.allTab.ORDER.every(section => section == 'TOP_RESULT' ? results.allTab[section].length == 0 : results.allTab[section].data.length == 0)">