summaryrefslogtreecommitdiff
path: root/frontend/views/page
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-07-11 16:02:01 +0200
committerJules Laplace <julescarbon@gmail.com>2020-07-11 16:02:01 +0200
commitcf4098b20dadcd378ef2730f32f70e327ab262b4 (patch)
tree7683817932967b083fd3447649f127d461d802fb /frontend/views/page
parent52531fbc8d3531a7941ad9c6c79a1e353d35f2fa (diff)
making sure cursors and css are good in the main site
Diffstat (limited to 'frontend/views/page')
-rw-r--r--frontend/views/page/components/tile.handle.js2
-rw-r--r--frontend/views/page/cursors.css15
-rw-r--r--frontend/views/page/page.container.js1
-rw-r--r--frontend/views/page/page.css15
4 files changed, 17 insertions, 16 deletions
diff --git a/frontend/views/page/components/tile.handle.js b/frontend/views/page/components/tile.handle.js
index f3a700b..bd47ae9 100644
--- a/frontend/views/page/components/tile.handle.js
+++ b/frontend/views/page/components/tile.handle.js
@@ -11,7 +11,7 @@ const TileHandle = ({ tile, bounds, box, viewing, onMouseDown, onDoubleClick })
// console.log(generateTransform(tile))
let content;
let className = ['tile', tile.type].join(' ')
- if (tile.target_page_id) {
+ if (tile.target_page_id || (viewing && tile.href)) {
className += ' ' + (tile.settings.cursor || 'hand_up')
}
// console.log(tile.settings)
diff --git a/frontend/views/page/cursors.css b/frontend/views/page/cursors.css
new file mode 100644
index 0000000..5f90dd1
--- /dev/null
+++ b/frontend/views/page/cursors.css
@@ -0,0 +1,15 @@
+/* cursors */
+/* keep in separate file so they don't conflict. a copy of this lives in site.css */
+
+.tile.hand_up {
+ cursor: url(/static/img/hand_up.png) 40 10, pointer;
+}
+.tile.hand_right {
+ cursor: url(/static/img/hand_right.png) 90 40, pointer;
+}
+.tile.hand_down {
+ cursor: url(/static/img/hand_down.png) 60 90, pointer;
+}
+.tile.hand_left {
+ cursor: url(/static/img/hand_left.png) 10 60, pointer;
+}
diff --git a/frontend/views/page/page.container.js b/frontend/views/page/page.container.js
index 5da41d6..26bed30 100644
--- a/frontend/views/page/page.container.js
+++ b/frontend/views/page/page.container.js
@@ -4,6 +4,7 @@ import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
import './page.css'
+import './cursors.css'
import actions from '../../actions'
import { Loader } from '../../common'
diff --git a/frontend/views/page/page.css b/frontend/views/page/page.css
index c29aff2..ec41241 100644
--- a/frontend/views/page/page.css
+++ b/frontend/views/page/page.css
@@ -168,18 +168,3 @@
width: 6rem;
max-width: 6rem;
}
-
-/* cursors */
-
-.tile.hand_up {
- cursor: url(/static/img/hand_up.png) 40 10, pointer;
-}
-.tile.hand_right {
- cursor: url(/static/img/hand_right.png) 90 40, pointer;
-}
-.tile.hand_down {
- cursor: url(/static/img/hand_down.png) 60 90, pointer;
-}
-.tile.hand_left {
- cursor: url(/static/img/hand_left.png) 10 60, pointer;
-}