Commit bf8099c8 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Position and style @aside tags output.

For now using the same icons as in tabs.
parent dbc7d05d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ module JsDuck::Tag
    def initialize
      @name = "aside"
      @key = :aside
      @position = :top
      @allowed_types = {
        :guide => true,
        :video => true,
@@ -43,7 +44,9 @@ module JsDuck::Tag
        asset = get_asset(aside[:type], aside[:name])
        if asset
          url = "#!/#{aside[:type]}/#{aside[:name]}"
          "<div class='aside'>#{aside[:type]}: <a href='#{url}'>#{asset["title"]}</a></div>"
          heading = aside[:type].to_s.capitalize
          title = asset["title"]
          "<div class='aside #{aside[:type]}'><h4>#{heading}</h4><p><a href='#{url}'>#{title}</a></p></div>"
        else
          warn("Unknown @aside name: #{aside[:type]} #{aside[:name]}")
        end
+20 −4
Original line number Diff line number Diff line
@@ -3,14 +3,16 @@
@import "mixins";

.class-overview {
  .hierarchy {
  .hierarchy, .aside {
    @include border-radius(5px);
    background-color: #f7f7f7;
    border: 1px solid #ebebeb;
    padding: 0 15px 15px 10px;
    float: right;
    margin: 0 0 40px 60px;
    font-size: 12px;
    clear: right;
    margin: 0 0 10px 60px;
    font-size: 12px; }
  .hierarchy {
    @include gray-h4;
    .dependency, .alternate-class-name {
      padding: 0 0 0 12px;
@@ -23,7 +25,21 @@
      padding: 0 0 0 12px;
      &.first-child {
        background: none;
        padding-left: 15px; } } } }
        padding-left: 15px; } } }
  .aside {
    width: 150px;
    h4 {
      margin: 4px 0;
      font-size: larger;
      color: #526c83;
      padding-left: 22px; }
    &.guide h4 {
      background: url(../images/tabs.png) no-repeat -5px -55px; }
    &.video h4 {
      background: url(../images/tabs.png) no-repeat -6px -38px; }
    &.example h4 {
      background: url(../images/tabs.png) no-repeat -7px -93px; } } }


// Nice styles for headings inside documentation
#center-container .doc-contents {