Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2020-01-09 23:22:01

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,719
Website GitHub

Re: Date Object associate to content to links

phiw13 wrote #320987:

(I use some left or right padding on its wrapper to achieve the desired positioning in current Sandspace)

Care to share your rules? I tried a blank (well, one space character) label on the left by cloning the markup that inputLabel() produces but got this:

!https://stefdawson.com/downloads/support/SetTimestampPosition.png!

Note the label intrudes into the right-hand column. No idea why.

Last edited by Bloke (2020-01-09 23:22:34)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#26 2020-01-09 23:39:42

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,654
Website

Re: Date Object associate to content to links

Bloke wrote #320989:

Care to share your rules?

Sure, this is what I use now (edit files panel):

.file-detail .posted-now { padding-left: calc(45% + 1em); }

I will need to update that – generalise that – a little for future use. For Hive I think padding-left:50% might do, going by memory.

Bloke wrote #320988:

I’ve often wondered if the image file’s datestamp might be more useful as a default value rather than ‘now’. Same for Files, perhaps?

For images, it certainly will be better for most cases. For files, dunno really.

edit: spelling, auto-correct really.

Last edited by phiw13 (2020-01-09 23:40:29)


Where is that emoji for a solar powered submarine when you need it ?

Offline

#27 2020-01-09 23:58:26

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,719
Website GitHub

Re: Date Object associate to content to links

phiw13 wrote #320990:

Sure, this is what I use now

Cool, thank you. This works in Hive:

@media screen {
...
  .posted-now {
    padding-left: 50%;
  }
...
}
@media (max-width:47em) {
...
  .posted-now {
    padding-left: 0;
  }
...
}

If Phil’s okay with this, then he can stick it in the CSS. If he’d prefer an HTML solution, then I’m sure we can code it that way instead.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#28 2020-01-10 00:09:46

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,654
Website

Re: Date Object associate to content to links

That is fine, except for the Write panel, which also has a .posted-now {} field in the side bar (*).

But anyway, something like that is fine, as far as I am concerned.

(*) with an every so slightly different markup…


Where is that emoji for a solar powered submarine when you need it ?

Offline

#29 2020-01-10 00:12:44

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,654
Website

Re: Date Object associate to content to links

Hmm, this selector would be better: .txp-edit .posted-now {}

That would only affect those Edit panels.


Where is that emoji for a solar powered submarine when you need it ?

Offline

#30 2020-01-10 00:42:48

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,719
Website GitHub

Re: Date Object associate to content to links

Yeah, I’ll leave selectors to those that know better. Your versions are better; mine were just for illustration.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#31 2020-01-10 16:40:09

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,333
Website

Re: Date Object associate to content to links

phiw13 wrote #320993:

Hmm, this selector would be better: .txp-edit .posted-now {}

That would only affect those Edit panels.

Yes.

Or alternatively as a separate indent helper class in the css which is then added to the class list of the items that should push over into the second “column”.
AFAIR I think I added something similar for the field hint instructions in glz_custom_fields.


TXP Builders – finely-crafted code, design and txp

Offline

#32 2020-01-10 18:28:18

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,719
Website GitHub

Re: Date Object associate to content to links

Cool. I’m easy with whichever method works and Phil is willing to support!


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#33 2020-01-10 23:51:56

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,654
Website

Re: Date Object associate to content to links

jakob wrote #321004:

Yes.

Or alternatively as a separate indent helper class in the css which is then added to the class list of the items that should push over into the second “column”.

Yes. That would be ideal. Lacking that, I went with the above selector.

AFAIR I think I added something similar for the field hint instructions in glz_custom_fields.

Indeed you did, and that is one case where the helper class would be very useful, as it would leave the actual values to the theme in use.


Where is that emoji for a solar powered submarine when you need it ?

Offline

#34 2020-01-11 08:11:12

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,719
Website GitHub

Re: Date Object associate to content to links

phiw13 wrote #321020:

that is one case where the helper class would be very useful, as it would leave the actual values to the theme in use.

Is this something we could offer in core easily?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#35 2020-01-11 09:03:08

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,654
Website

Re: Date Object associate to content to links

Bloke wrote #321026:

Is this something we could offer in core easily?

Core could have a helper class that can be used in those cases. For example, in the case discussed in this thread, you could add that helper class to the div class="posted-now", and Hive theme can then use that class to use the values given above. I suppose for Core it is just changing div class="posted-now" to div class="txp-form-field-foo posted-now" with txp-form-field-foo being the name of the helper class. Phil can then use that class in Hive .txp-form-field-foo { padding-left:50%;}. I leave the name up to Phil ~:)

And then Jacob could use the same class for his help text fields that are equally offset in the glz_custom_fields plugin, and not worry about the actual values.


Where is that emoji for a solar powered submarine when you need it ?

Offline

#36 2020-01-11 09:35:18

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,719
Website GitHub

Re: Date Object associate to content to links

@phiw13. Sounds like a winner to me. Thoughts, Phil?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB