Page 2 of 2

Re: Localhost and provider

Posted: 17 Mar 2021, 18:03
by christianch
I have installed in localhost X3 with examples , is certainly the best way for understand your App. 

I'm confused, I had change  the main page  by FTP and I crash yours solutions for the maps.

I'm confused, I  have changed  the main page  by FTP and I had erase yours solutions for the maps.
I tryed to obtain your goods results but whithout success 
I used var Carte_leaflet = L.noConflict(); in the content and/or  in Custom <head> ..... 
I can't undertsand  it don't work, .....

Openstreet map

Carte Ign

If you could help to me, I send to you my login by private msg. Many Thanks.

Re: Localhost and provider

Posted: 17 Mar 2021, 22:43
by mjau-mjau
Fixed.

The below is already set ONCE in Settings > Custom > Custom Javascript, and you don't need to set it AGAIN in pages.
Code
var Carte_leaflet = L.noConflict();
I have removed it from the pages, and not it works. Also, in the "openstreet" page, you were using "let" instead of "var". The problem is that "let" cannot be re-assigned when navigating back to the page, so always use "var".

FYI: The maps are working, but you have some references to "fontawesome.css" and "peak_info.png" that are not loading.

Re: Localhost and provider

Posted: 18 Mar 2021, 04:49
by christianch
I am infinitely grateful to you ! :thumbsup:

I spend a lot of time to understand why int's work .....

Re: Localhost and provider

Posted: 27 Mar 2021, 05:59
by christianch
Hi , i continue to discovery X3 and the possibilty to mix photo gallery and blog: 

1- Is there possible to change the "close button" of the slider by "return at previous page" , and how customize  js, html or css? 

Image

2 - Should I to respect a ratio size image before upload image for obtain a centered view on the grid, or is there any way for to do it automatically ?

Image

here is the original image.

Image

Thanks a lot.

Re: Localhost and provider

Posted: 27 Mar 2021, 07:02
by mjau-mjau
Hi!
christianch wrote:1- Is there possible to change the "close button" of the slider by "return at previous page" , and how customize  js, html or css?
I am not sure what I'm looking at in the screenshot. Do you have a link? The X3 popup will already navigate "back" when clicking browser "back" button after opening a popup. You can try yourself, go here, click a popup, then click browser "back" and the popup will close. This feature will only work when the opened item has a PID (ID usually from filename) so that an #url can be assigned ... If not, then "history" won't work. If you are adding custom html content (like a map), you can assign a PID manually on the link with data-popup-pid:
Code
<a href="SRC" data-popup-pid="URL-ID">assign custom url#hash id</a>
christianch wrote:2 - Should I to respect a ratio size image before upload image for obtain a centered view on the grid, or is there any way for to do it automatically ?
I don't understand the question. In your screenshot, you are using a 3:2 aspect ratio, so that the layout becomes UNIFORM (all items will have same size). When you use a set ratio, then obviously some cropping will happen. I see in your screenshot that the image is definitely centered. It's cropped on top/bottom to fit the ratio, but the crop is definitely centered.

If you choose to NOT crop images, then entire images will be visible, but the layout may then be non-uniform and un-even.

Re: Localhost and provider

Posted: 27 Mar 2021, 09:07
by christianch
you can assign a PID manually on the link with data-popup-pid:
1 - perfect!

2-  I misspoke, I wanted to say that the picture fits the frame proportionally.

Re: Localhost and provider

Posted: 27 Mar 2021, 11:40
by mjau-mjau
christianch wrote:2-  I misspoke, I wanted to say that the picture fits the frame proportionally.
What is it you want to achieve? As stated, in that screenshot (which looks like "folders"), you are using the default 3:2 crop, in which case images will be cropped and centered within 3:2 ratio. You can disable crop and/or change crop and/or change the layout from the page's "folders" settings.