Skip to content

Commit

Permalink
dbg; switch h4 w/ h5
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Reagle committed Aug 27, 2012
1 parent 7ceebeb commit 3c4ed18
Show file tree
Hide file tree
Showing 3 changed files with 194 additions and 95 deletions.
89 changes: 50 additions & 39 deletions class.dzslides
Original file line number Diff line number Diff line change
Expand Up @@ -181,28 +181,31 @@ $endfor$
border: 1px solid #e0e0e0;
}

/********************************************************/
/********************** Images **************************/

/* An image in a multi-element slide are floated to either side for variety */
section:nth-child(odd) > a:not(:only-child) > img,
section:nth-child(odd) > p:not(:only-child) > img {
float: right;
/* margin-top: 50px; */
padding: 0px 5px 0px 5px;
max-width: 400px; max-height: 300px;
/* border: 2px solid green; */
}
section:nth-child(even) > a:not(:only-child) > img,
section:nth-child(even) > p:not(:only-child) > img {
float: left;
/* margin-top: 50px; */
padding: 0px 5px 0px 5px;
max-width: 400px; max-height: 300px;
/* border: 2px solid green; */
}


/*******************************************************/
/* Center lone (hypertexted) images*/
/* The third selector specification below is redundant if I
used a descendant selector on the first one. But that doesn't
work as I would expect, so I specify using (more)
children selectors */
section > p:last-child > img:only-child,
section > a:last-child > img:only-child,
section > p:last-child > a:only-child > img:only-child {
Expand All @@ -228,7 +231,11 @@ $endfor$

/*******************************************************/
/* Figures are stretched full-page, with the caption
on top of the image/video */
on top of the image/video. These are generated by
pandoc when an image occurs by itself in a paragraph.
Hence, they can not be hypertextual.
http://johnmacfarlane.net/pandoc/README.html#pictures-with-captions
*/
figure {
background-color: black;
width: 100%;
Expand Down Expand Up @@ -256,8 +263,11 @@ $endfor$
width: 80%;
}

/*******************************************************/
/* h4 + imgs are constrained (not stretched) and overlayed with text */
/***********************************************************/
/* h4 + imgs are full page (like figure/captions), but
permit the image to be hypertextual, i.e., appear
within an <a> element in the paragraph.
*/
h4 {
position: absolute;
margin-left: auto;
Expand All @@ -268,29 +278,32 @@ $endfor$
text-align: center;
}
section:nth-child(odd) h4 {
top: 470px;
left: 05px;
bottom: 20px;
left: 20px;
text-align:left;
}
section:nth-child(even) h4 {
top: 20px;
right: 05px;
top: 10px;
right: 10px;
text-align:right;
width: 80%;
}
/* Center h4s lone (hypertexted) image*/
h4 + p:last-child img:only-child,
h4 + a:last-child > img:only-child,
h4 + p:last-child > a:only-child > img:only-child {
float: none;
/* 750px is needed to keep centered given parent <p>'s margins */
max-width: 750px; max-height: 600px; /* but don't stretch it */
margin-left: auto; margin-right: auto;
/* border: 8px solid red; */
h4 + p:last-child > img:only-child,
h4 + a:last-child > img:only-child,
h4 + p:last-child > a:last-child > img:only-child {
display: block;
padding: 0px;
max-width: 800px;
max-height: 600px;
position: absolute;
width: 100%; height: 100%;
}
h4 + p:last-child {
margin-left: 0px; /* reset p's left margin */
}

/***********************************************************/
/* h5 + imgs are full page (like figure/captions), but */
/* permit the image to be hypertexted, which pandoc will */
/* not generate as it only creates figure/captions when */
/* they appear on their own line. */
/*******************************************************/
/* h5 + imgs are constrained (not stretched) and overlayed with text */
h5 {
position: absolute;
margin-left: auto;
Expand All @@ -301,27 +314,25 @@ $endfor$
text-align: center;
}
section:nth-child(odd) h5 {
bottom: 20px;
left: 20px;
text-align:left;
top: 470px;
left: 05px;
}
section:nth-child(even) h5 {
top: 10px;
right: 10px;
text-align:right;
width: 80%;
top: 20px;
right: 05px;
}
/* Center h5s lone (hypertexted) image*/
h5 + p:last-child img:only-child,
h5 + a:last-child > img:only-child {
display: block;
margin: 0px;
padding: 0px;
max-width: 800px;
max-height: 600px;
position: absolute;
width: 100%; height: 100%;
h5 + a:last-child > img:only-child,
h5 + p:last-child > a:only-child > img:only-child {
float: none;
/* 750px is needed to keep centered given parent <p>'s margins */
max-width: 750px; max-height: 600px; /* but don't stretch it */
margin-left: auto; margin-right: auto;
/* border: 8px solid red; */
}


/*******************************************************/
/* Footer */
footer {
Expand Down
Loading

0 comments on commit 3c4ed18

Please sign in to comment.