Skip to content

Commit

Permalink
Continue
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Oct 11, 2024
1 parent f8bfe4a commit e409245
Show file tree
Hide file tree
Showing 12 changed files with 109 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ repos:
- id: integrity-updater
exclude: |-
(?x)^(
ui/interfaces/desktop_alt\.html
ui/.*\.html
)$
- repo: https://github.com/PyCQA/autoflake
rev: v2.3.1
Expand Down
4 changes: 2 additions & 2 deletions .secretsignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/geoportal/interfaces/desktop_alt.html.mako
/ui/interfaces/desktop_alt.html
[secrets]
AIzaSyA3NVIy-HOYT0a0CkChA6nFwqEFqHYWBVk
13 changes: 5 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,13 @@ COPY ui/package.json ui/package-lock.json ./
RUN npm install --ignore-scripts

COPY ui/ ./
#COPY ui/tsconfig.json vite.config.ts ./
#COPY ui/interfaces/ ./interfaces/
#COPY ui/src/ ./src/
RUN ls -l && \
ls -l src && \
NODE_ENV=production npm run build
RUN NODE_ENV=production npm run build

###############################################################################

FROM gmf_config AS config

COPY --from=webcomponent-build /app/dist/ /etc/geomapfish/static/custom/
COPY --from=ui-build /app/dist/interfaces/* /etc/static-frontend/
COPY --from=ui-build /app/dist/assets /etc/static-frontend/

COPY --from=ui-build /app/dist/* /etc/static-frontend/
VOLUME /etc/static-frontend/
5 changes: 5 additions & 0 deletions geoportal/vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,19 @@ vars:
default: True
- name: mobile
- name: iframe_api
- name: iframe_api_renovated
type: custom
html: iframe_api.html
- name: desktop_alt
type: canvas
layout: desktop
- name: desktop_renovated
type: custom
html: desktop.html
- name: mobile_alt
- name: mobile_renovated
type: custom
html: mobile.html
- name: oeedit

interfaces_config:
Expand Down
21 changes: 21 additions & 0 deletions ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# The renovate interface

The renovate interface is the desktop, mobile and iframe_api interfaces from ngeo that uses the ngeo directly (renovate).

## Development

The server application should be started previously, you can start it by running:

```bash
cd ../
./build
docker compose up -d
```

To start the development server, run:

```bash
npm run dev
```

Open the application in your browser at [http://localhost:3002/static-frontend/desktop.html](http://localhost:3002/static-frontend/desktop.html), fir the desktop interface.
10 changes: 4 additions & 6 deletions ui/interfaces/desktop_alt.html → ui/desktop.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width" />
<meta name="dynamicUrl" content="https://localhost:8484/dynamic.json" />
<meta name="interface" content="desktop_alt" />
<link rel="shortcut icon" href="./favicon.ico" crossorigin="anonymous" />
<meta name="interface" content="desktop_renovated" />
<link rel="shortcut icon" href="/favicon.ico" crossorigin="anonymous" />
</head>
<body ng-keydown="mainCtrl.onKeydown($event)">
<div ng-show="mainCtrl.loading" class="loading-mask">
Expand Down Expand Up @@ -388,7 +388,6 @@
url="mainCtrl.displaywindowUrl"
width="mainCtrl.displaywindowWidth"
></ngeo-displaywindow>
<!-- -->
<button
slot="map"
ngeo-geolocation=""
Expand All @@ -400,9 +399,8 @@
</button>
<div slot="map" class="gmf-app-map-bottom-controls">
<div class="gmf-backgroundlayerbutton btn-group dropup">
<!-- -->
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<img src="'./background-layer-button.png" alt="" crossorigin="anonymous" />
<img src="/background-layer-button.png" alt="" crossorigin="anonymous" />
</button>
<gmf-backgroundlayerselector gmf-backgroundlayerselector-map="::mainCtrl.map" class="dropdown-menu">
</gmf-backgroundlayerselector>
Expand Down Expand Up @@ -497,6 +495,6 @@
referrerpolicy="no-referrer"
src="https://maps.googleapis.com/maps/api/js?v=3&amp;key=AIzaSyA3NVIy-HOYT0a0CkChA6nFwqEFqHYWBVk"
></script>
<script type="module" src="./Controllerdesktop_alt.ts" crossorigin="anonymous"></script>
<script type="module" src="./src/interfaces/Controllerdesktop.ts" crossorigin="anonymous"></script>
</body>
</html>
Binary file added ui/public/background-layer-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/public/favicon.ico
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
// Various fixies
// delete src/controllers/bootstrap.js webpack things and remove .vite/deps

import './desktop_alt.css';
import './desktop.css';

import 'jquery';
import 'jquery-ui/dist/jquery-ui.js';
Expand Down Expand Up @@ -70,7 +70,7 @@ class Controller extends AbstractDesktopController {
/**
* @hidden
*/
const geomapfishModule = angular.module('Appdesktop_alt', [
const geomapfishModule = angular.module('Appdesktop', [
geomapfishBase.name,
gmfControllersAbstractDesktopController.name,
gmfImportModule.name,
Expand Down
63 changes: 63 additions & 0 deletions ui/src/interfaces/desktop.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/**
* The MIT License (MIT)
*
* Copyright (c) Camptocamp SA
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

@import 'ngeo/controllers/desktop.css';
@import 'mapillary-js';

html {
body {
padding: 0;
}
}
header {
.logo {
background-image: url('../image/logo.svg');
span {
left: 18.5rem;
position: absolute;
bottom: 0.2rem;
}
span::before {
content: 'by Camptocamp';
}
}
}

.gmf-theme-selector li {
flex-direction: column;
span.gmf-text {
width: auto;
}
}
.gmf-theme-selector .gmf-thumb {
height: 3rem;
}

.gmf-layertree-node .gmf-layertree-legend {
border: none;
background-color: transparent;
}

.offset-info-icon {
position: absolute;
}
File renamed without changes.
7 changes: 6 additions & 1 deletion ui/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@ export default defineConfig({
},
base: '/static-frontend/',
build: {
lib: {
entry: '.',
name: 'gmf',
},
publicDir: true,
sourcemap: true,
rollupOptions: {
input: {
desktop_alt: path.resolve(__dirname, 'interfaces/desktop_alt.html'),
desktop: path.resolve(__dirname, 'desktop_renovated.html'),
},
},
},
Expand Down

0 comments on commit e409245

Please sign in to comment.