Support community for TTG plugins and products.
NOTICE
The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.
This forum is now closed, and exists here as a read-only archive.
You are not logged in.
Pages: 1
Hi Guys,
Having a little trouble getting my CRG Login/Logout pages to look the way I want. The Login/Logout inputs and prompts are aligned way over to the left and I would like them to look like my admin Login/Logout ie. centered...
What is the best way to achieve this? I've tried with css and inspecting the pages of the admin and the CRG pages they look slightly different in makeup. On the CRG Login page the <h1>Login</h1> element falls outside of the <div id="form" class="admin_unit login">, whereas on the Admin Login Page the <h1>Login</h1> is inside the div.
This means that I can target the #form with some padding, but the <h1> does not move with it.
Am I missing something simple again?
Offline
I clicked on the link but there is no log-in form, just the thumbnail for the album. Clicking on the album takes me to the log-in for the client. That log-in is centered on the page.
The main client log in is also centered: http://njp.kopstone.co.uk/backlight/client-response/
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Hi Rod,
Yes it is now, but I had to add css to format the Login title to the center and then set a max width for the div containing the form fields. I think that the <h1>Login</h1> element of the page should fall inside the #form <div> as it does on the Backlight Admin login page, then it gets a bit easier to target with css.
Offline
Ok. I see what you mean. With the way you had to do it, it looks like all H1 tags will be centered for those pages using that css file.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Correct Rod,
The only way, currently to move the H1 tag is to target the .the__copy class, which effects the whole site. Although I could have a specific css file just for the Login, which would be a hassle for updating, as I would have to make changes to more than one css file.
Offline
Hi Jon,
Instead of having a specific CSS file, you could add the styling with phplugins:
function ttg_head( $style, $path ) {
// Modify styles on galleries/clients page
if ($_SERVER["REQUEST_URI"] == '/galleries/clients/'){
echo '<style media="screen" type="text/css">...</style>';
}
} // END
This should work.... but I didn't test it on my site.
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
Oooh! that's very useful Daniel Thank you...
I'd forgotten about targeting individual pages, nice one
Offline
The power of phplugins, although the Backlight implementation right now is a bit limited.
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
My dream is the ability to apply a custom body class either by individual page or by page template.....
Then you can have one css file to rule them all....
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
My dream is the ability to apply a custom body class either by individual page or by page template.....
Then you can have one css file to rule them all....
Yep, it would be nice to have a page related and a template related class. At the same time, you can use a separate CSS per page template. But this would mean you have more than one CSS per site which makes it more difficult to maintain it.
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
Hey Daniel,
Thanks for the phplugins code, it works a treat thank you.
Do you think that I will now have to target each client gallery page individually ie. http://njp.kopstone.co.uk/backlight/cli … m_id=91095 or is there a clever way of extending the formatting to all galleries below the top Album Set http://njp.kopstone.co.uk/backlight/client-response/
You see, by targeting the http://njp.kopstone.co.uk/backlight/client-response/, the logout page is formatted correctly (centered) but the login page http://njp.kopstone.co.uk/backlight/cli … m_id=91095 is not....
Not a problem, but just asking before I code for every page I add is all?
Not that I have many clients...... yet
Offline
Hi Jon,
Yes, there is. It is just a bit more php. Please note that I haven't had time to test it yet and this is before my first coffee of the day ;-)
function galleries_match($gallery) {
if (substr($_SERVER["REQUEST_URI"], 0, strlen($gallery)) == $gallery) {
return 1;
} else {
return 0;
}
}
function ttg_head( $style, $path ) {
// Modify styles on galleries/clients page
if (galleries_match('/galleries/clients/')){
echo '<style media="screen" type="text/css">...</style>';
}
} // END
Hope this doesn't break anything!
Update: overlooked one closing bracket. It is working now.
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
Hi Daniel,
Been playing with this thank you, I think I know what is happening. The issue I have is that the Login and Logout pages are not gallery pages and the url is prepended with http://njp.kopstone.co.uk/backlight/client-response/ and not http://njp.kopstone.co.uk/galleries/clients/...
so the existing function I have is this:
function ttg_head( $style, $path ) {
// Modify styles on galleries/clients page
if ($_SERVER["REQUEST_URI"] == '/backlight/client-response/'){
echo '<style media="screen" type="text/css">.the__copy h1 {text-align: center;}</style>';
}
} // END
This works fine for targeting the individual pages, however targeting the pages below is testing!
I haven't been able to successfully modify the galleries function to get it to work, I'm obviously missing something simple.
Any suggestions Daniel?
Offline
NO Wait!
Posted too soon, whilst I was posting and pasting in the code section I spotted my schoolboy error.
Daniel you're a genius! The code works very well indeed
Thank you very much, I've learned a new trick.......
Offline
Pages: 1