X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FMoveList.vue;h=6385ea0d8160f2a989e93e9e6297677d0f33ecb7;hb=ad16f8397b0d8a22897537e2f76b4388182a84af;hp=70756cc3d4ff0be7b4ca5eabbe363f2cb54f9bfd;hpb=430a203855578f9bbf4c851165c6066a741ff1f8;p=vchess.git
diff --git a/client/src/components/MoveList.vue b/client/src/components/MoveList.vue
index 70756cc3..6385ea0d 100644
--- a/client/src/components/MoveList.vue
+++ b/client/src/components/MoveList.vue
@@ -1,154 +1,261 @@
div
+ input#modalAdjust.modal(type="checkbox")
+ div#adjuster(
+ role="dialog"
+ data-checkbox="modalAdjust"
+ )
+ .card.text-center
+ label.modal-close(for="modalAdjust")
+ label(for="boardSize") {{ st.tr["Board size"] }}
+ input#boardSize.slider(
+ type="range"
+ min="0"
+ max="100"
+ value="50"
+ @input="adjustBoard()"
+ )
+ #aboveMoves
+ // NOTE: variants pages already have a "Rules" link on top
+ span#rulesBtn(
+ v-if="!$route.path.match('/variants/')"
+ @click="clickRulesBtn()"
+ :class="btnRulesClass"
+ )
+ | {{ st.tr["Rules"] }}
+ button(
+ :class="btnTooltipClass()"
+ onClick="window.doClick('modalAdjust')"
+ :aria-label="st.tr['Resize board']"
+ )
+ img.inline(src="/images/icons/resize.svg")
+ button#analyzeBtn(
+ v-if="canAnalyze"
+ :class="btnTooltipClass()"
+ @click="$emit('analyze')"
+ :aria-label="st.tr['Analyse']"
+ )
+ img.inline(src="/images/icons/analyse.svg")
+ #downloadDiv(v-if="canDownload")
+ a#download(href="#")
+ button(
+ :class="btnTooltipClass()"
+ @click="$emit('download')"
+ :aria-label="st.tr['Download'] + ' PGN'"
+ )
+ img.inline(src="/images/icons/download.svg")
#scoreInfo(v-if="score!='*'")
- p {{ score }}
- p {{ message }}
- table#movesList
- tbody
- tr(v-for="moveIdx in evenNumbers")
- td {{ moveIdx / 2 + 1 }}
- td(:class="{'highlight-lm': cursor == moveIdx}"
- data-label="White move" @click="() => gotoMove(moveIdx)")
- | {{ moves[moveIdx].notation }}
- td(v-if="moveIdx < moves.length-1"
- :class="{'highlight-lm': cursor == moveIdx+1}"
- data-label="Black move" @click="() => gotoMove(moveIdx+1)")
- | {{ moves[moveIdx+1].notation }}
- // Else: just add an empty cell
- td(v-else)
+ span.score {{ score }}
+ span.score-msg {{ st.tr[message] }}
+ .moves-list
+ .tr(v-for="moveIdx in evenNumbers")
+ .td {{ firstNum + moveIdx / 2 }}
+ .td(
+ :class="{'highlight-lm': cursor == moveIdx}"
+ @click="() => gotoMove(moveIdx)"
+ )
+ | {{ notation(moveIdx) }}
+ .td(
+ v-if="moveIdx < moves.length-1"
+ :class="{'highlight-lm': cursor == moveIdx+1}"
+ @click="() => gotoMove(moveIdx+1)"
+ )
+ | {{ notation(moveIdx + 1) }}
-
+.highlightRules
+ padding: 3px 5px
+ background-color: yellow
+
+#boardSizeBtnContainer
+ width: 100%
+ text-align: center
+
+[type="checkbox"]#modalAdjust+div .card
+ padding: 5px
+
+img.inline
+ height: 22px
+ @media screen and (max-width: 767px)
+ height: 18px
+
+#scoreInfo
+ margin: 10px 0
+ @media screen and (max-width: 767px)
+ margin: 5px 0
+
+span.score
+ display: inline-block
+ margin-left: 10px
+ font-weight: bold
+
+span.score-msg
+ display: inline-block
+ margin-left: 10px
+ font-style: italic
+
+#downloadDiv
+ display: inline-block
+ margin: 0
+
+span#rulesBtn
+ cursor: pointer
+ display: inline-block
+ margin: 0 10px
+ font-weight: bold
+
+button
+ margin: 0
+ &.active
+ background-color: #48C9B0
+
+#aboveMoves button
+ padding-bottom: 5px
+