improve anon puzzle UI

pull/7691/head
Thibault Duplessis 2020-12-06 15:19:33 +01:00
parent 551923438b
commit 7901d9e6b6
6 changed files with 10 additions and 18 deletions

View File

@ -39,13 +39,6 @@ object coordinate {
if (ctx.isAuth) scoreOption.map { score =>
div(cls := "scores")(scoreCharts(score))
}
else
div(cls := "register")(
p(trans.puzzle.toTrackYourProgress()),
p(cls := "signup")(
a(cls := "button", href := routes.Auth.signup())(trans.signUp())
)
)
),
form(cls := "color buttons", action := routes.Coordinate.color(), method := "post")(
st.group(cls := "radio")(

View File

@ -55,7 +55,7 @@ object bits {
trans.puzzle.playedXTimes,
trans.puzzle.continueTraining,
trans.puzzle.difficultyLevel,
trans.puzzle.toTrackYourProgress,
trans.puzzle.toGetPersonalizedPuzzles,
trans.signUp,
trans.analysis,
trans.rated,

View File

@ -1787,7 +1787,7 @@ val `voteToLoadNextOne` = new I18nKey("puzzle:voteToLoadNextOne")
val `yourPuzzleRatingX` = new I18nKey("puzzle:yourPuzzleRatingX")
val `findTheBestMoveForWhite` = new I18nKey("puzzle:findTheBestMoveForWhite")
val `findTheBestMoveForBlack` = new I18nKey("puzzle:findTheBestMoveForBlack")
val `toTrackYourProgress` = new I18nKey("puzzle:toTrackYourProgress")
val `toGetPersonalizedPuzzles` = new I18nKey("puzzle:toGetPersonalizedPuzzles")
val `puzzleId` = new I18nKey("puzzle:puzzleId")
val `puzzleOfTheDay` = new I18nKey("puzzle:puzzleOfTheDay")
val `clickToSolve` = new I18nKey("puzzle:clickToSolve")

View File

@ -12,7 +12,7 @@
<string name="yourPuzzleRatingX">Your puzzle rating: %s</string>
<string name="findTheBestMoveForWhite">Find the best move for white.</string>
<string name="findTheBestMoveForBlack">Find the best move for black.</string>
<string name="toTrackYourProgress">To track your progress:</string>
<string name="toGetPersonalizedPuzzles">To get personalized puzzles:</string>
<string name="puzzleId">Puzzle %s</string>
<string name="puzzleOfTheDay">Puzzle of the day</string>
<string name="clickToSolve">Click to solve</string>

View File

@ -42,10 +42,9 @@
@extend %box-neat;
background: $c-bg-box;
padding: 2vmin;
&__rating {
margin: 2vmin;
strong {
@extend %flex-center;
@ -88,9 +87,11 @@
&__difficulty {
margin-top: 2vmin;
label {
margin-right: 1em;
}
select {
border: none;
}
@ -122,7 +123,6 @@
@extend %flex-between;
align-items: stretch;
margin-left: -.5rem;
a {
@ -133,7 +133,7 @@
&:hover {
background: mix($c-bg-box, $c-link, 90%);
}
&.strike a {
text-decoration: line-through;
}
@ -142,8 +142,8 @@
&__votes {
@extend %flex-center-nowrap;
flex: 0 1 7em;
flex: 0 1 7em;
align-items: stretch;
text-align: center;
}
@ -154,7 +154,6 @@
justify-content: center;
flex: 0 0 50%;
cursor: pointer;
color: $c-font-dimmer;
.puzzle__themes:hover & {
@ -179,7 +178,7 @@
&:hover,
&.active {
background: $c-good;
color: $c-good-over!important;
color: $c-good-over !important;
}
&.vote-down:hover,

View File

@ -49,7 +49,7 @@ function gameInfos(ctrl: Controller, game: PuzzleGame, puzzle: Puzzle): VNode {
export function userBox(ctrl: Controller): VNode {
const data = ctrl.getData();
if (!data.user) return h('div.puzzle__side__user', [
h('p', ctrl.trans.noarg('toTrackYourProgress')),
h('p', ctrl.trans.noarg('toGetPersonalizedPuzzles')),
h('button.button', { attrs: { href: '/signup' } }, ctrl.trans.noarg('signUp'))
]);
const diff = ctrl.vm.round?.ratingDiff;