Does stylesheet.css still work in 1.4.0??

Asked by Todd

I noticed that stylesheet.css does not exist by default (in the linux flavor of RedNotebook), but I added it (in /usr/share/rednotebook/rednotebook/files) and it does not seem to be making a difference in the layout. I attempting to add the following to make the tables render a bit nicer in the application:

I want to add

table, th, tr, td {padding: 5px}

Obviously, I can't do this inline (table structure is hidden to me), so I wanted to be able to configure this in a stylesheet.

So, here are the actual questions:

1. Is the stylesheet.css still being read in 1.4.0 (I read that it was used in an older release on the depreciated forum)?
2. If #1 is true, do I have the right file location.
3. Does what I am trying to do make sense? Can it be accomplished a different way?

Thanks!

Question information

Language:
English Edit question
Status:
Answered
For:
RedNotebook Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jendrik Seipp (jendrikseipp) said :
#1

Currently this can only be accomplished by changing the code directly,
because the stylesheet.css file is not read anymore, but constructed by
the code. Have a look at the file rednotebook/util/markup.py. The style
is set there.

Revision history for this message
Todd (mandor-n) said :
#2

Jenrick,

Thanks so much! This worked great....for Linux. For the Windows version (which I use on my laptop), I can't find the markup.py (or the entire utils directory, for that matter). Is there any other way to be able to get at the style definitions other than building from source on Windows? I can certainly go this route, even though it's a bit cumbersome to do for each change I make to the markup.py. It's a long shot, but I thought I would ask if there was an easier way.

Again, though, FANTASTIC application! I use it daily and is one of the few applications I've ever supported financially. Keep up the great work!

Revision history for this message
Jendrik Seipp (jendrikseipp) said :
#3

Sorry, changing this on windows is indeed not simple. You can find build
instructions under win/build-win.txt

Revision history for this message
Todd (mandor-n) said :
#4

Jendrik,

Finally got around to building a windows version based on the build-win.txt and the thread here on the forum - not exactly easy, but ultimately I got it done. I wanted to add a note here to others who might want to take advantage of CSS within Rednotebook. While the CSS is hardcoded in the markup.py folder, you can actually embed CSS within Rednotebook and it renders just fine. For example:

Anywhere in the journal for a particular day:
''<style type="text/css">p {font-weight:bold;}</style>''

# The following is bold
''<p>''This is bold''</p>''

# This is not bold
This is not bold

This is just a simple example, but can be extended quite nicely to allow classes and divs to allow for some really slick formatting. I have not tested .pdf output yet (I know most .pdf converters only process inline CSS), but for having a nice looking journal within Rednotebook this has some really cool applications!

Hope this helps someone.

Todd

Can you help with this problem?

Provide an answer of your own, or ask Todd for more information if necessary.

To post a message you must log in.