Skip to content

Commit

Permalink
Merge pull request #3 from NHSDigital/CCM-5294-setup-jekyll-for-web-cms
Browse files Browse the repository at this point in the history
Initial layout.
  • Loading branch information
RossBugginsNHS authored May 29, 2024
2 parents a0daaf6 + 5172555 commit c358ee0
Show file tree
Hide file tree
Showing 54 changed files with 417 additions and 2,715 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# NHS Notify Repository Template
# NHS Notify Web CMS Repository

[![CI/CD Pull Request](https://github.com/nhs-england-tools/repository-template/actions/workflows/cicd-1-pull-request.yaml/badge.svg)](https://github.com/nhs-england-tools/repository-template/actions/workflows/cicd-1-pull-request.yaml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=repository-template&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=repository-template)
Expand All @@ -16,7 +16,7 @@ Make use of this repository template to expedite your project setup and enhance

## Table of Contents

- [NHS Notify Repository Template](#nhs-notify-repository-template)
- [NHS Notify Web CMS Repository](#nhs-notify-web-cms-repository)
- [Table of Contents](#table-of-contents)
- [Documentation](#documentation)
- [Setup](#setup)
Expand Down
6 changes: 6 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
_site
.sass-cache
.jekyll-cache
.jekyll-metadata
vendor
Gemfile.lock
25 changes: 25 additions & 0 deletions docs/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
permalink: /404.html
layout: default
---

<style type="text/css" media="screen">
.container {
margin: 10px auto;
max-width: 600px;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>

<div class="container">
<h1>404</h1>

<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
</div>
36 changes: 36 additions & 0 deletions docs/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 4.3.3"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.5"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.12"
gem "jekyll-drawio"
end

# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
platforms :mingw, :x64_mingw, :mswin, :jruby do
gem "tzinfo", ">= 1", "< 3"
gem "tzinfo-data"
end

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]

# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
# do not have a Java counterpart.
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]

gem "just-the-docs"
1 change: 0 additions & 1 deletion docs/README.md

This file was deleted.

File renamed without changes.
89 changes: 89 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely edit after that. If you find
# yourself editing this file very often, consider using Jekyll's data files
# feature for the data you need to update frequently.
#
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'bundle exec jekyll serve'. If you change this file, please restart the server process.
#
# If you need help with YAML syntax, here are some quick references for you:
# https://learn-the-web.algonquindesign.ca/topics/markdown-yaml-cheat-sheet/#yaml
# https://learnxinyminutes.com/docs/yaml/
#
# Site settings
# These are used to personalize your new site. If you look in the HTML files,
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.

title: NHS Notify CMS
# email: [email protected]
description: >- # this means to ignore newlines until "baseurl:"
NHS Notify Web CMS
baseurl: "/nhs-notify-web-cms" # the subpath of your site, e.g. /blog
url: "https://nhsdigital.github.io" # the base hostname & protocol for your site, e.g. http://example.com

collections_dir: _collections

collections:
notify-repos:
output: true
sort_by: order

# Build settings
theme: just-the-docs
plugins:
- jekyll-feed

color_scheme: nhs
mermaid:
# Version of mermaid library
# Pick an available version from https://cdn.jsdelivr.net/npm/mermaid/
version: "10.9.1"

aux_links:
"NHS Notify on GitHub":
- "//github.com/NHSDigital/nhs-notify"

aux_links_new_tab: false

# Footer "Edit this page on GitHub" link text
gh_edit_link: true # show or hide edit this page link
gh_edit_link_text: "Edit this page on GitHub."
gh_edit_repository: "https://github.com/NHSDigital/nhs-notify" # the github URL for your repo
gh_edit_branch: "main" # the branch that your docs is served from
# gh_edit_source: docs # the source that your files originate from
gh_edit_view_mode: "tree" # "tree" or "edit" if you want the user to jump into the editor immediately

nav_external_links:
- title: Notify Service Catalogue
url: https://digital.nhs.uk/services/nhs-notify
hide_icon: false # set to true to hide the external link icon - defaults to false
opens_in_new_tab: false # set to true to open this link in a new tab - defaults to false

callouts:
warning:
title: Warning
color: red

# Exclude from processing.
# The following items will not be processed, by default.
# Any item listed under the `exclude:` key here will be automatically added to
# the internal "default list".
#
# Excluded items can be processed by explicitly listing the directories or
# their entries' file path in the `include:` list.
#
# exclude:
# - .sass-cache/
# - .jekyll-cache/
# - gemfiles/
# - Gemfile
# - Gemfile.lock
# - node_modules/
# - vendor/bundle/
# - vendor/cache/
# - vendor/gems/
# - vendor/ruby/
File renamed without changes.
1 change: 1 addition & 0 deletions docs/_includes/search/input.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<input type="text" id="docsearch-input" placeholder="Search the docs…" aria-label="Search">
File renamed without changes.
47 changes: 47 additions & 0 deletions docs/_layouts/nhs-notify-default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
layout: table_wrappers
---

<!DOCTYPE html>

<html lang="{{ site.lang | default: 'en-US' }}">
{% include head.html %}
<body>
<a class="skip-to-main" href="#main-content">Skip to main content</a>
{% include icons/icons.html %}
{% if page.nav_enabled == true %}
{% include components/sidebar.html %}
{% elsif layout.nav_enabled == true and page.nav_enabled == nil %}
{% include components/sidebar.html %}
{% elsif site.nav_enabled != false and layout.nav_enabled == nil and page.nav_enabled == nil %}
{% include components/sidebar.html %}
{% endif %}
<div class="main" id="top">
{% include components/header.html %}
<div class="main-content-wrap">
{% include components/breadcrumbs.html %}
<div id="main-content" class="main-content">
<main>
{% if site.heading_anchors != false %}
{% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><use xlink:href=\"#svg-link\"></use></svg>" anchorClass="anchor-heading" anchorAttrs="aria-labelledby=\"%html_id%\"" %}
{% else %}
{{ content }}
{% endif %}

{% if page.has_children == true and page.has_toc != false %}
{% include components/children_nav.html %}
{% endif %}
</main>
{% include components/footer.html %}
</div>
</div>
{% if site.search_enabled != false %}
{% include components/search_footer.html %}
{% endif %}
</div>

{% if site.mermaid %}
{% include components/mermaid.html %}
{% endif %}
</body>
</html>
5 changes: 5 additions & 0 deletions docs/_layouts/nhs-notify-home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: default
---

Message: {{ content }}
20 changes: 20 additions & 0 deletions docs/_layouts/nhs-notify-page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
layout: nhs-notify-default
---

<section class="standalone">
<div class="grid">
<div class="unit whole">
<article>
{%- if page.permalink contains "resources" %}
<div class="improve right hide-on-mobiles">
<a data-proofer-ignore href="https://github.com/jekyll/jekyll/edit/master/docs/{{ page.path }}"><i class="fa fa-pencil"></i> &nbsp;Improve this page</a>
</div>
{% endif -%}
<h1>{{ page.title }}</h1>
{{ content }}
</article>
</div>
<div class="clear"></div>
</div>
</section>
Empty file added docs/_posts/.gitkeep
Empty file.
137 changes: 137 additions & 0 deletions docs/_sass/color_schemes/example-variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
//Reference Links

$color-scheme: dark;
$body-background-color: $grey-dk-300;
$body-heading-color: $grey-lt-000;
$body-text-color: $grey-lt-300;
$link-color: $blue-000;
$nav-child-link-color: $grey-dk-000;
$sidebar-color: $grey-dk-300;
$base-button-color: $grey-dk-250;
$btn-primary-color: $blue-200;
$code-background-color: #31343f; // OneDarkJekyll default for syntax-one-dark-vivid
$code-linenumber-color: #dee2f7; // OneDarkJekyll .nf for syntax-one-dark-vivid
$feedback-color: darken($sidebar-color, 3%);
$table-background-color: $grey-dk-250;
$search-background-color: $grey-dk-250;
$search-result-preview-color: $grey-dk-000;
$border-color: $grey-dk-200;


// To be set in colour scheme

// prettier-ignore
$body-font-family: system-ui, -apple-system, blinkmacsystemfont, "Segoe UI",
roboto, "Helvetica Neue", arial, sans-serif, "Segoe UI Emoji" !default;
$mono-font-family: "SFMono-Regular", menlo, consolas, monospace !default;
$root-font-size: 16px !default; // DEPRECATED: previously base font-size for rems
$body-line-height: 1.4 !default;
$content-line-height: 1.6 !default;
$body-heading-line-height: 1.25 !default;

// Font size
// `-sm` suffix is the size at the small (and above) media query

$font-size-1: 0.5625rem !default;
$font-size-1-sm: 0.625rem !default;
$font-size-2: 0.6875rem !default; // h4 - uppercased!, h6 not uppercased, text-small
$font-size-3: 0.75rem !default; // h5
$font-size-4: 0.875rem !default;
$font-size-5: 1rem !default; // h3
$font-size-6: 1.125rem !default; // h2
$font-size-7: 1.5rem !default;
$font-size-8: 2rem !default; // h1
$font-size-9: 2.25rem !default;
$font-size-10: 2.625rem !default;
$font-size-10-sm: 3rem !default;

// Colors

$white: #fff !default;
$grey-dk-000: #959396 !default;
$grey-dk-100: #5c5962 !default;
$grey-dk-200: #44434d !default;
$grey-dk-250: #302d36 !default;
$grey-dk-300: #27262b !default;
$grey-lt-000: #f5f6fa !default;
$grey-lt-100: #eeebee !default;
$grey-lt-200: #ecebed !default;
$grey-lt-300: #e6e1e8 !default;
$purple-000: #7253ed !default;
$purple-100: #5e41d0 !default;
$purple-200: #4e26af !default;
$purple-300: #381885 !default;
$blue-000: #2c84fa !default;
$blue-100: #2869e6 !default;
$blue-200: #264caf !default;
$blue-300: #183385 !default;
$green-000: #41d693 !default;
$green-100: #11b584 !default;
$green-200: #009c7b !default;
$green-300: #026e57 !default;
$yellow-000: #ffeb82 !default;
$yellow-100: #fadf50 !default;
$yellow-200: #f7d12e !default;
$yellow-300: #e7af06 !default;
$red-000: #f77e7e !default;
$red-100: #f96e65 !default;
$red-200: #e94c4c !default;
$red-300: #dd2e2e !default;

// Spacing

$spacing-unit: 1rem; // 1rem == 16px

$spacers: (
sp-0: 0,
sp-1: $spacing-unit * 0.25,
sp-2: $spacing-unit * 0.5,
sp-3: $spacing-unit * 0.75,
sp-4: $spacing-unit,
sp-5: $spacing-unit * 1.5,
sp-6: $spacing-unit * 2,
sp-7: $spacing-unit * 2.5,
sp-8: $spacing-unit * 3,
sp-9: $spacing-unit * 3.5,
sp-10: $spacing-unit * 4,
) !default;
$sp-1: map-get($spacers, sp-1) !default; // 0.25 rem == 4px
$sp-2: map-get($spacers, sp-2) !default; // 0.5 rem == 8px
$sp-3: map-get($spacers, sp-3) !default; // 0.75 rem == 12px
$sp-4: map-get($spacers, sp-4) !default; // 1 rem == 16px
$sp-5: map-get($spacers, sp-5) !default; // 1.5 rem == 24px
$sp-6: map-get($spacers, sp-6) !default; // 2 rem == 32px
$sp-7: map-get($spacers, sp-7) !default; // 2.5 rem == 40px
$sp-8: map-get($spacers, sp-8) !default; // 3 rem == 48px
$sp-9: map-get($spacers, sp-9) !default; // 3.5 rem == 56px
$sp-10: map-get($spacers, sp-10) !default; // 4 rem == 64px

// Borders

$border: 1px solid !default;
$border-radius: 4px !default;
$border-color: $grey-lt-100 !default;

// Grid system

$gutter-spacing: $sp-6 !default;
$gutter-spacing-sm: $sp-4 !default;
$nav-width: 16.5rem !default;
$nav-width-md: 15.5rem !default;
$nav-list-item-height: $sp-6 !default;
$nav-list-item-height-sm: $sp-8 !default;
$nav-list-expander-right: true;
$content-width: 50rem !default;
$header-height: 3.75rem !default;
$search-results-width: $content-width - $nav-width !default;
$transition-duration: 400ms;

// Media queries in pixels

$media-queries: (
xs: 20rem,
sm: 31.25rem,
md: $content-width,
lg: $content-width + $nav-width,
xl: 87.5rem,
) !default;
Loading

0 comments on commit c358ee0

Please sign in to comment.