When blogging recipes, how can I support both readers who want the narrative/journey and ones who want the printer-friendly recipe?How can one effectively organize scenes and snippets?How can I manage screen shots and other graphics for maintenance?How can I express this fragment more clearly and concisely?How do I write an article about the negative effects of a topic and my experiences with that topic?How large should photos on my blog be?How can I trim my word count and still be proud of what I've written?
Why are only specific transaction types accepted into the mempool?
Suffixes -unt and -ut-
Mathematical cryptic clues
Pronouncing Dictionary.com's W.O.D "vade mecum" in English
Disadvantages of online checking accounts?
How to re-create Edward Weson's Pepper No. 30?
"which" command doesn't work / path of Safari?
Why are 150k or 200k jobs considered good when there are 300k+ births a month?
If Manufacturer spice model and Datasheet give different values which should I use?
How old can references or sources in a thesis be?
Why is an old chain unsafe?
Why Is Death Allowed In the Matrix?
XeLaTeX and pdfLaTeX ignore hyphenation
Can I use the Wish spell to become the ruler of all dragons?
GPS Rollover on Android Smartphones
Is it tax fraud for an individual to declare non-taxable revenue as taxable income? (US tax laws)
How did the USSR manage to innovate in an environment characterized by government censorship and high bureaucracy?
Infinite past with a beginning?
Is the language p and n are natural numbers and there's no prime number in [p,p+n] belongs to NP class?
Why don't electron-positron collisions release infinite energy?
How is this relation reflexive?
Why has Russell's definition of numbers using equivalence classes been finally abandoned? ( If it has actually been abandoned).
TGV timetables / schedules?
The use of multiple foreign keys on same column in SQL Server
When blogging recipes, how can I support both readers who want the narrative/journey and ones who want the printer-friendly recipe?
How can one effectively organize scenes and snippets?How can I manage screen shots and other graphics for maintenance?How can I express this fragment more clearly and concisely?How do I write an article about the negative effects of a topic and my experiences with that topic?How large should photos on my blog be?How can I trim my word count and still be proud of what I've written?
Increasingly often, if you Google for a recipe your search results will be full of long, image-rich blog posts that, somewhere in there, have the actual recipe you were looking for. Many of these have a "printer-friendly version" link to make that easier; I can get the stuff I need in my kitchen on paper easily, but the author doesn't have to cut back on the part that is interesting when cooking is not imminent. Here's an example of the basic idea -- if you click on the "print" link it starts your browser print dialogue with a subset of the page's content. But that site made a separate page for the print version, and I want to post the recipe once not twice.
As somebody who sometimes posts about cooking, including recipes, on my blog, I'd like to be able to offer that printer-friendly version, too -- but I don't want to have to create the content twice. Is there some script or HTML magic that can help me? I write my blog posts in markdown and can include HTML tags. How do I modify my source to mark a portion of the post as content for a "print" link (and generate the link)?
non-fiction tools blog food-writing
add a comment |
Increasingly often, if you Google for a recipe your search results will be full of long, image-rich blog posts that, somewhere in there, have the actual recipe you were looking for. Many of these have a "printer-friendly version" link to make that easier; I can get the stuff I need in my kitchen on paper easily, but the author doesn't have to cut back on the part that is interesting when cooking is not imminent. Here's an example of the basic idea -- if you click on the "print" link it starts your browser print dialogue with a subset of the page's content. But that site made a separate page for the print version, and I want to post the recipe once not twice.
As somebody who sometimes posts about cooking, including recipes, on my blog, I'd like to be able to offer that printer-friendly version, too -- but I don't want to have to create the content twice. Is there some script or HTML magic that can help me? I write my blog posts in markdown and can include HTML tags. How do I modify my source to mark a portion of the post as content for a "print" link (and generate the link)?
non-fiction tools blog food-writing
2
I also blog recipes and want this feature! What a great question.
– Cyn
46 mins ago
add a comment |
Increasingly often, if you Google for a recipe your search results will be full of long, image-rich blog posts that, somewhere in there, have the actual recipe you were looking for. Many of these have a "printer-friendly version" link to make that easier; I can get the stuff I need in my kitchen on paper easily, but the author doesn't have to cut back on the part that is interesting when cooking is not imminent. Here's an example of the basic idea -- if you click on the "print" link it starts your browser print dialogue with a subset of the page's content. But that site made a separate page for the print version, and I want to post the recipe once not twice.
As somebody who sometimes posts about cooking, including recipes, on my blog, I'd like to be able to offer that printer-friendly version, too -- but I don't want to have to create the content twice. Is there some script or HTML magic that can help me? I write my blog posts in markdown and can include HTML tags. How do I modify my source to mark a portion of the post as content for a "print" link (and generate the link)?
non-fiction tools blog food-writing
Increasingly often, if you Google for a recipe your search results will be full of long, image-rich blog posts that, somewhere in there, have the actual recipe you were looking for. Many of these have a "printer-friendly version" link to make that easier; I can get the stuff I need in my kitchen on paper easily, but the author doesn't have to cut back on the part that is interesting when cooking is not imminent. Here's an example of the basic idea -- if you click on the "print" link it starts your browser print dialogue with a subset of the page's content. But that site made a separate page for the print version, and I want to post the recipe once not twice.
As somebody who sometimes posts about cooking, including recipes, on my blog, I'd like to be able to offer that printer-friendly version, too -- but I don't want to have to create the content twice. Is there some script or HTML magic that can help me? I write my blog posts in markdown and can include HTML tags. How do I modify my source to mark a portion of the post as content for a "print" link (and generate the link)?
non-fiction tools blog food-writing
non-fiction tools blog food-writing
edited 7 mins ago
Monica Cellio
asked 57 mins ago
Monica Cellio♦Monica Cellio
16.8k23688
16.8k23688
2
I also blog recipes and want this feature! What a great question.
– Cyn
46 mins ago
add a comment |
2
I also blog recipes and want this feature! What a great question.
– Cyn
46 mins ago
2
2
I also blog recipes and want this feature! What a great question.
– Cyn
46 mins ago
I also blog recipes and want this feature! What a great question.
– Cyn
46 mins ago
add a comment |
2 Answers
2
active
oldest
votes
CSS supports media queries since Level 2, Revision 1. That's from way back in 2011, so any modern web browser should support it.
If you're able to specify custom CSS, and apply custom CSS classes to your content, then you can define a CSS class such that the pictures and other ancilliary content is shown on screen, but only the actual recipe is printed on paper.
This way, you don't need to have a separate "printer friendly" page, because you're using CSS to define what "printer friendly" means for your particular content. Of course, it assumes that you have control over the CSS in the first place! The person visiting your web site just prints via their browser's normal "print" function.
Specifically, as discussed on MDN, you can either target print media, or a specific characteristic of a media (a feature). For the former, you'd add something like
@media print
img.food-photo display: none;
body color: black;
to hide food-photo class imgs and set the text color to black when the rendering media is identified as print.
For the latter, you can target non-color-capable media (whether screen, print, or otherwise) by writing something like
@media not color /* untested, but looks like it should work */
body color: black;
to set the text color to black where color is not supported.
These can be combined to form even more complex rules, and of course the normal CSS inheritance rules apply as well, so you can override only those attributes that need to be different between, say, print and non-print.
You might also be interested in CSS feature queries, which look to be similar but geared toward even more specific feature support; for example, one example shows how to apply specific CSS depending on whether display: flex is supported. This looks more useful for when you want to know that the user agent (browser) supports a feature, than for targetting specific media types or capabilities.
I came across a Stack Overflow question at What does @media screen and (max-width: 1024px) mean in CSS? which has some more complex examples that you may find enlightening.
I think that the biggest downside to using CSS for this is that it leaves the visitor with no easy way to print the whole page including the "narrative/journey" if that's what they want to do. There are tricks that one can use, but those by their very nature are rather technical.
add a comment |
You use @media rules in your CSS style sheets to define which html tags you want to print and which are only visible on screen. E.g.
@media print
.stuff-you-don't-want-to-print
display: none;
To print the current browser window, you print it with JavaScript, e.g.
<a href="javascript:window.print()">Print</a>
The page you link to actually provides a separate web page to print. You can see that the URL of the page you print is different than the URL of the blog post. And if you look at the source code the pages are different. So in fact your "example" is an example of what you don't want, when you say that "[you] don't want to have to create the content twice". That page has created the content twice.
If you don't want to create the content twice, use media queries.
About the example -- yeah, I meant that that's the effect I want, but not that implementation. I"ll clarify. As for your meta question, software questions about publishing are fine here; we even have a whole tag, plus several others (like scrivener and dita).
– Monica Cellio♦
14 mins ago
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "166"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwriting.stackexchange.com%2fquestions%2f44450%2fwhen-blogging-recipes-how-can-i-support-both-readers-who-want-the-narrative-jou%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
CSS supports media queries since Level 2, Revision 1. That's from way back in 2011, so any modern web browser should support it.
If you're able to specify custom CSS, and apply custom CSS classes to your content, then you can define a CSS class such that the pictures and other ancilliary content is shown on screen, but only the actual recipe is printed on paper.
This way, you don't need to have a separate "printer friendly" page, because you're using CSS to define what "printer friendly" means for your particular content. Of course, it assumes that you have control over the CSS in the first place! The person visiting your web site just prints via their browser's normal "print" function.
Specifically, as discussed on MDN, you can either target print media, or a specific characteristic of a media (a feature). For the former, you'd add something like
@media print
img.food-photo display: none;
body color: black;
to hide food-photo class imgs and set the text color to black when the rendering media is identified as print.
For the latter, you can target non-color-capable media (whether screen, print, or otherwise) by writing something like
@media not color /* untested, but looks like it should work */
body color: black;
to set the text color to black where color is not supported.
These can be combined to form even more complex rules, and of course the normal CSS inheritance rules apply as well, so you can override only those attributes that need to be different between, say, print and non-print.
You might also be interested in CSS feature queries, which look to be similar but geared toward even more specific feature support; for example, one example shows how to apply specific CSS depending on whether display: flex is supported. This looks more useful for when you want to know that the user agent (browser) supports a feature, than for targetting specific media types or capabilities.
I came across a Stack Overflow question at What does @media screen and (max-width: 1024px) mean in CSS? which has some more complex examples that you may find enlightening.
I think that the biggest downside to using CSS for this is that it leaves the visitor with no easy way to print the whole page including the "narrative/journey" if that's what they want to do. There are tricks that one can use, but those by their very nature are rather technical.
add a comment |
CSS supports media queries since Level 2, Revision 1. That's from way back in 2011, so any modern web browser should support it.
If you're able to specify custom CSS, and apply custom CSS classes to your content, then you can define a CSS class such that the pictures and other ancilliary content is shown on screen, but only the actual recipe is printed on paper.
This way, you don't need to have a separate "printer friendly" page, because you're using CSS to define what "printer friendly" means for your particular content. Of course, it assumes that you have control over the CSS in the first place! The person visiting your web site just prints via their browser's normal "print" function.
Specifically, as discussed on MDN, you can either target print media, or a specific characteristic of a media (a feature). For the former, you'd add something like
@media print
img.food-photo display: none;
body color: black;
to hide food-photo class imgs and set the text color to black when the rendering media is identified as print.
For the latter, you can target non-color-capable media (whether screen, print, or otherwise) by writing something like
@media not color /* untested, but looks like it should work */
body color: black;
to set the text color to black where color is not supported.
These can be combined to form even more complex rules, and of course the normal CSS inheritance rules apply as well, so you can override only those attributes that need to be different between, say, print and non-print.
You might also be interested in CSS feature queries, which look to be similar but geared toward even more specific feature support; for example, one example shows how to apply specific CSS depending on whether display: flex is supported. This looks more useful for when you want to know that the user agent (browser) supports a feature, than for targetting specific media types or capabilities.
I came across a Stack Overflow question at What does @media screen and (max-width: 1024px) mean in CSS? which has some more complex examples that you may find enlightening.
I think that the biggest downside to using CSS for this is that it leaves the visitor with no easy way to print the whole page including the "narrative/journey" if that's what they want to do. There are tricks that one can use, but those by their very nature are rather technical.
add a comment |
CSS supports media queries since Level 2, Revision 1. That's from way back in 2011, so any modern web browser should support it.
If you're able to specify custom CSS, and apply custom CSS classes to your content, then you can define a CSS class such that the pictures and other ancilliary content is shown on screen, but only the actual recipe is printed on paper.
This way, you don't need to have a separate "printer friendly" page, because you're using CSS to define what "printer friendly" means for your particular content. Of course, it assumes that you have control over the CSS in the first place! The person visiting your web site just prints via their browser's normal "print" function.
Specifically, as discussed on MDN, you can either target print media, or a specific characteristic of a media (a feature). For the former, you'd add something like
@media print
img.food-photo display: none;
body color: black;
to hide food-photo class imgs and set the text color to black when the rendering media is identified as print.
For the latter, you can target non-color-capable media (whether screen, print, or otherwise) by writing something like
@media not color /* untested, but looks like it should work */
body color: black;
to set the text color to black where color is not supported.
These can be combined to form even more complex rules, and of course the normal CSS inheritance rules apply as well, so you can override only those attributes that need to be different between, say, print and non-print.
You might also be interested in CSS feature queries, which look to be similar but geared toward even more specific feature support; for example, one example shows how to apply specific CSS depending on whether display: flex is supported. This looks more useful for when you want to know that the user agent (browser) supports a feature, than for targetting specific media types or capabilities.
I came across a Stack Overflow question at What does @media screen and (max-width: 1024px) mean in CSS? which has some more complex examples that you may find enlightening.
I think that the biggest downside to using CSS for this is that it leaves the visitor with no easy way to print the whole page including the "narrative/journey" if that's what they want to do. There are tricks that one can use, but those by their very nature are rather technical.
CSS supports media queries since Level 2, Revision 1. That's from way back in 2011, so any modern web browser should support it.
If you're able to specify custom CSS, and apply custom CSS classes to your content, then you can define a CSS class such that the pictures and other ancilliary content is shown on screen, but only the actual recipe is printed on paper.
This way, you don't need to have a separate "printer friendly" page, because you're using CSS to define what "printer friendly" means for your particular content. Of course, it assumes that you have control over the CSS in the first place! The person visiting your web site just prints via their browser's normal "print" function.
Specifically, as discussed on MDN, you can either target print media, or a specific characteristic of a media (a feature). For the former, you'd add something like
@media print
img.food-photo display: none;
body color: black;
to hide food-photo class imgs and set the text color to black when the rendering media is identified as print.
For the latter, you can target non-color-capable media (whether screen, print, or otherwise) by writing something like
@media not color /* untested, but looks like it should work */
body color: black;
to set the text color to black where color is not supported.
These can be combined to form even more complex rules, and of course the normal CSS inheritance rules apply as well, so you can override only those attributes that need to be different between, say, print and non-print.
You might also be interested in CSS feature queries, which look to be similar but geared toward even more specific feature support; for example, one example shows how to apply specific CSS depending on whether display: flex is supported. This looks more useful for when you want to know that the user agent (browser) supports a feature, than for targetting specific media types or capabilities.
I came across a Stack Overflow question at What does @media screen and (max-width: 1024px) mean in CSS? which has some more complex examples that you may find enlightening.
I think that the biggest downside to using CSS for this is that it leaves the visitor with no easy way to print the whole page including the "narrative/journey" if that's what they want to do. There are tricks that one can use, but those by their very nature are rather technical.
edited 26 mins ago
answered 40 mins ago
a CVn♦a CVn
2,71231733
2,71231733
add a comment |
add a comment |
You use @media rules in your CSS style sheets to define which html tags you want to print and which are only visible on screen. E.g.
@media print
.stuff-you-don't-want-to-print
display: none;
To print the current browser window, you print it with JavaScript, e.g.
<a href="javascript:window.print()">Print</a>
The page you link to actually provides a separate web page to print. You can see that the URL of the page you print is different than the URL of the blog post. And if you look at the source code the pages are different. So in fact your "example" is an example of what you don't want, when you say that "[you] don't want to have to create the content twice". That page has created the content twice.
If you don't want to create the content twice, use media queries.
About the example -- yeah, I meant that that's the effect I want, but not that implementation. I"ll clarify. As for your meta question, software questions about publishing are fine here; we even have a whole tag, plus several others (like scrivener and dita).
– Monica Cellio♦
14 mins ago
add a comment |
You use @media rules in your CSS style sheets to define which html tags you want to print and which are only visible on screen. E.g.
@media print
.stuff-you-don't-want-to-print
display: none;
To print the current browser window, you print it with JavaScript, e.g.
<a href="javascript:window.print()">Print</a>
The page you link to actually provides a separate web page to print. You can see that the URL of the page you print is different than the URL of the blog post. And if you look at the source code the pages are different. So in fact your "example" is an example of what you don't want, when you say that "[you] don't want to have to create the content twice". That page has created the content twice.
If you don't want to create the content twice, use media queries.
About the example -- yeah, I meant that that's the effect I want, but not that implementation. I"ll clarify. As for your meta question, software questions about publishing are fine here; we even have a whole tag, plus several others (like scrivener and dita).
– Monica Cellio♦
14 mins ago
add a comment |
You use @media rules in your CSS style sheets to define which html tags you want to print and which are only visible on screen. E.g.
@media print
.stuff-you-don't-want-to-print
display: none;
To print the current browser window, you print it with JavaScript, e.g.
<a href="javascript:window.print()">Print</a>
The page you link to actually provides a separate web page to print. You can see that the URL of the page you print is different than the URL of the blog post. And if you look at the source code the pages are different. So in fact your "example" is an example of what you don't want, when you say that "[you] don't want to have to create the content twice". That page has created the content twice.
If you don't want to create the content twice, use media queries.
You use @media rules in your CSS style sheets to define which html tags you want to print and which are only visible on screen. E.g.
@media print
.stuff-you-don't-want-to-print
display: none;
To print the current browser window, you print it with JavaScript, e.g.
<a href="javascript:window.print()">Print</a>
The page you link to actually provides a separate web page to print. You can see that the URL of the page you print is different than the URL of the blog post. And if you look at the source code the pages are different. So in fact your "example" is an example of what you don't want, when you say that "[you] don't want to have to create the content twice". That page has created the content twice.
If you don't want to create the content twice, use media queries.
edited 10 mins ago
bruglesco
2,471742
2,471742
answered 42 mins ago
user37740
About the example -- yeah, I meant that that's the effect I want, but not that implementation. I"ll clarify. As for your meta question, software questions about publishing are fine here; we even have a whole tag, plus several others (like scrivener and dita).
– Monica Cellio♦
14 mins ago
add a comment |
About the example -- yeah, I meant that that's the effect I want, but not that implementation. I"ll clarify. As for your meta question, software questions about publishing are fine here; we even have a whole tag, plus several others (like scrivener and dita).
– Monica Cellio♦
14 mins ago
About the example -- yeah, I meant that that's the effect I want, but not that implementation. I"ll clarify. As for your meta question, software questions about publishing are fine here; we even have a whole tag, plus several others (like scrivener and dita).
– Monica Cellio♦
14 mins ago
About the example -- yeah, I meant that that's the effect I want, but not that implementation. I"ll clarify. As for your meta question, software questions about publishing are fine here; we even have a whole tag, plus several others (like scrivener and dita).
– Monica Cellio♦
14 mins ago
add a comment |
Thanks for contributing an answer to Writing Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwriting.stackexchange.com%2fquestions%2f44450%2fwhen-blogging-recipes-how-can-i-support-both-readers-who-want-the-narrative-jou%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
I also blog recipes and want this feature! What a great question.
– Cyn
46 mins ago