All posts by 'NickP'

Subtle changes

  • Applied the standard fix to the database to set everything to utf8mb4_general_ci. That made the ASCII art in the post about Astro routing work.
  • Renamed the database to admin2_ncvp_me_wp. Had to apply admin2_17926 user privileges to new database. I don't remember having to do that before.
  • Re-applied box-sizing: border-box to ncvp-class style.css. That fixed the overflowing thumbnails in image galleries - again.
  • Pushed ncvp-class - again.

There's so much to get right!

Sort out astro-wpress routing

This is all about the mapping between site-url/xxxx/yyyy/zzzz and Astro pages. Even though there are no files in the /src/pages tree, the magic files [slug].astro, [...path].astro perform the same sort of rôle as if there were.

Add these to /src/:

└── pages
    ├── author
    │   └── [slug].astro
    ├── category
    │   └── [slug].astro
    ├── index.astro
    ├── [...path].astro
    ├── [slug].astro
    ├── tag
    │   └── [slug].astro
    └── [year]
        └── [month].astro

All this would have been impossible without AI assistance.

Reduce canonical WP

Something basic with the master at localhost/wp/wp and distributed around to the various default cloud sites

Category: Admin
Rendered by content.php

Textflow using gallery shortcode

One way way of including images in a page of text is to put them in single image galleries. They can be made to pop out or not with the use of link="file" or link="none". Control over size is limited to Large, Medium or Thumbnail, but this is often sufficient. Some HTML is required to control the way images float to the left or the right. The thumbnail caption and the slide caption come from the 'Caption' and 'Alternative Text' fields in the media library respectively. There is no control over this. This text immediately preceeds the picture of Mathilde Wesendonck, which is set to pop out ...

... and this text immediately follows Mathilde.  Suspendisse iaculis sapien a rutrum molestie. Morbi non luctus nunc, vitae viverra est. Phasellus dapibus feugiat risus eu placerat. Vestibulum venenatis bibendum ipsum vitae sollicitudin. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Nam fermentum tellus quis sollicitudin blandit. Vestibulum eget tortor at dui hendrerit dignissim ac at nibh. Phasellus vel laoreet augue, id interdum ex. In in ante sed elit suscipit vulputate. Phasellus ut egestas lorem. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras sed condimentum eros, eget lobortis arcu. The image of Tiresias in the stars immediately follows this text, and is set to not pop out ...

... and this text immediately follows Tiresias. Aenean ultrices aliquam magna, eu facilisis lacus egestas eu. Maecenas ultrices nulla in convallis hendrerit. Aliquam posuere urna et enim faucibus, ac condimentum ipsum egestas. Ut viverra dolor in felis hendrerit euismod. Etiam molestie magna at egestas vulputate. Vestibulum rhoncus tortor consequat elementum pulvinar. Nulla elementum quam eget diam sagittis, vel porta odio ullamcorper. Curabitur pulvinar quis turpis non dignissim. In in sapien aliquet lectus laoreet pellentesque in eu enim. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. The image of Morgan le Fay immediately follows this text and is set to pop out ...

... and this is immediately after Morgan le Fay. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vel massa tincidunt, aliquam elit id, venenatis tellus. Nunc molestie mauris et magna placerat tempus. Phasellus sodales dolor enim, vel eleifend ante facilisis semper. Integer vel dictum orci. Praesent cursus ligula vel nisi rutrum, sit amet mollis tortor euismod. Duis sollicitudin elit sit amet quam dictum congue.

Different menus on different pages

If these can be made to work smoothly I may not need a hybrid site, like my new garden, but look carefully at Planting Plans.
This may be another case like CAS membership form with payment where I can use a shortcode to basically dump code on a WP page and not worry about registering it.

Textflow using raw HTML

This method is very straightforward for static images. The thumbnail caption is explicitly coded. It makes no difference whether the image is from the media library or external. The static picture of the Nymph immediately follows this text ...

Friend of Echo

... and this text immediately follows the Nymph. Maecenas id sapien risus. Nullam varius id tellus quis volutpat. In a tempor tortor, cursus sodales enim. Integer sed felis et massa lacinia molestie volutpat quis dui. Duis interdum libero sed velit ornare, at blandit nulla volutpat. Mauris quis mi arcu. Praesent vulputate accumsan tortor, et ullamcorper sapien tincidunt ut. Nulla a eleifend justo. Nam facilisis efficitur risus, vitae ornare ex fringilla vitae. Phasellus neque justo, vehicula sed finibus non, posuere sed ligula. The pop-out picture of the Dobsonian telescope immediately follows this text ...



16 inch Dobsonian Mark II

... and this text immediately follows Dobby II. Proin diam lectus, blandit sit amet odio id, ultrices venenatis erat. Fusce lacinia, tortor eget dapibus condimentum, odio urna elementum eros, vestibulum ornare eros sapien in turpis. Vivamus congue consectetur odio at convallis. Aliquam metus nunc, iaculis at quam in, pellentesque aliquam lorem. Integer quis pretium turpis. Morbi diam justo, porttitor nec augue nec, blandit posuere neque. Aenean molestie facilisis turpis, id sagittis nisl ornare vitae. Cras rutrum lacus tellus. Sed id est et leo porta blandit. Donec id tempus sem. Integer hendrerit urna eget nunc dignissim accumsan. Aliquam vitae bibendum massa, in accumsan risus. Donec eu turpis dapibus ligula interdum sodales eu eget nibh. The pop-out picture of the Griffith Observatory immediately follows this ...



Griffith Observatory, Los Angeles

... and this immediately follows the Griffith Observatory. Aenean ultrices aliquam magna, eu facilisis lacus egestas eu. Maecenas ultrices nulla in convallis hendrerit. Aliquam posuere urna et enim faucibus, ac condimentum ipsum egestas. Ut viverra dolor in felis hendrerit euismod. Etiam molestie magna at egestas vulputate. Vestibulum rhoncus tortor consequat elementum pulvinar. Nulla elementum quam eget diam sagittis, vel porta odio ullamcorper. Curabitur pulvinar quis turpis non dignissim. In in sapien aliquet lectus laoreet pellentesque in eu enim. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.

Post with an image

Raw HTML seems to be the way forward.
This one doesn't pop-out:

Hellebores

This one does. As usual, you have to enter the img url twice:



Hellebores

There's inevitably some fiddling required when sites are moved around, but it's probably less than the single-image gallery method.

Category: Admin
Rendered by content.php

Second level page

The root is level 0. We never see it.

The pages in the top menu are level 1. This menu is effectively static.

The menu item for this level two page appears at the extreme left of the side menu.

Category: Admin
Rendered by content.php
Rendered by index.php