[Fencommits] fenserve: use hover effects only for potions with edit links
Benja Fallenstein
benja.fallenstein at gmail.com
Thu May 24 13:48:50 EEST 2007
Thu May 24 13:48:36 EEST 2007 Benja Fallenstein <benja.fallenstein at gmail.com>
* use hover effects only for potions with edit links
diff -rN -u old-fenserve/fendata/Main.hs new-fenserve/fendata/Main.hs
--- old-fenserve/fendata/Main.hs 2007-05-24 13:48:49.000000000 +0300
+++ new-fenserve/fendata/Main.hs 2007-05-24 13:48:49.000000000 +0300
@@ -21,14 +21,14 @@
\button {\
\ cursor: pointer; background: none; border: none; \
\ font: inherit; margin: 0; padding: 0 } \
- \.potion {\
+ \.potion, .editPotion {\
\ border: dashed black 1px; padding: 2px; \
\ margin: 2px; line-height: 90% } \
- \span.potion:hover { background: #eee } \
- \span.potion:hover span.potion:hover { background: #ddd } \
- \span.potion:hover span.potion:hover span.potion:hover { background: #ccc } \
- \span.potion:hover span.potion:hover span.potion:hover { background: #bbb } \
- \span.potion:hover span.potion:hover span.potion:hover span.potion:hover { background: #aaa } \
+ \span.editPotion:hover { background: #eee } \
+ \span.editPotion:hover span.editPotion:hover { background: #ddd } \
+ \span.editPotion:hover span.editPotion:hover span.editPotion:hover { background: #ccc } \
+ \span.editPotion:hover span.editPotion:hover span.editPotion:hover { background: #bbb } \
+ \span.editPotion:hover span.editPotion:hover span.editPotion:hover span.editPotion:hover { background: #aaa } \
\</style></head>"
type Id = Int
@@ -124,7 +124,7 @@
renderExp' e@(Str _) cx ty = renderExp e cx ty
renderExp' e cx ty = surround (renderExp e cx ty)
-surround s = tag "span" [("class", "potion")] s
+surround s = tag "span" [("class", if ?link then "editPotion" else "potion")] s
slices xs = map (\i -> (take i xs, xs !! i, drop (i+1) xs)) [0..length xs-1]
More information about the Fencommits
mailing list