image and cover image size and position

Post Reply
geonao
Ssr. Bludit
Posts: 11
Joined: Thu Jun 28, 2018 7:33 am

Sun Jul 01, 2018 2:44 am

I'm using Blog X theme

I've noticed that the cover image is automagically resized.
Which part of the CMS do I need to look at to deal with size and position of the cover image and images in the page?

Edit:
I'm assuming that the cover image is resized to some sort of "thumb" format and the size of the other images on the page are "as is", when using the image uploads from the Admin menu with SimpleMDE.

So, I'm trying to figure out which part of the theme I need to look at, so I can edit the css or php file (s) to control the position and image sizes of the cover image and other images within the page
I prefer FreeBSD :evil:
User avatar
Edi
Site Admin
Posts: 1230
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

Mon Jul 02, 2018 12:29 pm

The cover image is set with the following:

Code: Select all

<?php echo $page->coverImage(); ?>
You can find the code for the theme Blog X in the templates home.php and page.php (at /bl-themes/blogx/php):

Code: Select all

	<!-- Cover image -->
	<?php if ($page->coverImage()): ?>
	<img class="card-img-top mb-3 rounded-0" alt="Cover Image" src="<?php echo $page->coverImage(); ?>"/>
	<?php endif ?>
As you can see the format of the cover image has the CSS classes "card-img-top", "mb-3" and "rounded-0". To show the definitions you can use the developer tools of your browser.
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
geonao
Ssr. Bludit
Posts: 11
Joined: Thu Jun 28, 2018 7:33 am

Tue Jul 10, 2018 9:17 pm

Finally, I'm getting it, slowly :)

I've made few edits in theme's dir - style.css, home.php and page.php.

Now, I have the coverImage size as I like it, I'm linking coverImage from Home view to the referring page, and I'm not displaying coverImage in the page itself.

Thank you for the hints and help
I prefer FreeBSD :evil:
Post Reply