refact meteo with tailwindcss
This commit is contained in:
@@ -2,21 +2,27 @@
|
||||
<div class="my-2">
|
||||
<h2>Météo</h2>
|
||||
<p v-if="loading"></p>
|
||||
<div v-else class="meteo card my-1">
|
||||
<h3>{{ meteo.city.name }}</h3>
|
||||
<div class="flex flex-end">
|
||||
<div class="flex-1 flex-col flex-end">
|
||||
<div class="meteo-date">{{ dateFormat(meteo.list[0].dt_txt) }}</div>
|
||||
<div><strong>{{ meteo.list[0].main.temp }}</strong> °C</div>
|
||||
<div><strong>{{ meteo.list[0].main.humidity }}</strong> %</div>
|
||||
<div><strong>{{ meteo.list[0].main.pressure }}</strong> hPa</div>
|
||||
</div>
|
||||
<div class="flex-1 text-right">
|
||||
<i v-bind:class="'owf owf-5x owf-' + meteo.list[0].weather[0].id"></i>
|
||||
<div><strong>{{ meteo.list[0].weather[0].description }}</strong></div>
|
||||
<div v-else class="my-1">
|
||||
|
||||
<div class="flex flex-wrap -m-2 mt-2">
|
||||
<div class="w-full sm:w-1/2 md:w-1/3 lg:w-1/4">
|
||||
<div class="bg-orange-300 rounded text-black m-2 p-2 flex flex-col">
|
||||
<h3 class="text-2xl font-bold text-center">{{ meteo.city.name }}</h3>
|
||||
<div class="flex">
|
||||
<div class="flex flex-col justify-end">
|
||||
<div>{{ dateFormat(meteo.list[0].dt_txt) }}</div>
|
||||
<div><strong>{{ meteo.list[0].main.temp }}</strong> °C</div>
|
||||
<div><strong>{{ meteo.list[0].main.humidity }}</strong> %</div>
|
||||
<div><strong>{{ meteo.list[0].main.pressure }}</strong> hPa</div>
|
||||
</div>
|
||||
<div class="flex flex-col flex-1 justify-end items-end">
|
||||
<i v-bind:class="'owf owf-5x owf-' + meteo.list[0].weather[0].id"></i>
|
||||
<div><strong>{{ meteo.list[0].weather[0].description }}</strong></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
1
resources/sass/app.scss
vendored
1
resources/sass/app.scss
vendored
@@ -7,6 +7,7 @@
|
||||
@import "components/btn";
|
||||
@import "components/nav";
|
||||
@import "components/transitions";
|
||||
@import "components/owfont-regular";
|
||||
|
||||
@import "pages/memos";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user