diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-07-11 17:23:12 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-07-11 17:23:12 +0200 |
| commit | 88b5644a6c2594887d6f99f1cad72a1b58d60fe4 (patch) | |
| tree | ce1dbe06e7bc202a08c7fdeb8fb147bdd6e593bd | |
| parent | cf204a1567bcfc6cdfd1927cd9e897b7334abe16 (diff) | |
more fixes
| -rw-r--r-- | cli/commands/site/export.py | 4 | ||||
| -rw-r--r-- | frontend/views/page/components/tile.handle.js | 36 | ||||
| -rw-r--r-- | frontend/views/page/cursors.css | 6 | ||||
| -rw-r--r-- | frontend/views/page/page.css | 3 | ||||
| -rw-r--r-- | static/site.css | 5 |
5 files changed, 38 insertions, 16 deletions
diff --git a/cli/commands/site/export.py b/cli/commands/site/export.py index d9dbbf7..5f4636a 100644 --- a/cli/commands/site/export.py +++ b/cli/commands/site/export.py @@ -68,9 +68,9 @@ def cli(ctx, opt_graph_path, opt_output_dir): # build javascript print("Building javascript...") - print(f'NODE_ENV=production webpack --config ./webpack.config.site.js -o {graph_dir}/bundle.js') + print(f'NODE_ENV=production node ./node_modules/webpack-cli/bin/cli.js --config ./webpack.config.site.js -o {graph_dir}/bundle.js') os.chdir(app_cfg.DIR_PROJECT_ROOT) - os.system(f'NODE_ENV=production webpack --config ./webpack.config.site.js -o {graph_dir}/bundle.js') + os.system(f'NODE_ENV=production node ./node_modules/webpack-cli/bin/cli.js --config ./webpack.config.site.js -o {graph_dir}/bundle.js') print("Site export complete!") print(f"Graph exported to: {graph_dir}") diff --git a/frontend/views/page/components/tile.handle.js b/frontend/views/page/components/tile.handle.js index bd47ae9..33243a7 100644 --- a/frontend/views/page/components/tile.handle.js +++ b/frontend/views/page/components/tile.handle.js @@ -68,17 +68,31 @@ const TileHandle = ({ tile, bounds, box, viewing, onMouseDown, onDoubleClick }) break } if (viewing && tile.href) { - return ( - <Link to={tile.href}> - <div - className={className} - onMouseDown={onMouseDown} - style={style} - > - {content} - </div> - </Link> - ) + if (tile.href.indexOf('http') === 0) { + return ( + <a href={tile.href} rel='noopener'> + <div + className={className} + onMouseDown={onMouseDown} + style={style} + > + {content} + </div> + </a> + ) + } else { + return ( + <Link to={tile.href}> + <div + className={className} + onMouseDown={onMouseDown} + style={style} + > + {content} + </div> + </Link> + ) + } } else { return ( <div diff --git a/frontend/views/page/cursors.css b/frontend/views/page/cursors.css index 5f90dd1..56fb088 100644 --- a/frontend/views/page/cursors.css +++ b/frontend/views/page/cursors.css @@ -13,3 +13,9 @@ .tile.hand_left { cursor: url(/static/img/hand_left.png) 10 60, pointer; } + +.tile.link { + cursor: pointer; + border: 1px solid #31f; + background-color: rgba(48,16,255,0.1); +}
\ No newline at end of file diff --git a/frontend/views/page/page.css b/frontend/views/page/page.css index ec41241..4559543 100644 --- a/frontend/views/page/page.css +++ b/frontend/views/page/page.css @@ -28,9 +28,6 @@ } .tile.link { display: block; - cursor: pointer; - border: 1px solid #31f; - background-color: rgba(48,16,255,0.1); } /* tile orientations */ diff --git a/static/site.css b/static/site.css index 7f4a733..08135de 100644 --- a/static/site.css +++ b/static/site.css @@ -127,3 +127,8 @@ body { .tile.hand_left { cursor: url(SITE_PATH/static/img/hand_left.png) 10 60, pointer; } + +.tile.link { + border: 0 !important; + background: transparent !important; +}
\ No newline at end of file |
