Skip to content

Commit f91e8b0

Browse files
committed
Components rounded
1 parent c385159 commit f91e8b0

15 files changed

+63
-142
lines changed

assets/css/main.css

+6-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
}
1010

1111
.title {
12-
@apply p-2 text-center font-semibold select-none bg-gray-200 text-gray-700 dark:bg-gray-600 dark:text-gray-100 old:bg-brown-200 old:text-brown-700
12+
@apply p-2 rounded-lg text-center font-semibold select-none bg-gray-200 text-gray-700 dark:bg-gray-600 dark:text-gray-100 old:bg-brown-200 old:text-brown-700
1313
}
1414

1515
.text-color {
@@ -30,4 +30,8 @@
3030

3131
.favorited-verse {
3232
@apply bg-gray-300/50 dark:bg-gray-600/50 old:bg-brown-300/50
33-
}
33+
}
34+
35+
button {
36+
@apply hover:brightness-95 dark:hover:brightness-110 old:hover:brightness-95 active:translate-y-[1px]
37+
}

assets/json/db.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@
5858
"name": "Sem Serifa"
5959
}
6060
]
61-
}
61+
}

components/Footer.vue

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="grid py-3" :style="`grid-template-columns: repeat(${menu.length}, minmax(0, 1fr));`">
2+
<div class="footer" :style="`grid-template-columns: repeat(${menu.length}, minmax(0, 1fr));`">
33
<button
44
v-for="(item, index) in menu"
55
:key="index"
@@ -19,6 +19,7 @@ import bookOpenIcon from '@/static/heroicons/mini/book-open.svg?inline'
1919
import cog8ToothIcon from '@/static/heroicons/mini/cog-8-tooth.svg?inline'
2020
import magnifyingGlassIcon from '@/static/heroicons/mini/magnifying-glass.svg?inline'
2121
import bookmarkIcon from '@/static/heroicons/mini/bookmark.svg?inline';
22+
2223
export default {
2324
components: { homeIcon, bookOpenIcon, cog8ToothIcon, magnifyingGlassIcon, bookmarkIcon },
2425
data() {
@@ -75,10 +76,13 @@ export default {
7576
</script>
7677

7778
<style scoped>
79+
.footer {
80+
@apply grid p-3 mt-0.5 rounded-t-xl bg-gray-300 dark:bg-gray-700 old:bg-brown-300
81+
}
7882
.btn {
79-
@apply flex flex-col items-center justify-center space-y-1 outline-none text-gray-600 dark:text-gray-400 old:text-brown-600 transition-all duration-100 select-none
83+
@apply flex flex-col items-center justify-center space-y-1 outline-none text-gray-500 dark:text-gray-500 old:text-brown-500 select-none
8084
}
8185
.btn-active {
82-
@apply text-gray-800 dark:text-white old:text-brown-800
86+
@apply text-gray-800 dark:text-gray-200 old:text-brown-800
8387
}
8488
</style>

components/Header.vue

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="font-semibold py-3 px-2 w-full select-none shadow z-10">
2+
<div class="header">
33
<slot></slot>
44
</div>
55
</template>
@@ -11,5 +11,7 @@ export default {
1111
</script>
1212

1313
<style>
14-
15-
</style>
14+
.header {
15+
@apply font-semibold p-3 mb-0.5 w-full select-none shadow z-10 rounded-b-lg bg-gray-300 dark:bg-gray-700 old:bg-brown-300
16+
}
17+
</style>

layouts/default.vue

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
<script>
1313
import { mapGetters, mapMutations } from 'vuex'
14+
1415
export default {
1516
created() {
1617
this.UPDATE_VERSION()

nuxt.config.js

+1-10
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,7 @@ export default {
4444
],
4545

4646
// Modules: https://go.nuxtjs.dev/config-modules
47-
modules: [
48-
// https://go.nuxtjs.dev/axios
49-
'@nuxtjs/axios',
50-
],
51-
52-
// Axios module configuration: https://go.nuxtjs.dev/config-axios
53-
axios: {
54-
// Workaround to avoid enforcing hard-coded localhost:3000: https://github.com/nuxt-community/axios-module/issues/308
55-
baseURL: '/',
56-
},
47+
modules: [],
5748

5849
// Build Configuration: https://go.nuxtjs.dev/config-build
5950
build: {

package-lock.json

-92
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"generate": "nuxt generate"
1010
},
1111
"dependencies": {
12-
"@nuxtjs/axios": "^5.13.6",
1312
"@nuxtjs/svg": "^0.4.1",
1413
"core-js": "^3.25.3",
1514
"nuxt": "^2.15.8",

pages/about.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import arrowlongleftIcon from '@/static/heroicons/mini/arrow-long-left.svg?inline'
3535
import newWindowIcon from '@/static/svgrepo/new-window.svg?inline'
3636
import db from '~/assets/json/db.json'
37+
3738
export default {
3839
components: {
3940
arrowlongleftIcon,
@@ -46,7 +47,7 @@ export default {
4647
{
4748
type: 'text',
4849
title: 'Versão',
49-
value: '2.0.0'
50+
value: '3.0.0'
5051
},
5152
{
5253
type: 'array',

pages/bible.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<div v-if="!getBook && !loading" class="h-full">
4242
<div class="flex flex-col h-full">
4343
<div class="divider-y">
44-
<h2 class="sticky top-0 title">Antigo Testamento</h2>
44+
<h2 class="sticky top-0 title z-10 mb-0.5">Antigo Testamento</h2>
4545
<button
4646
v-for="(item, index) in filteredOldTestament" :key="index"
4747
class="text-left font-normal p-2 outline-none select-none"
@@ -50,7 +50,7 @@
5050
</button>
5151
</div>
5252
<div class="divider-y">
53-
<h2 class="sticky top-0 title">Novo Testamento</h2>
53+
<h2 class="sticky top-0 title z-10 mb-0.5">Novo Testamento</h2>
5454
<button
5555
v-for="(item, index) in filteredNewTestament" :key="index"
5656
class="text-left font-normal p-2 outline-none select-none"
@@ -61,7 +61,7 @@
6161
</div>
6262
</div>
6363
<div v-else class="h-full relative">
64-
<div v-if="getBook && !getChapter" class="grid grid-cols-6 gap-1 p-1">
64+
<div v-if="getBook && !getChapter" class="grid grid-cols-6 gap-1 pt-0.5 px-1">
6565
<button
6666
v-for="chapter in uniqueChapters" :key="chapter.id"
6767
class="btn-chapter"
@@ -70,7 +70,7 @@
7070
</button>
7171
</div>
7272
<div v-if="getBook && getChapter" class="h-full">
73-
<div class="flex flex-col space-y-2 overflow-y-auto h-full relative" ref="scrollContainer">
73+
<div class="flex flex-col overflow-y-auto h-full relative" ref="scrollContainer">
7474
<div class="flex flex-col mb-auto">
7575
<div v-for="verseItem in filteredChapter" :key="verseItem.id" class="flex flex-col">
7676
<span
@@ -429,7 +429,7 @@ export default {
429429
430430
<style scoped>
431431
.btn-chapter {
432-
@apply p-1 bg-gray-200 dark:bg-gray-700 old:bg-brown-200 border border-gray-300 dark:border-gray-600 old:border-brown-300 outline-none select-none
432+
@apply p-1 rounded-lg bg-gray-200 dark:bg-gray-700 old:bg-brown-200 border border-gray-300 dark:border-gray-600 old:border-brown-300 outline-none select-none
433433
}
434434
.btn-prev-next {
435435
@apply p-2 select-none outline-none transition duration-100 rounded-full text-gray-800 hover:bg-gray-800/30 dark:text-gray-50 hover:dark:bg-gray-100/30 old:text-brown-800 hover:old:bg-brown-800/30

pages/favorite.vue

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import copyIcon from '@/static/svgrepo/copy.svg?inline';
3838
import bookmarkIcon from '@/static/heroicons/mini/bookmark.svg?inline';
3939
import bookmarkSlashIcon from '@/static/heroicons/mini/bookmark-slash.svg?inline';
4040
import LoadingPage from '~/components/Loading.vue'
41+
4142
export default {
4243
components: { arrowlongleftIcon, copyIcon, bookmarkIcon, bookmarkSlashIcon, LoadingPage },
4344
data() {

pages/index.vue

+22-18
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,18 @@
55
</Header>
66
<div class="h-full">
77
<LoadingPage v-if="loading" />
8-
<div v-if="!loading && verseOfTheDay" class="p-1">
9-
<div class="px-4 py-2 rounded bg-gray-200 text-gray-700 dark:bg-gray-600 dark:text-gray-100 old:bg-brown-200 old:text-brown-700">
10-
<span class="font-semibold select-none">{{ getBookAndChapterName(verseOfTheDay.book_number, verseOfTheDay.chapter, verseOfTheDay.verse) }}</span>
11-
<button class="select-none text-left" @click.prevent="goToText(verseOfTheDay)">
12-
<span v-html="$changeTags(verseOfTheDay.text)"></span>
13-
</button>
14-
</div>
15-
</div>
16-
<div v-if="!loading && !verseOfTheDay" class="flex items-center justify-center h-full text-color">
17-
<p class="select-none">Nenhum versículo encontrado</p>
8+
<div v-else class="flex items-center justify-center h-full px-2">
9+
<template v-if="verseOfTheDay">
10+
<div class="p-6 rounded-lg bg-gray-200 text-gray-700 dark:bg-gray-600 dark:text-gray-100 old:bg-brown-200 old:text-brown-700">
11+
<span class="font-semibold select-none text-lg">{{ getBookAndChapterName(verseOfTheDay.book_number, verseOfTheDay.chapter, verseOfTheDay.verse) }}</span>
12+
<button class="select-none text-left text-2xl" @click.prevent="goToText(verseOfTheDay)">
13+
<span class="leading-8 tracking-wide" v-html="$changeTags(verseOfTheDay.text)" />
14+
</button>
15+
</div>
16+
</template>
17+
<template v-if="!verseOfTheDay">
18+
<p class="select-none text-color">Nenhum versículo encontrado</p>
19+
</template>
1820
</div>
1921
</div>
2022
</div>
@@ -57,23 +59,25 @@ export default {
5759
}
5860
this.loading = false;
5961
},
60-
getIndexSeed() {
62+
getDayOfYear() {
6163
const today = new Date();
62-
const day = today.getDate();
63-
const month = today.getMonth() + 1;
64-
const year = today.getFullYear();
65-
return day + month + year;
64+
const startOfYear = new Date(today.getFullYear(), 0, 0);
65+
const diff = today - startOfYear;
66+
const oneDay = 1000 * 60 * 60 * 24;
67+
const dayOfYear = Math.floor(diff / oneDay);
68+
return dayOfYear;
6669
},
67-
6870
getVerseOfTheDay() {
6971
const totalVerses = this.verses.length;
72+
const totalDaysInYear = 365;
73+
const dayOfYear = this.getDayOfYear();
74+
7075
if (totalVerses === 0) {
7176
this.verseOfTheDay = null;
7277
return;
7378
}
7479
75-
const indexSeed = this.getIndexSeed();
76-
const verseIndex = indexSeed % totalVerses;
80+
const verseIndex = Math.floor((dayOfYear / totalDaysInYear) * totalVerses);
7781
7882
this.verseOfTheDay = this.verses[verseIndex] ? {
7983
book_number: this.verses[verseIndex].book_number,

0 commit comments

Comments
 (0)