Unverified Commit c516295b authored by Pascal Breuer's avatar Pascal Breuer
Browse files

Add config option to disable incident history

parent ab704222
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -172,6 +172,12 @@ params:
  # STRING; `monthly`, `yearly`, `none`
  incidentHistoryFormat: "yearly"

  # Should incident history be enabled?
  #
  # Default: `true`
  # BOOLEAN; `true`, `false`
  enableHistory: true

  # Disable dark mode
  #
  # If your OS and browser support the
+12 −10
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@
  {{ partial "index/tabs" . }}

  <!-- All incidents + pagination -->
  {{ if .Site.Params.enableHistory }}
    <div class="contain contain--more" id="incidents">
      {{ if eq .Site.Params.incidentHistoryFormat "yearly" }}
        {{ partial "index/incidents-yearly" . }}
@@ -47,6 +48,7 @@
      {{ end }}
      <div class="padding"></div>
    </div>
  {{ end }}

  {{ partial "js" . }}
  {{ partial "footer" . }}
+32 −30
Original line number Diff line number Diff line
{{ if .Site.Params.enableHistory }}
  <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
      <!--
@@ -28,3 +29,4 @@
      {{ end }}
    </channel>
  </rss>
{{ end }}
 No newline at end of file
+18 −16
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
    <!-- Please keep this one around to help cState grow <3 -->
    <small class="footer__copyright faded">{{ T "poweredBy" }} <a href="https://github.com/cstate/cstate"><b>cState</b></a></small>

    {{ if .Site.Params.enableHistory }}
      <hr>
      
      <p class="hinted">
@@ -29,6 +30,7 @@
          {{ end }}
        </small>
      </p>
    {{ end }}
  </div>
</div>

+6 −4
Original line number Diff line number Diff line
@@ -13,8 +13,10 @@
    </div>
  </div>
{{ else }}
  {{ if .Site.Params.enableHistory }}
    <div class="contain contain--more">
      <h2 class="center">{{ T "incidentHistory" }}</h2>
      <hr class="clean">
    </div>
  {{ end }}
{{ end }}
 No newline at end of file
Loading