diff --git a/.gitignore b/.gitignore index 943810b..364125f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ env -site \ No newline at end of file +site +*~ \ No newline at end of file diff --git a/TEMPLATE_README.md b/TEMPLATE_README.md index 6b1905d..36e0775 100644 --- a/TEMPLATE_README.md +++ b/TEMPLATE_README.md @@ -16,7 +16,7 @@ https://squidfunk.github.io/mkdocs-material/ With python. (I would also use a virtualenv) ``` -pip install -r REQUIREMENTS.txt +(env)python -m pip install -r REQUIREMENTS.txt ``` ### Uploading the docs @@ -25,7 +25,19 @@ pip install -r REQUIREMENTS.txt mkdocs gh-deploy ``` +## YAML Notes +Turned Navigation Sections on, meaning we no longer need a new index. +``` +nav: + - Section: + - section/index.md + + + - Page 1: section/page-1.md + ... + - Page n: section/page-n.md +``` ## Notes for Updating @@ -42,6 +54,10 @@ Merge made by the 'recursive' strategy. ## CHANGES + - Material 9.2 (2023-24) + + - Material 8.3.9 (2022-23) + - Material 7.2.1 - Material 7.x Introduced dark mode toggle, So this has been removed. - Added Analytics script section for probable plausible integrations. diff --git a/custom_theme/main.html b/custom_theme/main.html index 142bea2..20287aa 100644 --- a/custom_theme/main.html +++ b/custom_theme/main.html @@ -1,37 +1,8 @@ {% extends "base.html" %} - - {% block extrahead %} - -{% set title = config.site_name %} -{% if page and page.meta and page.meta.title %} - {% set title = title ~ " - " ~ page.meta.title %} -{% elif page and page.title and not page.is_homepage %} - {% set title = title ~ " - " ~ page.title | striptags %} -{% endif %} - -{% if page and page.meta and page.meta.description %} - {% set description = page.meta.description %} -{% endif %} - - - - - -{# - -{% endif %} - -{# - - - - -#} + {% endblock %} diff --git a/custom_theme/partials/copyright.html b/custom_theme/partials/copyright.html index 77661e8..c2ea596 100644 --- a/custom_theme/partials/copyright.html +++ b/custom_theme/partials/copyright.html @@ -8,16 +8,14 @@ {% endif %} -
- Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. -
+
+ Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. +
- {% if not config.extra.generator == false %} + {% if not config.extra.generator == false %} Made with Material for MkDocs {% endif %} - - diff --git a/custom_theme/partials/header.html b/custom_theme/partials/header.html new file mode 100644 index 0000000..1005be0 --- /dev/null +++ b/custom_theme/partials/header.html @@ -0,0 +1,168 @@ + + + +{% set class = "md-header" %} +{% if "navigation.tabs.sticky" in features %} + {% set class = class ~ " md-header--shadow md-header--lifted" %} +{% elif "navigation.tabs" not in features %} + {% set class = class ~ " md-header--shadow" %} +{% endif %} + + +
+ + + + {% if "navigation.tabs.sticky" in features %} + {% if "navigation.tabs" in features %} + {% include "partials/tabs.html" %} + {% endif %} + {% endif %} +
diff --git a/custom_theme/partials/integrations/analytics/plausible.html b/custom_theme/partials/integrations/analytics/plausible.html deleted file mode 100644 index 2114bc8..0000000 --- a/custom_theme/partials/integrations/analytics/plausible.html +++ /dev/null @@ -1,2 +0,0 @@ - -{{ config.extra.analytics.script }} \ No newline at end of file diff --git a/docs/assets/fonts/ComicNeue-Regular.woff b/docs/assets/fonts/ComicNeue-Regular.woff new file mode 100644 index 0000000..69c1afe Binary files /dev/null and b/docs/assets/fonts/ComicNeue-Regular.woff differ diff --git a/docs/assets/fonts/ComicNeue-Regular.woff2 b/docs/assets/fonts/ComicNeue-Regular.woff2 new file mode 100644 index 0000000..0580549 Binary files /dev/null and b/docs/assets/fonts/ComicNeue-Regular.woff2 differ diff --git a/docs/assets/fonts/OFL.txt b/docs/assets/fonts/OFL.txt new file mode 100644 index 0000000..077aecc --- /dev/null +++ b/docs/assets/fonts/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2014 The Comic Neue Project Authors (https://github.com/crozynski/comicneue) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/docs/assets/stylesheets/custom.css b/docs/assets/stylesheets/custom.css index 6c1730e..6ed8c71 100644 --- a/docs/assets/stylesheets/custom.css +++ b/docs/assets/stylesheets/custom.css @@ -1,17 +1,21 @@ -[data-md-color-scheme=slate]{ - --md-text-link-color: #00ca00; - --md-typeset-a-color: #00ca00; -} +/* It looks like this is redundant now we have proper support for dark mode */ +/* [data-md-color-scheme=slate]{ */ +/* --md-text-link-color: #00ca00; */ +/* --md-typeset-a-color: #00ca00; */ +/* } */ -.darkIcon { - /*color: var(--md-default-fg-color);*/ - color: grey; -} +/* .darkIcon { */ +/* /\*color: var(--md-default-fg-color);*\/ */ +/* color: grey; */ +/* } */ -img { - background: whitesmoke; +/* We have this in the Custom CSS incase we have transparent icons */ +[data-md-color-scheme=slate] img { + background: whitesmoke; } + +/* Used for 6005 */ .evilButton { border: none; color: white; @@ -20,46 +24,8 @@ img { text-decoration: none; display: inline-block; font-size: 16px; - background-color: #f44336;} /* Red */ -/* Load My own Fonts, to aviod google -https://google-webfonts-helper.herokuapp.com../fonts/source-code-pro?subsets=latin */ - -/* roboto-regular - latin */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 400; - src: url('../fonts/roboto-v20-latin-regular.eot'); /* IE9 Compat Modes */ - src: local('Roboto'), local('Roboto-Regular'), - url('../fonts/roboto-v20-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ - url('../fonts/roboto-v20-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ - url('../fonts/roboto-v20-latin-regular.woff') format('woff'), /* Modern Browsers */ - url('../fonts/roboto-v20-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ - url('../fonts/roboto-v20-latin-regular.svg#Roboto') format('svg'); /* Legacy iOS */ -} - -body, input { - font-family: "Roboto", -apple-system, Helvetica, Arial, sans-serif; -} - -/* source-code-pro-regular - latin */ -@font-face { - font-family: 'SourceCodePro'; - font-style: normal; - font-weight: 400; - src: url('../fonts/source-code-pro-v11-latin-regular.eot'); /* IE9 Compat Modes */ - src: local('Source Code Pro Regular'), local('SourceCodePro-Regular'), - url('../fonts/source-code-pro-v11-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ - url('../fonts/source-code-pro-v11-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ - url('../fonts/source-code-pro-v11-latin-regular.woff') format('woff'), /* Modern Browsers */ - url('../fonts/source-code-pro-v11-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ - url('../fonts/source-code-pro-v11-latin-regular.svg#SourceCodePro') format('svg'); /* Legacy iOS */ -} - -pre, code, kbd { - font-family: "SourceCodePro", SFMono-Regular, Consolas, Menlo, monospace; -} - + background-color: #f44336; +} /* Red */ diff --git a/docs/assets/stylesheets/local_fonts.css b/docs/assets/stylesheets/local_fonts.css new file mode 100644 index 0000000..7799cfb --- /dev/null +++ b/docs/assets/stylesheets/local_fonts.css @@ -0,0 +1,55 @@ +/* Load My own Fonts, to aviod google +https://google-webfonts-helper.herokuapp.com../fonts/source-code-pro?subsets=latin */ + +/* roboto-regular - latin */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + src: url('../fonts/roboto-v20-latin-regular.eot'); /* IE9 Compat Modes */ + src: local('Roboto'), local('Roboto-Regular'), + url('../fonts/roboto-v20-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('../fonts/roboto-v20-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ + url('../fonts/roboto-v20-latin-regular.woff') format('woff'), /* Modern Browsers */ + url('../fonts/roboto-v20-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ + url('../fonts/roboto-v20-latin-regular.svg#Roboto') format('svg'); /* Legacy iOS */ +} + + +body, input { + font-family: "Roboto", -apple-system, Helvetica, Arial, sans-serif; +} + +/* source-code-pro-regular - latin */ +@font-face { + font-family: 'SourceCodePro'; + font-style: normal; + font-weight: 400; + src: url('../fonts/source-code-pro-v11-latin-regular.eot'); /* IE9 Compat Modes */ + src: local('Source Code Pro Regular'), local('SourceCodePro-Regular'), + url('../fonts/source-code-pro-v11-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('../fonts/source-code-pro-v11-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ + url('../fonts/source-code-pro-v11-latin-regular.woff') format('woff'), /* Modern Browsers */ + url('../fonts/source-code-pro-v11-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ + url('../fonts/source-code-pro-v11-latin-regular.svg#SourceCodePro') format('svg'); /* Legacy iOS */ +} + +pre, code, kbd { + font-family: "SourceCodePro", SFMono-Regular, Consolas, Menlo, monospace; +} + + +@font-face { + font-family: 'Comic Neue'; + src: local('Comic Neue Regular'), local('ComicNeue-Regular'), + url('../fonts/ComicNeue-Regular.woff2') format('woff2'), + url('../fonts/ComicNeue-Regular.woff') format('woff'); + font-weight: normal; + font-style: normal; + font-display: swap; +} + + +/* body, input { */ +/* font-family: 'Comic Neue'; */ +/* } */ diff --git a/docs/index.md b/docs/index.md index 3ab3016..e792869 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,31 +2,36 @@ title: "Introduction" description: > Where we cover the main elements of the module, how it will be run, and assessment. + +tags: + - Admin --- # 5067CEM: Web Security -The Internet, and the World Wide Web gives organisations and individuals the means to share information, and communicate. -This has had a significant effect on the the way we interact with each other and live our lives. +The Internet, and the World Wide Web gives organisations and +individuals the means to share information, and communicate. This has +had a significant effect on the the way we interact with each other +and live our lives. -However, as the publicly accessible "face" of an organisation, any security flaws could lead to the organisation being compromised. +However, as the publicly accessible "face" of an organisation, any +security flaws could lead to the organisation being compromised. -In this module we will have an introduction to web based security. -We will look at how we can manipulate the data sent too and from web services, using the protocols that make up the web, and how an attacker might use that to change a sites behaviour. -We will also examine common flaws and security issues with web services, and look at how an attacker might exploit them. +In this module we will have an introduction to web based security. We +will look at how we can manipulate the data sent too and from web +services, using the protocols that make up the web, and how an +attacker might use that to change a sites behaviour. We will also +examine common flaws and security issues with web services, and look +at how an attacker might exploit them. ## Module Essentials - [Module Guide](essentials/moduleguide.md) - - [Assessment](assessment/assessment.md) - - [Teaching and Learning](guides/TeachingAndLearning.md) - - [Course Materials Guide](guides/Materials.md) - ### The Aula -The **main reference point** for the course is Aula. While the GitHub pages docs give us a +The **main reference point** for the course is *Aula*. While the GitHub pages docs give us a nice way to structure content, it's a workaround. Whatever you think of Aula itself, the collaborative part is actually a good @@ -38,7 +43,20 @@ the feed to discuss your views on these points will help you think around the su People are entitled to their own point of view, use the feed for constructive feedback and discussion. -## Module Team + +``` python linenums="1" +def hello(name): + #This is the Hello Function + print(f "Hello {{name}}") # (1) + + +hello("Dang") +``` + +1. :man_raising_hand: Some form of annotation + + +## module Team - Dr. Dan Goldsmith. [aa9863@coventry.ac.uk](mailto:aa9863@coventry.ac.uk) diff --git a/docs/tags.md b/docs/tags.md new file mode 100644 index 0000000..f3c8d5c --- /dev/null +++ b/docs/tags.md @@ -0,0 +1,3 @@ +# Tags + +[TAGS] diff --git a/mkdocs.yml b/mkdocs.yml index 08b4c53..81ab310 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,41 +1,65 @@ -site_name: "Template MKDocs" -#site_dir: "pages/aa9863/6005-CEM" +site_name: "Template MKDocs" #Name of Site + site_url: https://github.coventry.ac.uk/pages/CUEH/6005CEM/ #Update this to -repo_name: cueh/6005CEM -repo_url: https://github.coventry.ac.uk/CUEH/6005CEM +repo_name: mkdocs-template #What we want to call the repo on the page +repo_url: https://github.coventry.ac.uk/aa9863/mkdocs-template #If we want a link to the repo + +site_description: Demo Site for MKDocs based course materials +site_author: Dan Goldsmith +#copyright: 2022-24 Dan Goldsmith +# --------------- Theme Related Settings --------------- theme: name: material + #logo: Optional-Logo + #favicon: Optional-Favicon + features: - navigation.top #Have a "Go to top button + - navigation.indexes #Allow us to attach something as a "Home page" for sections. + - content.code.copy + - content.code.annotate #- toc.integrate # Intergrate the pages TOC into the Nav #- navigation.tabs #We can have Top level as tabs, but I dont really like it. - custom_dir: custom_theme - font: false - palette: + + custom_dir: custom_theme #Where we put any customisations + + + font: false #Dont Load Fonts from Google + + palette: # - scheme: default toggle: icon: material/weather-night - name: Switch to dark mode + name: dark mode - scheme: slate toggle: icon: material/weather-sunny - name: Switch to light mode + name: light mode -extra: - analytics: #Allow use of Analytics - provider: plausible - script: '' - version: #Aloow versioning via Mike. (https://squidfunk.github.io/mkdocs-material/setup/setting-up-versioning/) - provider: mike +plugins: + - tags: + tags_file: tags.md + - social: + cards: true +# cards_layout_options: +# background_color: "#0FF1CE" + +#extra: +# analytics: #Allow use of Analytics +# provider: plausible +# script: '' +# version: #Aloow versioning via Mike. (https://squidfunk.github.io/mkdocs-material/setup/setting-up-versioning/) +# provider: mike markdown_extensions: - meta - admonition - - codehilite - def_list - footnotes - abbr + - toc + - pymdownx.highlight - pymdownx.tabbed #For Tabbed Sourcecode - pymdownx.superfences - pymdownx.details @@ -51,23 +75,26 @@ markdown_extensions: options: custom_icons: - custom_theme/.icons + extra_css: - assets/stylesheets/custom.css + - assets/stylesheets/local_fonts.css -extra_javascript: - - assets/javascripts/config.js - - https://polyfill.io/v3/polyfill.min.js?features=es6 - - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js - +# extra_javascript: +# - assets/javascripts/config.js +# - https://polyfill.io/v3/polyfill.min.js?features=es6 +# - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js nav: - Home: index.md - Essentials: - Module Guide: essentials/moduleguide.md - - Assesment: - - Assessment Overview: assessment/assessment.md - - Assessment Example: assessment/ExampleCW.md + + - Tags: tags.md + # - Assesment: + # - Assessment Overview: assessment/assessment.md + # - Assessment Example: assessment/ExampleCW.md