Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Styles for the release notes #1228

Merged
merged 5 commits into from
Dec 10, 2012
Merged

Styles for the release notes #1228

merged 5 commits into from
Dec 10, 2012

Conversation

skurfer
Copy link
Member

@skurfer skurfer commented Nov 19, 2012

The other day, @HenningJ suggested adding some style to the release notes. Sounds like a good idea, and it's a pretty easy change, so here it is. Nothing too exciting, but's better than before at least.

It's hard to tell exactly what changed in the Xcode project, so I'll explain. (This is under the "Release Notes" build phase of the Preflight target.) I just altered the Python code to read the contents of QSStyle.css into a string, then insert that string into the <head> of the release notes. We can't just link to the file because we don't know where the application will be on disk, so the styles are embedded directly.

This is a pull against master, but it's a pretty small if you think the release notes for B71 should look nice. :-)

I'm open to ideas on how to spice it up a little. (Cool background image like the TextMate release notes, anyone?)

Specifically, the same style will be applied to plug-in documentation and release notes.
@pjrobertson
Copy link
Member

Looks good.

I definitely think spicing up the release notes a bit would be good though :)

We need to watch out that adding CSS doesn't conflict with what's put on http://qsapp.com/changelog.php
But that's a stripped down version of the change log (no headers etc.) anyway

@skurfer
Copy link
Member Author

skurfer commented Nov 20, 2012

We need to watch out that adding CSS doesn't conflict with what's put on http://qsapp.com/changelog.php

It doesn't. The plain HTML is written in a separate step.

@pjrobertson
Copy link
Member

Here's some tinkering:

html {
background-color: rgba(127,75,148,0.2); 
}

body {
background: url('../Resources/Quicksilver.icns') no-repeat top right;
background-size: 200px 200px;
background-attachment: fixed; 
}

Needs a bit of work (we need top make a say 256x256 .png from the .icns and add a bit of padding, maybe transparency) but I think we're there really :)

@skurfer
Copy link
Member Author

skurfer commented Nov 29, 2012

background-color: rgba(127,75,148,0.2);

I don't like the idea of setting transparency on <html> or <body>. There won't ever be anything "behind" those things, so why not just set the resulting color directly?

background: url('../Resources/Quicksilver.icns') no-repeat top right;

Since the release notes open in a browser, we can't refer to any images inside the application. We'd have to alter the release notes to open in our own WebKit view, the way documentation does to use an image.

And keep in mind all the documentation uses the same stylesheet. But if we want to separate them, we could always have the script insert <div id="qsrelease"> around everything and then target that in the CSS.

@HenningJ
Copy link
Contributor

background: url('../Resources/Quicksilver.icns') no-repeat top right;

Since the release notes open in a browser, we can't refer to any images
inside the application. We'd have to alter the release notes to open in our
own WebKit view, the way documentation does to use an image.

Doesn't the release notes html file also reside somewhere within the
application? So why shouldn't relative paths to another file within
the application work?

@skurfer
Copy link
Member Author

skurfer commented Nov 29, 2012

So why shouldn't relative paths to another file within the application work?

Yes, that should work fine. I'm just a moron. :-) I'll change this so it doesn't copy the CSS into the HTML file.

@HenningJ
Copy link
Contributor

Still, should keep it simple. Don't go to fancy. :-)

On Thu, Nov 29, 2012 at 8:04 PM, Rob McBroom notifications@github.com wrote:

So why shouldn't relative paths to another file within the application
work?

Yes, that should work fine. I'm just a moron. :-) I'll change this so it
doesn't copy the CSS into the HTML file.


Reply to this email directly or view it on GitHub.

* reference the CSS instead of including its contents
* wrap the release notes in a div (#qsrn) so they can be targeted separately from other documentation
Obviously inspired by TextMate 2's release notes :-)
@skurfer
Copy link
Member Author

skurfer commented Nov 29, 2012

OK, two new commits. Incorporated some of the stuff @pjrobertson suggested. Hopefully not too fancy for @HenningJ. :-)

@pjrobertson
Copy link
Member

Yay, my poor CSS attempt worked as expected: it got you fired up about how
bad it was so you could do something better ;-)

Henning pointed out the relative paths thing, so cool :)
Does referencing an .icns really work properly? Nice :)

P.S. Webkit defines the canvas as white. Something I figured from playing
with UIWebView (not sure what the OS X equiv. is)

On 29 November 2012 20:00, Rob McBroom notifications@github.com wrote:

OK, two new commits. Incorporated some of the stuff @pjrobertsonhttps://github.com/pjrobertsonsuggested. Hopefully not too fancy for
@HenningJ https://github.com/HenningJ. :-)


Reply to this email directly or view it on GitHubhttps://github.com//pull/1228#issuecomment-10863745.

@pjrobertson
Copy link
Member

… meaning you can quite happily use transparency on the html element. But
you're right, not really the best thing to do in practice

On 29 November 2012 22:00, Patrick Robertson robertson.patrick@gmail.comwrote:

P.S. Webkit defines the canvas as white. Something I figured from playing
with UIWebView (not sure what the OS X equiv. is)

@pjrobertson
Copy link
Member

P.P.S damn your silly typo in the branch name! :P

@pjrobertson
Copy link
Member

  • Can we make it a little more flashy. Like give the body a background like QSApp.com, but way more faint (like 0.2 alpha)
  • Your CSS for the qsrn is #qsrn body. Seems like that's a stray body you've got there!
  • I still think the icon could be bigger.

Here's my refined take:

html {
    background-color:#fff;
}
body {
  background: url('../Resources/Quicksilver.icns') no-repeat top right;
  background-size: 512px 512px;
  background-attachment: fixed;
  background-color:#fff;
  background-color:rgba(128,81,149,0.2);
}
#qsrn ul {
  background-color: rgba(242, 237, 245, 0.9);
  border-radius: 0.5em;
  padding: 1em 1em 1em 2em;
}

@skurfer
Copy link
Member Author

skurfer commented Nov 30, 2012

damn your silly typo in the branch name!

Heh. Never even noticed until now. That should have been a harbinger of all the dumb mistakes I was going to make in this branch. The icns reference does work but not the way I've done it obviously. Dealing with CSS apparently makes me overconfident. :-/

I'll just put the id attribute on the body tag itself and get the (bigger) icon working.

Doesn't your shell do completion on branch names? :-)

* body goes edge-to-edge
* a new #content div surrounds everything
* fixed and enlarged the icon in the release notes
@skurfer
Copy link
Member Author

skurfer commented Nov 30, 2012

More changes:

  • We can't put the image on <body> directly because that will affect documentation too
  • The image alone was a little too much, so I made it the background for <body> and added a content layer to stick your background color on (so the image itself will be washed out a bit)
  • Made the lists slightly less transparent
  • Added the #content div to the documentation too, so it would have some padding

pjrobertson added a commit that referenced this pull request Dec 10, 2012
Styles for the release notes
@pjrobertson pjrobertson merged commit 1ae8a55 into quicksilver:master Dec 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants