Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
CSS : where am I going wrong (Read 3248 times)
Dr Mark
Full Member
*
Offline



Posts: 26

CSS : where am I going wrong
Mar 6th, 2015, 9:53am
 
Hi

https://www.dropbox.com/s/uttf2gmmv4vkmig/CSS_Trial.tbx?dl=0

I'd be very grateful if someone could spot why this very simple TBX file doesn't produce the desired CSS include changes

The frustration is that I had a more complicated set up working fine with a tbx6 file a year ago ( but haven't kept it)

I'm using TBX a lot at present to construct a weekly Newsletter. I keep agenda/minutes from different types of meetings and tasks arising and add a Newletter boolean attribute if I want my ag_current_newsletter agent to pick it out

The agent is set to a template that produces a good simple HTML output and I'm pleased with the automation - However I would like to start using CSS to make the output more aesthetically pleasing and so created a simple file to prove I could do it - and I can't!

many thanks in advance

Mark


Back to top
 
« Last Edit: Mar 06th, 2015, 9:55am by Dr Mark »  
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: CSS : where am I going wrong
Reply #1 - Mar 6th, 2015, 10:15am
 
You're using ^text^ to export the CSS. As such it is adding HTML to the 'paragraphs' in the CSS note. The folowing answer is tested in v6.1.3…

I suggest adding the build-in "Code" prototype. Duplicate that and call it "Web Code". In the HTML Inspector set the prototype to export ("Code" is set to not export).

Now set your CSS note to use the "Web Code" prototype. For good measure I'd select all the CSS note's Text and Use the Format menu -> Style -> Standard Size and Standard Font to reset defaults.

To 'preview' your CSS use just the HTML tab.

Whilst you could just use ^value($Text)^ instead of the original ^text^ template, the prototype turns off all sort of prose-writing formatting that will like as not break your code with incorrect substitutions.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Dr Mark
Full Member
*
Offline



Posts: 26

Re: CSS : where am I going wrong
Reply #2 - Mar 6th, 2015, 10:46am
 
Wonderful - thank you so much
Back to top
 
 
  IP Logged
Dr Mark
Full Member
*
Offline



Posts: 26

Re: CSS : where am I going wrong
Reply #3 - Mar 6th, 2015, 7:46pm
 
Quote:
To 'preview' your CSS use just the HTML tab.


Does this mean that preview won't render the css changes? Do I have to export and view in a browser to see the results? (Preview is still not reflecting the changes for me after following the above)
Back to top
 
« Last Edit: Mar 6th, 2015, 7:48pm by Dr Mark »  
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: CSS : where am I going wrong
Reply #4 - Mar 7th, 2015, 12:45pm
 
Sorry, I thought the problem was the CSS wasn't exporting properly. OK, you've a host of small mis-configurations. I suspect this was finger trouble setting up the sample doc as I doubt it would work any different in older version, as pesented.  Smiley  Anyway:
  • You have un-set template setting for the "HTML Page" template making it unavailable use.
  • The text export page is using 'HTML Item' as a template (probably because of the above) whereas it should be 'HTML Page'.
  • The test page is incorrectly set to use the 'HTML Template'
  • You are assuming note titles export in actual case. They don't, all characters export lower case and space (plus any non-HTML safe characters) are rendered as underscores. Thus container 'CSS' exports a folder 'css'.
  • You css file exports as styles.css.html. I'd change the $Name to 'styles' and then in HTML Inspector for the note set the export extension to '.css'. TB has no way to guess we extension the user intends.
  • I'd amend your CSS link the HTML Page's <head> section to : <link rel="stylesheet" href="^url("styles")^" type="text/css">
Fix all that, export the doc and then the HTML text page does render. I think TB uses the exported CSS to render the in-doc Preview as if you delete the exported files the Preview isn't styled.

I hope that makes sense.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Dr Mark
Full Member
*
Offline



Posts: 26

Re: CSS : where am I going wrong
Reply #5 - Mar 8th, 2015, 1:02pm
 
Quote:
I hope that makes sense.


Not entirely but exactly the right balance of spoon-feeding and student stretching Smiley

It has worked and I'm very grateful. The preview in tinderbox is working too and stops if the file is removed which is your experience too it seems

Once again any thanks

ps is ^root^ deprecated now in favour of ^url^
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: CSS : where am I going wrong
Reply #6 - Mar 8th, 2015, 4:08pm
 
Good! 'Ease' of use ("I just…") since in awkward counterpoint to flexibility. WE tend to start with none and wanting lots. If still in doubt, do ask. Everything should be explainable!
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1
Send Topic Print