Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Software
Shunting
Commits
5038f985
Commit
5038f985
authored
Oct 16, 2017
by
Thorsten Wißmann
🐧
Browse files
Make whole li item clickable in main navigation
parent
18e20411
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Main.elm
View file @
5038f985
...
...
@@ -305,15 +305,20 @@ viewNavigation model =
undo
=
ForRails
RailPuzzle
.
undo
link
:
msg
->
String
->
String
->
Html
msg
link
:
msg
->
String
->
String
->
(
List
(
Html
msg
)
,
List
(
Html
.
Attribute
msg
))
link
msg
en
de
=
Html
.
a
[
HA
.
href
"
javascript: ;"
,
HE
.
onClick
msg
]
[
MultiLang
.
text
en
de
]
(
[
Html
.
a
[
HA
.
href
"
javascript: ;"
]
[
MultiLang
.
text
en
de
]
]
,
[
HE
.
onClick
msg
]
)
noclick
:
a
->
(
a
,
List
b
)
noclick
x
=
(
x
,
[])
in
((
if
model
.
flags
.
minimalInterface
then
(
::
)
[
a
main_page_url
then
(
::
)
<|
noclick
<|
[
a
main_page_url
[
img
[
HA
.
src
"
logo_negated.png"
,
HA
.
style
...
...
@@ -327,8 +332,8 @@ viewNavigation model =
else
identity
)
<|
(
if
model
.
flags
.
showRestart
then
(
::
)
[
Html
.
a
then
(
::
)
<|
noclick
<|
[
Html
.
a
[
HA
.
style
[(
,
)
"
font-weight"
"
bold"
]
,
HA
.
href
"
rails.html"
]
...
...
@@ -336,9 +341,9 @@ viewNavigation model =
]
else
identity
)
<|
[
[
link
(
ForRails
RailPuzzle
.
undo
)
"
Undo"
"
Rückgängig"
]
,
[
link
resetCars
"
Reset All Cars"
"
Zurücksetzen"
]
,
[
Html
.
span
[
link
(
ForRails
RailPuzzle
.
undo
)
"
Undo"
"
Rückgängig"
,
link
resetCars
"
Reset All Cars"
"
Zurücksetzen"
,
noclick
<|
[
Html
.
span
[
HA
.
style
[(
,
)
"
margin-right"
"
1em"
]
]
[
Html
.
text
"
Puzzle:"
]
,
net_switcher
...
...
@@ -351,15 +356,15 @@ viewNavigation model =
]
]
[
if
(
hasNextPuzzle
model
)
then
link
NextPuzzle
"
Next"
"
Weiter"
then
Html
.
a
[
HA
.
href
"
javascript;"
,
HE
.
onClick
NextPuzzle
]
[
MultiLang
.
text
"
Next"
"
Weiter"
]
else
MultiLang
.
text
"
Finished!"
"
Fertig!"
]
]
,
[
Html
.
map
ForMultiLang
<|
MultiLang
.
viewSwitcher
model
.
languageSwitcher
]
,
noclick
<|
[
Html
.
map
ForMultiLang
<|
MultiLang
.
viewSwitcher
model
.
languageSwitcher
]
]
)
|>
List
.
filter
(
not
<<
List
.
isEmpty
)
|>
List
.
map
(
Html
.
li
[]
)
|>
List
.
filter
(
not
<<
List
.
isEmpty
<<
Tuple
.
first
)
|>
List
.
map
(
\
(
content
,
attr
)
->
Html
.
li
attr
content
)
|>
Html
.
ul
[
HA
.
id
"
navigationbar"
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment