quintel / documentation

Documentation for the Energytransitionmodel.
https://docs.energytransitionmodel.com
6 stars 6 forks source link

Automatically label NEW and UPDATED pages #182

Open mabijkerk opened 5 months ago

mabijkerk commented 5 months ago

Currently, to add a NEW or UPDATED label to the documentation, this needs to be manually added in custom.css file. For example:

/* Add "New" tag to some sidebar items. */
.menu a[href="/main/scenario-tools/slider-comparison"]:after {
  -webkit-font-smoothing: initial;
  border-radius: 4px;
  border: 1px solid #bac0d4;
  content: "New";
  color: #a0a6bb;
  font-size: 11px;
  font-weight: 400;
  height: 1rem;
  line-height: 1rem;
  margin: 0 0 0 auto;
  padding: 0 0.25rem;
  text-transform: uppercase;
}

.menu a.menu__link--active[href="/main/scenario-tools/slider-comparison"]:after {
  color: #e8eeff;
  border-color: #e8eeff;
}

It would be awesome if we could add a feature that automatically labels NEW and UPDATED documentation. This would then also remove the label after e.g. 2 months (or after each deploy?). Assigning @noracato but with (very) low priority.