From 4fff054a83a53d10c5ae184fa972fb8cd5c88b02 Mon Sep 17 00:00:00 2001 From: Richard Dominick <34370238+RichDom2185@users.noreply.github.com> Date: Sun, 6 Nov 2022 07:53:45 +0800 Subject: [PATCH 01/11] Add Octicons asset --- docs/_includes/icons/git-merge.svg | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 docs/_includes/icons/git-merge.svg diff --git a/docs/_includes/icons/git-merge.svg b/docs/_includes/icons/git-merge.svg new file mode 100644 index 00000000000..53961b7cf59 --- /dev/null +++ b/docs/_includes/icons/git-merge.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file From 3a54b6aa05544dfc6338506f856b6d14212eaec5 Mon Sep 17 00:00:00 2001 From: Richard Dominick <34370238+RichDom2185@users.noreply.github.com> Date: Sun, 6 Nov 2022 07:55:38 +0800 Subject: [PATCH 02/11] Create parser for PPP badges --- docs/_includes/ppp-badges.liquid | 25 +++++++++++++++++++++++++ docs/_layouts/ppp.html | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 docs/_includes/ppp-badges.liquid diff --git a/docs/_includes/ppp-badges.liquid b/docs/_includes/ppp-badges.liquid new file mode 100644 index 00000000000..01844cfa36c --- /dev/null +++ b/docs/_includes/ppp-badges.liquid @@ -0,0 +1,25 @@ +{% comment %} + Copyright 2022 Richard Dominick +{% endcomment %} +{% capture newline %} +{% endcapture %} +{%- assign nodes = include.html + | strip + | split: '[[' +-%} +{{ nodes.first }} +{%- for node in nodes offset:1 -%} + {% assign data = node | split: ']]' %}{% assign tag = data | first | strip | split: '#' %}{% assign type = tag | first | strip %}{% assign number = tag | last | strip %} + {%- if type == 'PR' -%} + + {% include icons/git-merge.svg class="icon" %} + PR#{{ number }} + Pull Request #{{ number }}
View on GitHub
+
+ {%- for tail in data offset:1 -%} + {{ tail }} + {%- endfor -%} + {%-else -%} + [[{{ node }} + {%- endif -%} +{%- endfor -%} diff --git a/docs/_layouts/ppp.html b/docs/_layouts/ppp.html index aea6e959a2e..3e8acc4d2f5 100644 --- a/docs/_layouts/ppp.html +++ b/docs/_layouts/ppp.html @@ -1,4 +1,4 @@ --- layout: page --- -{{ content }} +{% include ppp-badges.liquid html=content %} From 61200db349fd43d41833de29befae674f719dd1a Mon Sep 17 00:00:00 2001 From: Richard Dominick <34370238+RichDom2185@users.noreply.github.com> Date: Sun, 6 Nov 2022 07:57:26 +0800 Subject: [PATCH 03/11] Style basic badge --- docs/_sass/ppp.scss | 43 ++++++++++++++++++++++++++++++++++++++ docs/assets/css/style.scss | 1 + 2 files changed, 44 insertions(+) create mode 100644 docs/_sass/ppp.scss diff --git a/docs/_sass/ppp.scss b/docs/_sass/ppp.scss new file mode 100644 index 00000000000..d8d22ddaefc --- /dev/null +++ b/docs/_sass/ppp.scss @@ -0,0 +1,43 @@ +.pr-badge { + $color: #8250df; + $border-color: #d0d7de; + + vertical-align: text-bottom; + + display: inline-flex; + column-gap: 4px; + align-items: center; + + background-color: #f8f8f8; + border-radius: 3px; + border: 1px solid $border-color; + + margin-inline: 2px; + padding: 2px 4px; + + > a { + display: inline-block; + color: inherit !important; + line-height: 100%; + font-weight: bold; + font-size: 0.75em; + text-decoration: none; + } + + &:hover > a { + color: $link-base-color !important; + } + + .icon { + $size: 14px; + fill: $color; + vertical-align: text-top; + display: inline-block; + height: $size; + width: $size; + } + + .tooltip { + display: none; + } +} diff --git a/docs/assets/css/style.scss b/docs/assets/css/style.scss index 7d27a643a55..749bc58057c 100644 --- a/docs/assets/css/style.scss +++ b/docs/assets/css/style.scss @@ -8,6 +8,7 @@ "foodrem", "admonitions", "toc", + "ppp", "pdf"; .icon { From dfa0fef5b9d772ad0f193cc8686c6f3733495564 Mon Sep 17 00:00:00 2001 From: Richard Dominick <34370238+RichDom2185@users.noreply.github.com> Date: Sun, 6 Nov 2022 07:59:15 +0800 Subject: [PATCH 04/11] Style badge tooltip --- docs/_sass/ppp.scss | 61 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 59 insertions(+), 2 deletions(-) diff --git a/docs/_sass/ppp.scss b/docs/_sass/ppp.scss index d8d22ddaefc..c2bd9d5befa 100644 --- a/docs/_sass/ppp.scss +++ b/docs/_sass/ppp.scss @@ -37,7 +37,64 @@ width: $size; } - .tooltip { - display: none; + position: relative; + + > .tooltip { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + + border: 1px solid $border-color; + + $width: 180px; + width: $width; + margin-left: calc(-#{$width} / 2); + box-sizing: border-box; + padding: 6px 10px; + + background-color: white; + border-radius: 6px; + color: gray; + font-size: small; + + position: absolute; + bottom: 150%; + left: 50%; + text-align: center; + + strong { + color: black; + } + + // Popup arrow + &::after { + $arrow-width: 5px; + content: ""; + position: absolute; + top: 100%; + left: 50%; + margin-left: -$arrow-width; + border-width: $arrow-width; + border-style: solid; + border-color: $border-color transparent transparent transparent; + } + + :last-child { + font-size: smaller; + } + + visibility: hidden; + opacity: 0; + transition: opacity ease-in-out 150ms; + + @media screen and (prefers-reduced-motion: reduce) { + transition: none; + } + } + + &:hover > .tooltip { + opacity: 1; + visibility: visible; } } From 0a467acbb68137132d639af9775f919550cb4ef0 Mon Sep 17 00:00:00 2001 From: Richard Dominick <34370238+RichDom2185@users.noreply.github.com> Date: Sun, 6 Nov 2022 07:59:36 +0800 Subject: [PATCH 05/11] Update PPP for RichDom2185 to use badges --- docs/team/richdom2185.md | 100 +++++++++++++++++++-------------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/docs/team/richdom2185.md b/docs/team/richdom2185.md index 801b2d91bf6..71b40f2312e 100644 --- a/docs/team/richdom2185.md +++ b/docs/team/richdom2185.md @@ -13,56 +13,56 @@ title: Richard Dominick's Project Portfolio Page Given below are my contributions to the project. * PRs created (to be categorised later): - * Add Richard's skeletal PPP and \"About Us\" info ([PR#80](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/80)) - * Add use cases 9 and 10 to DG ([PR#86](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/86)) - * Add skeletal command info for updating items ([PR#95](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/95)) - * Update site config ([PR#97](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/97)) - * Reformat Markdown files using Prettier ([PR#104](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/104)) - * Set up linting for markdown files ([PR#166](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/166)) - * Clean up and fix ToC and other improvements ([PR#170](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/170)) - * Remove tutorials from documentation ([PR#181](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/181)) - * Refactor Glossary ([PR#185](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/185)) - * Redesign glossary and refactor UG/DG ([PR#196](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/196)) - * Add MVP version of FoodRem UI ([PR#198](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/198)) - * Replace static imports where applicable ([PR#203](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/203)) - * Improve tables to minimise HTML usage ([PR#208](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/208)) - * Add missing user stories to DG ([PR#214](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/214)) - * Update miscellaneous items ([PR#215](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/215)) - * Fix markdown links and remove hardcoding ([PR#219](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/219)) - * Refactor codebase ([PR#222](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/222)) - * Renovate website ([PR#238](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/238)) - * Set up CD for JAR file deployment and update DG ([PR#244](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/244)) - * Fix styling-related bugs in markdown files ([PR#251](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/251)) - * Fix broken JAR file CD workflow ([PR#252](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/252)) - * Fix JAR file CD release time ([PR#253](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/253)) - * Fix website compile error ([PR#260](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/260)) - * Clean up code ([PR#263](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/263)) - * Remove duplicate list marker in task lists ([PR#265](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/265)) - * Reformat markdown files ([PR#267](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/267)) - * Fix table markdown parsing ([PR#269](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/269)) - * Restyle website and add quick reference section to glossary ([PR#277](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/277)) - * Support parsing and rendering admonitions in Markdown ([PR#280](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/280)) - * Finalise GUI for the most part ([PR#286](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/286)) - * Add item tests and fix hashcode ([PR#301](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/301)) - * Parse markdown in placeholders table + fix style bug ([PR#309](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/309)) - * Clean up codebase ([PR#310](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/310)) - * Refactor documentation ([PR#313](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/313)) - * Add support to parse HTML in admonitions ([PR#321](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/321)) - * Create glossary entries for \"Placeholders\" values ([PR#322](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/322)) - * Change bullet type for unlinted markdown segments ([PR#323](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/323)) - * Update hash fragment generation for glossary items ([PR#328](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/328)) - * Fix continuous deployment names ([PR#331](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/331)) - * Update website styling ([PR#333](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/333)) - * Fix broken link fragment for GUI ([PR#336](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/336)) - * Fix UG inconsistencies found during peer review ([PR#341](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/341)) - * Disable failing CI on CodeCov error ([PR#352](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/352)) - * Improve UI ([PR#356](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/356)) - * Use custom fonts in GUI for consistency ([PR#361](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/361)) - * Fix find command algorithm ([PR#373](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/373)) - * Reformat markdown files ([PR#422](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/422)) - * Support autoglossary syntax ([PR#424](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/424)) - * Add bidirectional header linking ([PR#426](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/426)) - * Optimise styles for PDF layout ([PR#428](https://github.com/AY2223S1-CS2103T-W16-2/tp/pull/428)) + * Add Richard's skeletal PPP and \"About Us\" info [[PR#80]] + * Add use cases 9 and 10 to DG [[PR#86]] + * Add skeletal command info for updating items [[PR#95]] + * Update site config [[PR#97]] + * Reformat Markdown files using Prettier [[PR#104]] + * Set up linting for markdown files [[PR#166]] + * Clean up and fix ToC and other improvements [[PR#170]] + * Remove tutorials from documentation [[PR#181]] + * Refactor Glossary [[PR#185]] + * Redesign glossary and refactor UG/DG [[PR#196]] + * Add MVP version of FoodRem UI [[PR#198]] + * Replace static imports where applicable [[PR#203]] + * Improve tables to minimise HTML usage [[PR#208]] + * Add missing user stories to DG [[PR#214]] + * Update miscellaneous items [[PR#215]] + * Fix markdown links and remove hardcoding [[PR#219]] + * Refactor codebase [[PR#222]] + * Renovate website [[PR#238]] + * Set up CD for JAR file deployment and update DG [[PR#244]] + * Fix styling-related bugs in markdown files [[PR#251]] + * Fix broken JAR file CD workflow [[PR#252]] + * Fix JAR file CD release time [[PR#253]] + * Fix website compile error [[PR#260]] + * Clean up code [[PR#263]] + * Remove duplicate list marker in task lists [[PR#265]] + * Reformat markdown files [[PR#267]] + * Fix table markdown parsing [[PR#269]] + * Restyle website and add quick reference section to glossary [[PR#277]] + * Support parsing and rendering admonitions in Markdown [[PR#280]] + * Finalise GUI for the most part [[PR#286]] + * Add item tests and fix hashcode [[PR#301]] + * Parse markdown in placeholders table + fix style bug [[PR#309]] + * Clean up codebase [[PR#310]] + * Refactor documentation [[PR#313]] + * Add support to parse HTML in admonitions [[PR#321]] + * Create glossary entries for \"Placeholders\" values [[PR#322]] + * Change bullet type for unlinted markdown segments [[PR#323]] + * Update hash fragment generation for glossary items [[PR#328]] + * Fix continuous deployment names [[PR#331]] + * Update website styling [[PR#333]] + * Fix broken link fragment for GUI [[PR#336]] + * Fix UG inconsistencies found during peer review [[PR#341]] + * Disable failing CI on CodeCov error [[PR#352]] + * Improve UI [[PR#356]] + * Use custom fonts in GUI for consistency [[PR#361]] + * Fix find command algorithm [[PR#373]] + * Reformat markdown files [[PR#422]] + * Support autoglossary syntax [[PR#424]] + * Add bidirectional header linking [[PR#426]] + * Optimise styles for PDF layout [[PR#428]] - \ No newline at end of file +