ubc-web-services / galactus

A Drupal version of the UBC CLF theme
MIT License
6 stars 5 forks source link

Denote unpublished pages #35

Open joelpittet opened 6 years ago

joelpittet commented 6 years ago

There is a node--unpublished class added to the article. This used be a pink background color denoting unpublished state. I think we could do better. Maybe a badge/label that says "Unpublished" injected via that CSS class?

occupant commented 6 years ago

Agreed. Something very like this is in Megatron. From the node.tpl:

<?php if ($unpublished): ?><div class="unpublished"><?php print t('Unpublished'); ?></div><?php endif; ?>

And the css:

.node-unpublished {
  background-color: #fff
}

.node-unpublished div.unpublished {
  height: 0;
  overflow: visible;
  color: #d8d8d8;
  font-size: 4.6875em;
  line-height: 1;
  font-family: Impact, "Arial Narrow", Helvetica, sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  word-wrap: break-word
}

The css there could be cleaner but the general approach is probably a good starting point.

EDIT - good grief, markdown is not my friend this morning.

joelpittet commented 6 years ago

I can edit your comments apparently, lol. add three back-ticks.

That would be a good start, I'd ditch the font-family, height, 'overflow, andword-wrapanddiv` selector and pump that in there as a first iteration.