CDRH / chesnutt

Rails site code for the Charles W. Chesnutt Archive https://chesnuttarchive.org
0 stars 0 forks source link

Display for horizontal lines (milestones) #54

Closed kmcmullen closed 3 years ago

kmcmullen commented 3 years ago

For some instances when there is a horizontal line between sections of text, we've changed the way we're encoding it (deciding that <milestone> was not the correct tag to use in some cases, such as in between lines in a periodical heading).

In such instances, we now have: <lb rend="horBar"/> (simply stating that there is a line-break, that has been visually rendered in some way)

When we encounter one of those in the display, can we just stick a horizontal rule across the page?

See: https://cdrhdev1.unl.edu/chesnutt/item/ccda.works00039 (right after the <head>)

NOTE: There are some instances when we do still use milestone, so we don't want to remove the styling for that.

kmcmullen commented 3 years ago

I've tried getting this to work, and been only partially successful. In the stylesheet I added a @class='horBar' to <hr>, and then in chesnutt.scss I tried to style hr's with that class.

hr {
  &.horBar {
    width: 50%;
    height: 3px;
    color: black;
  }
}

It seems to be catching the correct hr's , and the width adjustment seems to work fine, but the height and color do not work. Not sure why?

karindalziel commented 3 years ago

is this what you wanted?

hr is a little weird, in that you cant really style the line at all, instead you have to add a border.

Screen Shot 2021-06-14 at 4 39 15 PM

kmcmullen commented 3 years ago

That's roughly the idea, yeah. I would maybe prefer a bit thinner line, but that's getting quibbly; if it's hard to change, it'll be just fine as is (assuming Ken doesn't object).

On Mon, Jun 14, 2021 at 4:40 PM Karin Dalziel @.***> wrote:

is this what you wanted?

hr is a little weird, in that you cant really style the line at all, instead you have to add a border.

[image: Screen Shot 2021-06-14 at 4 39 15 PM] https://user-images.githubusercontent.com/284315/121963072-3ae25300-cd2f-11eb-9f2d-c654194bb7c6.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/CDRH/chesnutt/issues/54#issuecomment-861014599, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSKAZ6LUWJQNGRZ3O7E2P3TSZZN5ANCNFSM424BWZSA .

--

Kevin McMullen Research Assistant Professor, Department of English Fellow, Center for Digital Research in the Humanities Project Manager and Associate Editor, Walt Whitman Archive https://whitmanarchive.org/ Editor, Fanny Fern in The New York Ledger http://fannyfern.org/ Project Manager, Charles Chesnutt Digital Archive https://chesnuttarchive.org/ President, Digital Americanists https://digitalamericanists.org/ University of Nebraska-Lincoln 336D Andrews Hall Lincoln, NE 68588-0333 @.***

kmcmullen commented 3 years ago

Just looked at this again, and, yeah, if the lines could be a bit thinner, that would be good. Is that possible?

karindalziel commented 3 years ago

changed it to border-top so it was not doubling. I will move into "check" column when uploaded.

hr {
  &.horBar {
    width: 50%;
    border-top: solid 3px black;
  }
}
kmcmullen commented 3 years ago

That looks good to me. Final request: can you apply that same styling to <milestone>? (I think you're currently applying it to <lb rend="horBar"/> right? works00118 has a <milestone> on line 174. Right now, the milestones are seemingly displaying just like the page-break lines, which is a bit confusing.

Then you can close this out.

karindalziel commented 3 years ago

added css to tei.css:

.milestone {
  width: 50%;
  border-top: solid 3px black;
  display: block;
  text-align: center;
  margin: .3em auto;
}
kmcmullen commented 3 years ago

The milestone thing looks good. Final final request though: I noticed somewhere (and now I can't find where) that a regular <lb> was also displaying with a black line. Maybe the match is just on <lb>? If you match on lb/[@rend], you should be good.

karindalziel commented 3 years ago

I can't find an example of a regular lb displaying as a black line. the default display for lb is to turn into a <br/> and that is working as intended in the files I checked

see: ccda.works00118, search for "ELECTROTYPED AND PRINTED "

tei:

ELECTROTYPED AND PRINTED
<lb/>

html:

   ELECTROTYPED AND PRINTED
   <br></br>

(note that <br></br> is actually incorrect html, but I have not yet figured out how to fix it in the constraints of xslt)

kmcmullen commented 3 years ago

Hmmm. Weird. I must have dreamed that. This looks great then.