added hotjar code

This commit is contained in:
Gamebrary 2022-08-18 10:59:22 -07:00
parent 0dd6e93024
commit 822a44be22
9 changed files with 191 additions and 223 deletions

View file

@ -14,6 +14,17 @@
<title><%= htmlWebpackPlugin.options.title %></title> <title><%= htmlWebpackPlugin.options.title %></title>
<script src="https://kit.fontawesome.com/4c930ed66a.js" crossorigin="anonymous" /> <script src="https://kit.fontawesome.com/4c930ed66a.js" crossorigin="anonymous" />
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<!-- Hotjar Tracking Code for https://gamebrary.com/ -->
<script>
(function(h,o,t,j,a,r){
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
h._hjSettings={hjid:3114669,hjsv:6};
a=o.getElementsByTagName('head')[0];
r=o.createElement('script');r.async=1;
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
a.appendChild(r);
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
</script>
</head> </head>
<body> <body>
<noscript> <noscript>

View file

@ -24,7 +24,7 @@
<div <div
v-for="board in formattedBoards" v-for="board in formattedBoards"
:key="board.id" :key="board.id"
class="p-2 bg-light mb-2" class="p-2 bg-white mb-2"
> >
<header class="mb-2 d-flex align-items-center"> <header class="mb-2 d-flex align-items-center">
<b-avatar <b-avatar
@ -46,7 +46,7 @@
<b-button <b-button
v-for="(list, listIndex) in board.lists" v-for="(list, listIndex) in board.lists"
:key="`${board.id}-${list.name}`" :key="`${board.id}-${list.name}`"
:variant="isGameInList({ list, gameId }) ? 'success' : 'info'" :variant="isGameInList({ list, gameId }) ? 'success' : 'light'"
block block
clas clas
size="sm" size="sm"
@ -60,32 +60,6 @@
<i :class="`fa-solid ${isGameInList({ list, gameId }) ? 'fa-minus' : 'fa-plus' }`" /> <i :class="`fa-solid ${isGameInList({ list, gameId }) ? 'fa-minus' : 'fa-plus' }`" />
</b-button> </b-button>
<!-- <b-collapse
:id="board.id"
:visible="expandedBoard === board.id"
accordion="my-accordion"
role="tabpanel"
>
<b-list-group flush>
<div
class="d-flex justify-content-between align-items-center"
v-for="(list, listIndex) in board.lists"
:key="`${board.id}-${list.name}`"
:variant="isGameInList({ list, gameId }) ? 'success' : 'transparent'"
button
@click.stop="handleClick({ list, listIndex, board })"
>
<span>
{{ list.name }}
<br />
<small class="text-muted">{{ list.games.length }} games in list</small>
</span>
<i :class="`fa-solid ${isGameInList({ list, gameId }) ? 'fa-minus' : 'fa-plus' }`" />
</div>
</b-list-group>
</b-collapse> -->
</div> </div>
</template> </template>

View file

@ -5,7 +5,7 @@
<template v-else> <template v-else>
<div class="small" v-html="description" /> <div class="small" v-html="description" />
<small class="text-muted">Source: {{ source }}</small> <small class="text-muted mt-n3">Source: {{ source }}</small>
</template> </template>
</div> </div>
</template> </template>
@ -58,9 +58,7 @@ export default {
wikipediaSlug() { wikipediaSlug() {
const wikipediaData = this.game?.websites?.find(({ url, category }) => url && category === WEBSITE_CATEGORIES.WIKIPEDIA); const wikipediaData = this.game?.websites?.find(({ url, category }) => url && category === WEBSITE_CATEGORIES.WIKIPEDIA);
const slug = wikipediaData?.url?.split('/wiki/')?.[1]; return wikipediaData?.url?.split('/wiki/')?.[1];
return slug;
}, },
}, },

View file

@ -1,4 +1,5 @@
<template lang="html"> <template lang="html">
<!-- TODO: fix grac_eighteen and check all options -->
<section class="my-3"> <section class="my-3">
<b-img <b-img
v-for="{ rating, id, logoFormat } in ageRatings" v-for="{ rating, id, logoFormat } in ageRatings"

View file

@ -10,10 +10,8 @@
<b-card <b-card
:img-src="wallpaper.url" :img-src="wallpaper.url"
img-alt="Image" img-alt="Image"
img-top
overlay overlay
footer-class="p-2" footer-class="p-2"
class="bg-light"
tag="article" tag="article"
v-for="wallpaper in sortedWallpapers" v-for="wallpaper in sortedWallpapers"
:key="wallpaper.name" :key="wallpaper.name"

View file

@ -26,188 +26,187 @@
</b-col> </b-col>
<b-col> <b-col>
<b-card> <header class="p-1 mb-3 pl-2 d-flex justify-content-between align-items-center">
<header class="p-1 mb-3 pl-2 d-flex justify-content-between align-items-center"> <h1 class="mb-0">Edit list</h1>
<h1 class="mb-0">Edit list</h1>
<b-button <b-button
variant="success" variant="success"
:to="{ name: 'search', query: { boardId: board.id, listIndex } }" :to="{ name: 'search', query: { boardId: board.id, listIndex } }"
> >
Add games Add games
</b-button> </b-button>
</header> </header>
<form ref="renameListForm" @submit.stop.prevent="saveChanges"> <form ref="renameListForm" @submit.stop.prevent="saveChanges">
<b-form-input <b-form-input
autofocus autofocus
v-model.trim="list.name" v-model.trim="list.name"
:placeholder="$t('board.list.renameListPlaceholder')" :placeholder="$t('board.list.renameListPlaceholder')"
required
/>
<b-alert
v-if="isDuplicate"
class="mt-3 mb-0"
show
variant="warning"
>
{{ $t('board.list.duplicateWarning') }}
</b-alert>
<b-form-group
id="list-sorting"
label="Sort list by:"
label-for="sortField"
>
<b-form-select
id="sortField"
:options="sortOptions"
v-model="list.settings.sortOrder"
required required
/> />
</b-form-group>
<b-alert <!-- TODO: limit field width -->
v-if="isDuplicate" <!-- TODO: move to computed, use help text -->
class="mt-3 mb-0" <b-alert
show class="mb-0 mt-2 small"
variant="warning" show
> :variant="list.settings.sortOrder !== 'sortByCustom' ? 'warning' : 'info'"
{{ $t('board.list.duplicateWarning') }} >
</b-alert> <span v-if="list.settings.sortOrder === 'sortByCustom'">
Games will be added to end of list, drag games to re-order.
</span>
<b-form-group <span v-else-if="list.settings.sortOrder">
id="list-sorting" Games will be sorted by
label="Sort list by:"
label-for="sortField"
>
<b-form-select
id="sortField"
:options="sortOptions"
v-model="list.settings.sortOrder"
required
/>
</b-form-group>
<!-- TODO: limit field width --> <span class="text-lowercase">
<!-- TODO: move to computed, use help text --> {{ $t(`board.list.${list.settings.sortOrder}`)}}
<b-alert
class="mb-0 mt-2 small"
show
:variant="list.settings.sortOrder !== 'sortByCustom' ? 'warning' : 'info'"
>
<span v-if="list.settings.sortOrder === 'sortByCustom'">
Games will be added to end of list, drag games to re-order.
</span> </span>
</span>
</b-alert>
<span v-else-if="list.settings.sortOrder"> <!-- TODO: add another view that uses avatar for game cover (tiny) -->
Games will be sorted by <b-form-group
id="list-view"
label="List view:"
label-for="viewField"
>
<!-- description="We'll never share your email with anyone else." -->
<b-form-select
id="viewField"
:options="viewOptions"
v-model="list.settings.view"
required
/>
</b-form-group>
<span class="text-lowercase"> <b-form-checkbox
{{ $t(`board.list.${list.settings.sortOrder}`)}} v-model="list.settings.showReleaseDates"
</span> name="check-button"
</span> class="mb-2"
</b-alert> switch
>
{{ $t('board.list.showReleaseDates') }}
</b-form-checkbox>
<!-- TODO: add another view that uses avatar for game cover (tiny) --> <!-- TODO: add release date styles: countdown/simple date -->
<b-form-group
id="list-view" <b-form-checkbox
label="List view:" v-model="list.settings.showGameProgress"
label-for="viewField" name="check-button"
class="mb-2"
switch
>
{{ $t('board.list.showGameProgress') }}
</b-form-checkbox>
<b-form-checkbox
v-model="list.settings.highlightCompletedGames"
name="check-button"
class="mb-2"
switch
>
Highlight completed games
</b-form-checkbox>
<b-form-checkbox
v-model="list.settings.showGameNotes"
name="check-button"
class="mb-2"
switch
>
{{ $t('board.list.showGameNotes') }}
</b-form-checkbox>
<b-form-checkbox
v-model="list.settings.showGameTags"
name="check-button"
class="mb-2"
switch
>
{{ $t('board.list.showGameTags') }}
</b-form-checkbox>
<b-form-checkbox
v-model="list.settings.showGameCount"
name="check-button"
switch
>
{{ $t('board.list.showGameCount') }}
</b-form-checkbox>
<b-list-group class="p-2">
<!-- TODO: Clone list -->
<!-- TODO: Move within board -->
<!-- TODO: Move list to different board -->
<!-- TODO: edit lists order goes in board settings -->
<!-- TODO: restore move list -->
<!-- <b-list-group-item>
<small class="text-muted d-flex justify-content-center">Move list</small>
<b-button-group size="sm" class="w-100">
<b-button
v-b-tooltip.hover
:title="$t('board.list.moveLeft')"
:disabled="isFirst"
@click="moveList(listIndex, listIndex - 1)"
>
<i class="fas fa-angle-left fa-fw" aria-hidden />
</b-button>
<b-button
v-b-tooltip.hover
:title="$t('board.list.moveRight')"
:disabled="isLast"
@click="moveList(listIndex, listIndex + 1)"
>
<i class="fas fa-angle-right fa-fw" aria-hidden />
</b-button>
</b-button-group>
</b-list-group-item> -->
</b-list-group>
<footer class="mt-2 d-flex justify-content-between align-items-center">
<b-button
variant="primary"
type="submit"
:disabled="saving || isDuplicate"
> >
<!-- description="We'll never share your email with anyone else." --> <b-spinner small v-if="saving" />
<b-form-select <span v-else>{{ $t('global.save') }}</span>
id="viewField" </b-button>
:options="viewOptions"
v-model="list.settings.view"
required
/>
</b-form-group>
<b-form-checkbox <b-button
v-model="list.settings.showReleaseDates" variant="link"
name="check-button" class="text-danger"
class="mb-2" @click="promptDeleteList"
switch
> >
{{ $t('board.list.showReleaseDates') }} <i class="fas fa-trash-alt fa-fw" aria-hidden />
</b-form-checkbox> {{ $t('board.list.delete') }}
</b-button>
<!-- TODO: add release date styles: countdown/simple date --> </footer>
</form>
<b-form-checkbox
v-model="list.settings.showGameProgress"
name="check-button"
class="mb-2"
switch
>
{{ $t('board.list.showGameProgress') }}
</b-form-checkbox>
<b-form-checkbox
v-model="list.settings.highlightCompletedGames"
name="check-button"
class="mb-2"
switch
>
Highlight completed games
</b-form-checkbox>
<b-form-checkbox
v-model="list.settings.showGameNotes"
name="check-button"
class="mb-2"
switch
>
{{ $t('board.list.showGameNotes') }}
</b-form-checkbox>
<b-form-checkbox
v-model="list.settings.showGameTags"
name="check-button"
class="mb-2"
switch
>
{{ $t('board.list.showGameTags') }}
</b-form-checkbox>
<b-form-checkbox
v-model="list.settings.showGameCount"
name="check-button"
switch
>
{{ $t('board.list.showGameCount') }}
</b-form-checkbox>
<b-list-group class="p-2">
<!-- TODO: Clone list -->
<!-- TODO: Move within board -->
<!-- TODO: Move list to different board -->
<!-- TODO: edit lists order goes in board settings -->
<b-list-group-item>
<small class="text-muted d-flex justify-content-center">Move list</small>
<b-button-group size="sm" class="w-100">
<b-button
v-b-tooltip.hover
:title="$t('board.list.moveLeft')"
:disabled="isFirst"
@click="moveList(listIndex, listIndex - 1)"
>
<i class="fas fa-angle-left fa-fw" aria-hidden />
</b-button>
<b-button
v-b-tooltip.hover
:title="$t('board.list.moveRight')"
:disabled="isLast"
@click="moveList(listIndex, listIndex + 1)"
>
<i class="fas fa-angle-right fa-fw" aria-hidden />
</b-button>
</b-button-group>
</b-list-group-item>
</b-list-group>
<footer class="mt-2 d-flex justify-content-between align-items-center">
<b-button
variant="primary"
type="submit"
:disabled="saving || isDuplicate"
>
<b-spinner small v-if="saving" />
<span v-else>{{ $t('global.save') }}</span>
</b-button>
<b-button
variant="link"
class="text-danger"
@click="promptDeleteList"
>
<i class="fas fa-trash-alt fa-fw" aria-hidden />
{{ $t('board.list.delete') }}
</b-button>
</footer>
</form>
</b-card>
</b-col> </b-col>
</b-row> </b-row>
</b-container> </b-container>

View file

@ -6,7 +6,7 @@
<b-spinner v-if="loading" class="spinner-centered" /> <b-spinner v-if="loading" class="spinner-centered" />
<template v-else-if="game"> <template v-else-if="game">
<portal to="headerActions"> <portal to="headerActions" v-if="user">
<b-button <b-button
v-if="!tagsApplied.length" v-if="!tagsApplied.length"
rounded rounded

View file

@ -1,23 +1,9 @@
<template lang="html"> <template lang="html">
<div> <div>
<header> <h1 class="display-5 mb-3 text-center">Organize your video games beautifully.</h1>
<b-container> <p class="lead text-muted mb-5 field ml-auto mr-auto text-center">Learn about games, take notes, organize, customize, discover and more with Gamebrary</p>
<b-row>
<b-col cols="6">
<div class="mb-5 mb-lg-0 text-center text-lg-start align-items-center">
<h1 class="display-4 mb-3">Organize your video games beautifully.</h1>
<p class="lead text-muted mb-5">Learn about games, take notes, organize, customize, discover and more with Gamebrary</p>
</div>
</b-col>
<b-col cols="6"> <!-- <section class="p-5 bg-light">
<div class="px-5 px-sm-0"><img class="img-fluid rounded-circle" src="https://source.unsplash.com/u8Jn2rzYIps/900x900" alt="..." /></div>
</b-col>
</b-row>
</b-container>
</header>
<section class="p-5 bg-light">
<div class="row align-items-center"> <div class="row align-items-center">
<div class="col-lg-8 order-lg-1 mb-5 mb-lg-0"> <div class="col-lg-8 order-lg-1 mb-5 mb-lg-0">
<div class="container-fluid px-5"> <div class="container-fluid px-5">
@ -64,9 +50,9 @@
</div> </div>
</div> </div>
</section> </section> -->
<section class="bg-success text-center py-4"> <!-- <section class="bg-success text-center py-4">
<h2 class="text-white display-4 mb-4"> <h2 class="text-white display-4 mb-4">
Get started. Get started.
<br /> <br />
@ -74,7 +60,7 @@
</h2> </h2>
<a class="btn btn-outline-light py-3 px-4 rounded-pill" href="https://startbootstrap.com/theme/new-age" target="_blank">Download for free</a> <a class="btn btn-outline-light py-3 px-4 rounded-pill" href="https://startbootstrap.com/theme/new-age" target="_blank">Download for free</a>
</section> </section> -->
<public-page-footer /> <public-page-footer />
</div> </div>

View file

@ -45,6 +45,7 @@ $h6-font-size: $font-size-base * .5 !default;
// //
// $small-font-size: 80% !default; // $small-font-size: 80% !default;
// //
$paragraph-margin-bottom: .75rem !default;
$text-muted: $muted !default; $text-muted: $muted !default;
// //
// $blockquote-small-color: $gray-600 !default; // $blockquote-small-color: $gray-600 !default;