diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2018-03-15 21:05:46 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2018-03-15 21:05:46 +0300 |
commit | 2754e0f1e9729406dc98721768fcf964babe7ee8 (patch) | |
tree | 0c1feb2bae111242d093b65a8fd0cc8a29b24c04 | |
parent | b6cab2a6895399229ee98b5772ff3632f9ab185b (diff) | |
parent | c3542c16643f7edf85c7f79a5cbd33084e377426 (diff) |
Merge branch '404' into 'master'
Make the 404 page more stylish
See merge request gitlab-com/gitlab-docs!212
-rw-r--r-- | content/404.html | 48 | ||||
-rw-r--r-- | content/assets/images/404.png | bin | 0 -> 16167 bytes | |||
-rw-r--r-- | content/assets/stylesheets/404.scss | 14 | ||||
-rw-r--r-- | layouts/404.html | 1 |
4 files changed, 61 insertions, 2 deletions
diff --git a/content/404.html b/content/404.html index f54eb93a..08bdb84f 100644 --- a/content/404.html +++ b/content/404.html @@ -1,5 +1,49 @@ --- -title: 404 Not Found +title: 404 not found I say you! --- -<h1>404 Not Found</h1> +<div class='four-oh-four'> + <center> + <h1>404</h1> + <img src="<%= @items['/assets/images/404.png'].path %>" alt="Thank you GitLab Fan for the image!"/> + <!-- https://gitlabfan.com/gitlab-stickers-for-telegram-and-slack-16639b2c126 --> + <br> + <h2>Oh noes! Something's not right!</h2> + <br> + </center> + + <% unless ENV['NANOC_ENV'] == 'production' %> + <p>Is it a Review App you're looking for? If yes, then did you <a href="/ee/development/writing_documentation.html#previewing-the-changes-live">read the docs</a>? Follow these steps to debug:</p> + <ol> + <li> + <strong>Did you follow the URL from the merge request widget?</strong> If yes, then check if + the link is the same as the one in the job output. It can happen that if the + branch name slug is longer than 35 characters, it is automatically + truncated. That means that the merge request widget will not show the proper + URL due to a limitation of how <code>environment: url</code> works, but you can find the + real URL from the output of the <code>review-docs-deploy</code> job.</li> + <li> + <strong>Did you follow the URL from the job output?</strong> If yes, then it means that + either the site is not yet deployed or something went wrong with the remote + pipeline. Give it a few minutes and it should appear online, otherwise you + can check the status of the remote pipeline from the link in the job output. + If the pipeline failed or got stuck, drop a line in the <code>#docs</code> chat channel.</li> + </ol> + <% end %> + + <center> + <h3> + <a href="javascript:history.back()" class="js-go-back go-back">Go back</a> + </h3> + <center> +</div> + +<script> + (function () { + var goBack = document.querySelector('.js-go-back'); + + if (history.length > 1) { + goBack.style.display = 'inline'; + } + })(); +</script> diff --git a/content/assets/images/404.png b/content/assets/images/404.png Binary files differnew file mode 100644 index 00000000..bbe3ac33 --- /dev/null +++ b/content/assets/images/404.png diff --git a/content/assets/stylesheets/404.scss b/content/assets/stylesheets/404.scss new file mode 100644 index 00000000..b1833bb7 --- /dev/null +++ b/content/assets/stylesheets/404.scss @@ -0,0 +1,14 @@ +--- +version: 1 +--- + +// Override some main elements +.four-oh-four { + img { + border: 0; + } + + h2, h3 { + border-bottom: 0; + } +} diff --git a/layouts/404.html b/layouts/404.html index ed4e4a80..a211920b 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -2,6 +2,7 @@ <html lang="en"> <head> <%= render '/head.*' %> + <link rel="stylesheet" href="<%= @items['/assets/stylesheets/404.*'].path %>"> </head> <body> <%= render '/header.*' %> |