initial commit; POC dev based off wp-73k theme

This commit is contained in:
Adam Piontek 2021-07-25 07:16:35 -04:00
commit 7325162871
50 changed files with 19419 additions and 0 deletions

5
.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
node_modules
vendor
dist
.DS_Store
NOTES.md

22
404.php Normal file
View file

@ -0,0 +1,22 @@
<?php
/**
* The template for displaying 404 pages (not found).
*
* @link https://codex.wordpress.org/Creating_an_Error_404_Page
*
* @package WPRDNYC
*/
get_header(); ?>
<main class="container-fluid d-flex flex-column justify-content-center align-items-center text-light mt-4">
<h1>Oops! That page can't be found.</h1>
<p>It looks like nothing was found at this location.</p>
<?php get_search_form(); ?>
</main>
<?php
get_footer();

58
README.md Normal file
View file

@ -0,0 +1,58 @@
# RDNYC WordPress Bootstrap 5/PurgeCSS Theme
The WordPress theme for rdnyc.org, based on Bootstrap 5 and PurgeCSS.
## Requirements
- [NodeJS](https://nodejs.org)
- [Composer](https://getcomposer.org)
## How to get started
1. Clone or [download](https://github.com/apiontek/wp-rdnyc/archive/refs/heads/master.zip "Download the WP RDNYC Zip") the project onto your `themes` directory `(./wp-content/themes)`
2. Run a find/replace for the following strings:
- `wp-rdnyc`
- `WP_RDNYC`
- `wp_rdnyc_`
3. Run `composer install`
4. Run `npm install`
5. Set environment variables for BrowserSyncPlugin to the domain/ports you need (see `webpack.config.js` for variables needed).
6. Run `npm start` to begin development server.
## Webpack
The theme uses Webpack as its bundler with ES6 modules for JavaScript files.
### SpriteLoaderPlugin
SVG icons can be pulled into a sprite file (output to `dist/images/icon-sprites.svg`). For this to work, `@import` them in main.js (see examples). Sprite names are set by the config in `webpack.config.js` with prefixes supported for some icon packs ([@mdi/svg](https://www.npmjs.com/package/@mdi/svg), [bootstrap-icons](https://www.npmjs.com/package/bootstrap-icons), [heroicons](https://www.npmjs.com/package/heroicons)). They can then be used for menus (put `icon-<PREFIX>-<ICON-NAME>` in the class for a menu item), or used in the theme php files with the `svg_icon_use($icon_name, $div_class)` function from `custom-functions.php` to get a div containing the correct svg use tag. `$div_class` should usually include `baseline` for proper layout.
## Syntax Highlighting
This theme supports server-side syntax highlighting via the [Syntax-highlighting Code Block](https://wordpress.org/plugins/syntax-highlighting-code-block/) plugin. In `classes.php` the plugin-provided styling is disabled, and the theme incorporates sass styling from the highlight.js node package, imported in `_code-highlight.scss` (to change the highlight style, change the import there).
However, the plugin doesn't support highlighting inline code, but I like that option, so the theme also incorporates highlight.js in `main.js` with a DOM Loaded action to highlight any code blocks tagged with the class `to-highlight` (must also have `language-$LANG` class) -- this should be done in WordPress in the editor, where you can edit a paragraph as HTML and add the classes (e.g. `<code class="to-highlight language-python">`).
## Static Files via nginx
Static files under `assets/_root` cal be served by nginx with location config like below - otherwise they (or your versions of whatever you want served from your WordPress site root) should be moved to your WordPress site root.
```conf
location ~ /(robots.txt|favicon.ico|android-chrome-192x192.png|android-chrome-512x512.png|browserconfig.xml|mstile-150x150.png) {
root /var/www/dev1/wordpress-5.8-RC2/wp-content/themes/wp-rdnyc/assets/_root/;
allow all;
log_not_found off;
access_log off;
}
```
## Deployment
```bash
npm run build
```
This will run both a production and development set of webpack tasks. The enqueue hook will load the correct version of the JS file, based on whether your development/staging server's `SCRIPT_DEBUG` constant is set to `true`.
## Bootstrap
You can customize Bootstrap SCSS & JavaScript imports in the `assets/css/app.scss` and `assets/js/main.js` files.
## PurgeCSS
*WP RDNYC* uses PurgeCSS to remove unused styles from the production build. It scans your project directory for strings that match SCSS declarations. You can modify the directories to search for in the `webpack.config.js` file. **Always check your production build to make sure styles you were developing with compiled correctly.**

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
assets/_root/favicon.ico Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -0,0 +1,65 @@
// Colors
// -- now defined in bs-custom --
// $primary: #e48663;
// $secondary: #00b0b0;
// $success: #99c24d;
// $info: #b489c7;
// $warning: #f4d35e;
// gray scale based off 'pale silver' #bebfb0 which was text color in Lester's original design
// however, i think a lighter text is more readable, going 1 lighter for this design
$white: #fff;
$gray-010: #e3dfdd;
$gray-100: #d1cac7;
$gray-200: #beb5b0;
$gray-300: #aca09a;
$gray-400: #9a8b84;
$gray-500: #87776e;
$gray-600: #70635c;
$gray-700: #5a4f49;
$gray-750: #4f4540;
$gray-800: #433b37;
$gray-900: #2d2825;
$black: #000;
// spaceblue is based on coolors.co 'space cadet' #212c40 which was bg color in Lester's original design
// background will be spaceblue-800
$spaceblue-100: #aebcd5;
$spaceblue-200: #93a6c8;
$spaceblue-300: #788fba;
$spaceblue-400: #5d79ac;
$spaceblue-500: #4c6594;
$spaceblue-600: #3e5379;
$spaceblue-700: #31415e;
$spaceblue-800: #212c40;
$spaceblue-900: #151c28;
$light: $spaceblue-200;
$dark: $spaceblue-800;
// Create your own map
$custom-colors: (
"primary": $primary,
"secondary": $secondary,
"success": $success,
"info": $info,
"warning": $warning,
"danger": $danger,
"light": $light,
"dark": $dark,
"gray": $gray-600,
"gray-dark": $gray-800,
);
// Merge the maps
$theme-colors: map-merge($theme-colors, $custom-colors);
// misc
$navbar-dark-color: rgba($white, 0.75);
$navbar-dark-hover-color: rgba($white, 0.9);
$navbar-dark-active-color: $white;
$navbar-dark-disabled-color: rgba($white, 0.45);
$navbar-dark-toggler-border-color: rgba($white, 0.3);
$component-active-bg: $primary;

View file

@ -0,0 +1,45 @@
/* Bootstrap custom variable overrides */
// Typography
$font-size-base: 1.125rem;
// 'native font stack' for sans via https://getbootstrap.com/docs/5.0/content/reboot/#native-font-stack
$font-family-sans-serif:
// custom theme font
Overpass,
// Cross-platform generic font family (default user interface font)
system-ui,
// Safari for macOS and iOS (San Francisco)
-apple-system, BlinkMacSystemFont,
// Windows
"Segoe UI",
// Android
Roboto,
// Basic web fallback
"Helvetica Neue", Arial,
// Linux
"Noto Sans",
"Liberation Sans",
Oxygen-Sans, Ubuntu,
// Sans serif fallback
sans-serif,
// Emoji fonts
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
$font-family-base: $font-family-sans-serif;
// handbrush / special / emphasis / impact font stack
$font-family-handbrush: "Permanent Marker", Besom, Fjord, Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", sans-serif;
// Features
$enable-shadows: true;
$enable-negative-margins: true;
// init colors for some vars
$primary: #51A39F;
// $secondary: #9883E5;
$secondary: #955E42;
$success: #37B800;
$info: #0075F2;
$warning: #F9E900;
$danger: #DD1C1A

50
assets/css/_bs-load.scss Normal file
View file

@ -0,0 +1,50 @@
/* Bootstrap custom variable overrides */
@import "bs-custom";
// Required || Configuration
@import "../../node_modules/bootstrap/scss/functions";
@import "../../node_modules/bootstrap/scss/variables";
/* Bootstrap custom variable overrides */
@import "bs-colors";
// Required || Configuration -- CONTINUED
@import "../../node_modules/bootstrap/scss/mixins";
@import "../../node_modules/bootstrap/scss/utilities";
// Optional || Layout & components
@import "../../node_modules/bootstrap/scss/root";
@import "../../node_modules/bootstrap/scss/reboot";
@import "../../node_modules/bootstrap/scss/type";
@import "../../node_modules/bootstrap/scss/images";
@import "../../node_modules/bootstrap/scss/containers";
@import "../../node_modules/bootstrap/scss/grid";
// @import "../../node_modules/bootstrap/scss/tables";
@import "../../node_modules/bootstrap/scss/forms";
@import "../../node_modules/bootstrap/scss/buttons";
@import "../../node_modules/bootstrap/scss/transitions";
// @import "../../node_modules/bootstrap/scss/dropdown";
// @import "../../node_modules/bootstrap/scss/button-group";
@import "../../node_modules/bootstrap/scss/nav";
@import "../../node_modules/bootstrap/scss/navbar";
// @import "../../node_modules/bootstrap/scss/card";
// @import "../../node_modules/bootstrap/scss/accordion";
// @import "../../node_modules/bootstrap/scss/breadcrumb";
// @import "../../node_modules/bootstrap/scss/pagination";
// @import "../../node_modules/bootstrap/scss/badge";
// @import "../../node_modules/bootstrap/scss/alert";
// @import "../../node_modules/bootstrap/scss/progress";
// @import "../../node_modules/bootstrap/scss/list-group";
// @import "../../node_modules/bootstrap/scss/close";
// @import "../../node_modules/bootstrap/scss/toasts";
// @import "../../node_modules/bootstrap/scss/modal";
// @import "../../node_modules/bootstrap/scss/tooltip";
// @import "../../node_modules/bootstrap/scss/popover";
// @import "../../node_modules/bootstrap/scss/carousel";
// @import "../../node_modules/bootstrap/scss/spinners";
// Helpers
@import "../../node_modules/bootstrap/scss/helpers";
// Utilities
@import "../../node_modules/bootstrap/scss/utilities/api";

21
assets/css/_fonts.scss Normal file
View file

@ -0,0 +1,21 @@
/* emphasis/special : Fontsource Permanent Marker */
@import "../../node_modules/@fontsource/permanent-marker/400.css"; /* Normal (Regular) | normal */
/* font-family-sans-serif : Fontsource Overpass */
@import "../../node_modules/@fontsource/overpass/100.css"; /* Thin (Hairline) | normal */
@import "../../node_modules/@fontsource/overpass/100-italic.css"; /* Thin (Hairline) | italic */
@import "../../node_modules/@fontsource/overpass/200.css"; /* Extra Light (Ultra Light) | normal */
@import "../../node_modules/@fontsource/overpass/200-italic.css"; /* Extra Light (Ultra Light) | italic */
@import "../../node_modules/@fontsource/overpass/300.css"; /* Light | normal */
@import "../../node_modules/@fontsource/overpass/300-italic.css"; /* Light | italic */
@import "../../node_modules/@fontsource/overpass/400.css"; /* Normal (Regular) | normal */
@import "../../node_modules/@fontsource/overpass/400-italic.css"; /* Normal (Regular) | italic */
@import "../../node_modules/@fontsource/overpass/600.css"; /* Semi Bold (Demi Bold) | normal */
@import "../../node_modules/@fontsource/overpass/600-italic.css"; /* Semi Bold (Demi Bold) | italic */
@import "../../node_modules/@fontsource/overpass/700.css"; /* Bold | normal */
@import "../../node_modules/@fontsource/overpass/700-italic.css"; /* Bold | italic */
@import "../../node_modules/@fontsource/overpass/800.css"; /* Extra Bold (Ultra Bold) | normal */
@import "../../node_modules/@fontsource/overpass/800-italic.css"; /* Extra Bold (Ultra Bold) | italic */
@import "../../node_modules/@fontsource/overpass/900.css"; /* Black (Heavy) | normal */
@import "../../node_modules/@fontsource/overpass/900-italic.css"; /* Black (Heavy) | italic */

View file

@ -0,0 +1,84 @@
// navbar-brand coloring
.navbar-dark {
a {
&.navbar-brand {
color: $gray-300;
&:hover {
color: $gray-300;
}
}
}
}
// navbar widget social icon coloring
// #block-7 > ul > li.wp-social-link.wp-block-social-link > a
.navbar-dark {
.widget_block {
ul {
&.wp-block-social-links {
&.is-style-logos-only {
li {
&.wp-social-link {
&.wp-block-social-link {
a {
&.wp-block-social-link-anchor {
color: $gray-300;
}
}
}
}
}
}
}
}
}
}
// navbar menu layout
.navbar-expand-lg {
.nav-item {
// margin-left: 2px;
a {
&.nav-link {
// padding: 0 0 0 6px;
// margin: 8px 0 8px 0;
// border-left: 6px transparent solid;
&.active {
// border-left: 6px $secondary solid;
// border-bottom: none;
}
&:hover, &:active {
// color: $primary !important;
// border-left: 6px $secondary solid;
// border-bottom: none;
}
}
}
}
}
@include media-breakpoint-up(lg) {
.navbar-expand-lg {
.nav-item {
// margin-left: 0;
a {
&.nav-link {
// padding: 0 0 2px 0;
// margin: 0 12px 0 12px;
// border-left: none;
// border-top: 6px transparent solid;
// border-bottom: 6px transparent solid;
&.active {
// border-left: none;
// border-bottom: 6px $secondary solid;
}
&:hover, &:active {
// color: $primary !important;
// border-left: none;
// border-bottom: 6px $secondary solid;
}
}
}
}
}
}

View file

@ -0,0 +1,56 @@
/* Hamburger settings overrides */
$hamburger-padding-x: 0.95rem !default;
$hamburger-padding-y: 0.625rem !default;
$hamburger-layer-width: 1.5rem !default;
$hamburger-layer-height: 2px !default;
$hamburger-layer-spacing: 6px !default;
// * skipping default color, using color from bootstrap instead, below
// $hamburger-layer-color: rgba(0, 0, 0, 0.55) !default;
$hamburger-layer-border-radius: 0.25rem !default;
$hamburger-hover-opacity: 0.7 !default;
// * skipping default color, using color from bootstrap instead, below
// $hamburger-active-layer-color: $hamburger-layer-color !default;
$hamburger-active-hover-opacity: $hamburger-hover-opacity !default;
/* import hamburgers sass */
@import "../../node_modules/hamburgers/_sass/hamburgers/hamburgers.scss";
/* correct colors to match bootstrap defaults */
.navbar-light {
.hamburger {
&.navbar-toggler {
border: 1px $navbar-light-toggler-border-color solid !important;
.hamburger-inner {
&,
&::before,
&::after {
background-color: $navbar-light-color;
}
}
&.is-active {
.hamburger-inner::after {
background-color: $navbar-light-color;
}
}
}
}
}
.navbar-dark {
.hamburger {
&.navbar-toggler {
border: 1px $navbar-dark-toggler-border-color solid !important;
.hamburger-inner {
&,
&::before,
&::after {
background-color: $navbar-dark-color;
}
}
&.is-active {
.hamburger-inner::after {
background-color: $navbar-dark-color;
}
}
}
}
}

View file

@ -0,0 +1,39 @@
/*
SVG ICON SYSTEM
per https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
*/
.icon {
display: inline-flex;
align-self: center;
}
.icon svg,
.icon img {
height: 1em;
width: 1em;
fill: currentColor;
}
.icon.baseline svg,
.icon img {
top: 0.15em;
position: relative;
}
// for navbar-brand logo, could be used for other non-icon SVGs with an extra class to controll the size
.logo {
display: inline-flex;
align-self: center;
}
.logo svg,
.logo img {
height: 5.3rem;
fill: currentColor;
}
.logo.baseline svg,
.logo img {
top: 0.15em;
position: relative;
}

279
assets/css/app.scss Normal file
View file

@ -0,0 +1,279 @@
/* Fonts */
@import "fonts";
/* Load Bootstrap v5 and customizations */
@import "bs-load";
/*SVG ICON SYSTEM*/
@import "svg-icons";
/* Navbar toggler icon override */
@import "nav-burger";
/* Navbar custom styling */
@import "nav-bar-help";
/* main */
html,
body {
color: $gray-100;
background-color: $spaceblue-800;
height: 100%;
}
// a {
// color: rgba($white, 0.75);
// // border-bottom: $gray-600 2px solid;
// // text-decoration: none;
// text-decoration-color: $gray-600;
// &.navbar-brand,
// &.nav-link {
// border-bottom: none;
// }
// &:visited {
// color: $info;
// .post-title & {
// color: $gray-100;
// }
// }
// &:hover {
// color: $primary;
// // text-decoration: none;
// // border-bottom: $secondary 3px solid;
// text-decoration-color: $secondary;
// &.navbar-brand {
// border-bottom: none;
// }
// }
// }
.wp-block-separator {
border-top: none !important;
border-bottom: none !important;
}
/* more */
.border-gray-900 {
border-color: $gray-900 !important;
}
.text-gray-200 {
color: $gray-200;
}
.text-gray-300 {
color: $gray-300;
}
.text-gray-400 {
color: $gray-400;
}
.text-gray-500 {
color: $gray-500;
}
.border-10 {
border-width: 10px !important;
}
.border-20 {
border-width: 20px !important;
}
.font-handbrush {
font-family: $font-family-handbrush;
}
.fw-500 {
font-weight: 500;
}
.fw-600 {
font-weight: 600;
}
.fs-larger {
font-size: larger;
}
.fs-smaller {
font-size: smaller;
}
.tek-fixed-footer {
@extend .bg-dark;
@extend .bottom-0;
@extend .end-0;
@extend .position-fixed;
font-size: 14px !important;
border-top-left-radius: 0.3rem !important;
padding-top: 2px;
padding-bottom: 2px;
}
.tek-subtitle {
@extend .fs-5;
@extend .font-monospace;
@extend .text-gray-300;
@extend .mb-0;
// margin-top: -0.5rem;
}
.tek-border-bottom-gray-dashed {
@extend .border-bottom;
// @extend .border-gray;
border-bottom-color: $gray-500 !important;
border-bottom-style: dashed !important;
}
/* front page styles */
#tek-front-page img.wp-post-image {
@extend .img-fluid;
@extend .border;
// @extend .border-20;
@extend .border-gray-900;
@extend .rounded-2;
border-width: 18px !important;
width: 100%;
}
#tek-front-page h2, header h2 {
@extend .fs-2;
@extend .fw-600;
@extend .mb-0;
}
/* social icons */
#social-icons .link-light {
border-bottom: none;
color: $gray-100;
&:hover {
color: $primary;
}
}
/* blockquote handling */
blockquote {
&.wp-block-quote {
@extend .border-start;
@extend .border-gray;
@extend .border-5;
@extend .ms-0;
@extend .my-4;
@extend .ps-3;
@extend .py-2;
background-color: $gray-750;
&.tek-bq-lg {
p {
font-size: 1.375rem;
}
}
p {
@extend .blockquote;
font-size: 1em;
&:last-of-type {
@extend .my-0;
@extend .py-0;
}
}
cite {
@extend .blockquote-footer;
@extend .text-gray-300;
@extend .my-0;
@extend .py-0;
font-size: 0.85em;
font-style: normal;
}
:last-child {
@extend .py-1;
}
}
}
/* blog */
.post-title a {
color: $gray-100;
text-decoration: none;
border-bottom: none;
&:hover {
color: $primary;
// border-bottom: $secondary 3px solid;
text-decoration: underline;
text-decoration-color: $secondary;
}
}
.post-lede,
.post-body {
h2, h3, h4, h5, h6 {
color: $gray-200;
margin-top: 2rem;
}
}
.post li {
line-height: 1.75rem;
}
.more-link {
@extend .fs-6;
}
/* widget styling */
#footer-widgets {
background-color: $gray-750;
border-radius: .5em;
.widgettitle {
@extend .fs-4;
}
.wp-block-group {
@extend .px-3;
@extend .py-3;
max-width: 25rem;
}
ul {
padding-inline-start: 2rem;
}
.wp-block-loginout {
display: list-item;
margin-left: 2rem;
list-style-type: disc;
}
}
.wp-block-tag-cloud {
@extend .mb-0;
}
.search-form .form-control {
color: $gray-100 !important;
background-color: $gray-800 !important;
border-color: $gray-500;
}
.search-form .form-control:focus {
border-color: $input-focus-border-color;
}
.form-control::-ms-clear,
input.form-control::-ms-clear,
.form-control::-ms-reveal,
input.form-control::-ms-reveal { display: none; }
.form-control::-webkit-input-placeholder { /* WebKit, Blink, Edge */
color: $gray-500 !important;
}
.form-control:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: $gray-500 !important;
opacity: 1;
}
.form-control::-moz-placeholder { /* Mozilla Firefox 19+ */
color: $gray-500 !important;
opacity: 1;
}
.form-control:-ms-input-placeholder { /* Internet Explorer 10-11 */
color: $gray-500 !important;
}
.form-control::-ms-input-placeholder { /* Microsoft Edge */
color: $gray-500 !important;
}
.form-control::placeholder { /* Most modern browsers support this now. */
color: $gray-500 !important;
}
.search-form {
.btn {
padding: .25rem .75rem;
&.btn-outline-light {
color: $gray-300;
border-color: $gray-500;
&:hover {
color: $primary;
background-color: inherit;
border-color: $secondary;
}
}
.icon {
font-size: 1.375rem;
margin-top: 1px;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

BIN
assets/images/favicon-16x16.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 B

BIN
assets/images/favicon-32x32.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

1
assets/images/site.webmanifest Executable file
View file

@ -0,0 +1 @@
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}

View file

@ -0,0 +1,12 @@
const togglerBtn = document.getElementById("navbarSupportedContentToggler");
const navbarContent = document.getElementById("navbarSupportedContent");
navbarContent.addEventListener("show.bs.collapse", () => {
console.log("opening navbar content");
togglerBtn.classList.toggle("is-active");
});
navbarContent.addEventListener("hide.bs.collapse", () => {
console.log("closing navbar content");
togglerBtn.classList.toggle("is-active");
});

46
assets/js/main.js Normal file
View file

@ -0,0 +1,46 @@
// Import SCSS
import '../css/app.scss'
// Import icons for sprite-loader
// // navbar brand icon
// import "../../node_modules/@mdi/svg/svg/desktop-classic.svg"; // brand
import "../raw/rdnyc-logo.svg"; // rdnyc logo
// other:
import "../../node_modules/@mdi/svg/svg/magnify.svg"; // search form button icon
// import "../../node_modules/@mdi/svg/svg/home.svg";
// import "../../node_modules/@mdi/svg/svg/information.svg";
// import "../../node_modules/@mdi/svg/svg/account.svg";
// import "../../node_modules/@mdi/svg/svg/briefcase-account.svg";
// import "../../node_modules/@mdi/svg/svg/zip-disk.svg";
// import "../../node_modules/@mdi/svg/svg/typewriter.svg";
// import "../../node_modules/@mdi/svg/svg/calendar-clock.svg";
// import "../../node_modules/@mdi/svg/svg/tag-multiple.svg";
// import "../../node_modules/@mdi/svg/svg/rss.svg";
// import "../../node_modules/@mdi/svg/svg/account-hard-hat.svg";
// import "../../node_modules/@mdi/svg/svg/open-in-new.svg";
// social
// import "../../node_modules/@mdi/svg/svg/linkedin.svg";
// import "../../node_modules/@mdi/svg/svg/github.svg";
// import "../../node_modules/@mdi/svg/svg/key-variant.svg";
// import "../../node_modules/@mdi/svg/svg/goodreads.svg";
// import "../../node_modules/@mdi/svg/svg/twitter.svg";
// import "../../node_modules/@mdi/svg/svg/facebook.svg";
// import "../../node_modules/@mdi/svg/svg/instagram.svg";
// import "../../node_modules/@mdi/svg/svg/steam.svg";
// import "../../node_modules/@mdi/svg/svg/discord.svg";
// Import Bootstrap JS
import 'bootstrap/js/dist/collapse';
import 'bootstrap/js/dist/alert';
import 'bootstrap/js/dist/button';
import 'bootstrap/js/dist/dropdown';
// import navbar burger code
import "./_hamburger-helper";
// highlight any code blocks tagged with class 'to-highlight'
document.addEventListener('DOMContentLoaded', (event) => {
document.querySelectorAll('code.to-highlight').forEach((el) => {
hljs.highlightElement(el);
});
});

172
assets/raw/rdnyc-logo.svg Executable file
View file

@ -0,0 +1,172 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 224 85" style="enable-background:new 0 0 224 85;" xml:space="preserve">
<style type="text/css">
.st0{fill-rule:evenodd;clip-rule:evenodd;fill:#BEB5B0;}
.st1{enable-background:new ;}
.st2{fill:#BEB5B0;}
</style>
<title>Group 42</title>
<desc>Created with Sketch.</desc>
<g id="Desktop">
<g id="Default-Home" transform="translate(-61.000000, -63.000000)">
<g id="Group-42" transform="translate(61.000000, 60.000000)">
<g id="Group-41" transform="translate(0.000000, 3.000000)">
<path id="Fill-1" class="st0" d="M40.6,11.3c-16,0-29,13.1-29,29.1c0,16.1,13,29.1,29,29.1s29-13.1,29-29.1
C69.5,24.4,56.6,11.3,40.6,11.3 M40.6,64.3c-13.1,0-23.7-10.7-23.7-23.9s10.6-23.9,23.7-23.9s23.7,10.7,23.7,23.9
S53.7,64.3,40.6,64.3"/>
<path id="Fill-3" class="st0" d="M50.4,40.4c0-2.9-1.3-5.5-3.3-7.3c1.8,2.9,1.6,5.3,1.3,6.3c-0.5,2-2.1,3.5-3.9,3.9
c-0.3,0.1-0.5,0.1-0.7,0.1c-1.2,0-2.3-0.5-3.2-1.5c-0.9,0.1-3.3,0.5-3.6,2.3c-0.2,0.9,0.4,2,1.4,2.8c1,0.8,3.7,2.4,8.9,0.9
C49.2,45.9,50.4,43.3,50.4,40.4"/>
<path id="Fill-5" class="st0" d="M37.4,48c-1.4-1.2-2.1-2.7-1.8-4.2c0.5-2.7,3.4-3.4,4.7-3.4c0.1-1.1,0-3.6-2.2-4.3
c-3.5-0.9-6.9,3-7.4,3.8v0.5c0,5.4,4.4,9.9,9.8,9.9c1.1,0,2.2-0.2,3.2-0.5h-0.6C40,49.8,38.2,48.7,37.4,48"/>
<path id="Fill-7" class="st0" d="M31.2,37.3c1.6-1.5,4.3-3.3,7.3-2.5c3.1,0.8,3.4,4.2,3.2,6.1c0.7,0.8,1.6,1.2,2.6,1
c1.3-0.3,2.3-1.4,2.8-2.8c0.6-2.4-0.6-5.4-3.6-8.1c-0.9-0.3-1.9-0.5-2.9-0.5C36.3,30.5,32.6,33.4,31.2,37.3"/>
<path id="Fill-9" class="st0" d="M40.6,9.9c1.9,0,3.8,0.2,5.6,0.5c0.1-0.4,0.2-0.6,0.2-1.1c0-1.8-1.4-3.3-3.2-3.3
c-0.2,0-0.5,0-0.6,0.1c0.5-0.5,1-1.4,1-2.3c0-1.8-1.4-3.3-3.2-3.3c-1.8,0-3.2,1.5-3.2,3.3c0,0.9,0.4,1.7,1,2.3
c-0.2,0-0.4-0.1-0.6-0.1c-1.8,0-3.2,1.5-3.2,3.3c0,0.5,0.1,0.8,0.2,1.2C36.3,10,38.4,9.9,40.6,9.9 M40.2,7.1
c0.2,0,0.5,0,0.6-0.1c-0.3,0.3-0.5,0.5-0.6,0.9c-0.2-0.4-0.4-0.6-0.6-0.9C39.9,7.1,40,7.1,40.2,7.1"/>
<path id="Fill-11" class="st0" d="M64.1,21.2c1.4-0.4,2.4-1.6,2.4-3.2c0-1.8-1.4-3.3-3.2-3.3c-1.5,0-2.7,1-3.1,2.4
C61.7,18.4,63,19.7,64.1,21.2"/>
<path id="Fill-13" class="st0" d="M78,37.3c-0.9,0-1.7,0.4-2.3,1c0-0.2,0.1-0.4,0.1-0.6c0-1.8-1.4-3.3-3.2-3.3
c-0.8,0-1.5,0.3-2.2,0.8c0.3,1.6,0.5,3.4,0.5,5.2c0.1,0.1,0.2,0.1,0.3,0.2c-0.1,0-0.2,0.1-0.3,0.2c0,1.7-0.2,3.4-0.5,5.2
c0.5,0.5,1.4,0.8,2.2,0.8c1.8,0,3.2-1.5,3.2-3.3c0-0.2,0-0.5-0.1-0.6c0.5,0.5,1.4,1,2.3,1c1.8,0,3.2-1.5,3.2-3.3
C81.3,38.6,79.8,37.3,78,37.3 M74.9,41.1c-0.3-0.3-0.5-0.5-0.9-0.6c0.4-0.2,0.6-0.4,0.9-0.6c0,0.2-0.1,0.4-0.1,0.6
C74.9,40.7,74.9,40.9,74.9,41.1"/>
<path id="Fill-15" class="st0" d="M64,59.8c-1.3,1.5-2.6,2.9-4.1,4.2c0.5,1.2,1.6,2.1,3,2.1c1.8,0,3.2-1.5,3.2-3.3
C66.1,61.5,65.2,60.3,64,59.8"/>
<path id="Fill-17" class="st0" d="M40.6,70.9c-2,0-4-0.2-6-0.5c-0.1,0.3-0.2,0.6-0.2,1c0,1.8,1.4,3.3,3.2,3.3
c0.2,0,0.5,0,0.6-0.1c-0.5,0.5-1,1.4-1,2.3c0,1.8,1.4,3.3,3.2,3.3s3.2-1.5,3.2-3.3c0-0.9-0.4-1.7-1-2.3c0.2,0,0.4,0.1,0.6,0.1
c1.8,0,3.2-1.5,3.2-3.3c0-0.4-0.1-0.7-0.2-1C44.6,70.7,42.6,70.9,40.6,70.9 M40.6,73.5c-0.2,0-0.5,0-0.6,0.1
c0.3-0.3,0.5-0.5,0.6-0.9c0.2,0.4,0.4,0.6,0.6,0.9C41,73.6,40.8,73.5,40.6,73.5"/>
<path id="Fill-19" class="st0" d="M17.1,59.8c-1.3,0.5-2.1,1.6-2.1,3c0,1.8,1.4,3.3,3.2,3.3c1.4,0,2.5-0.9,3-2.1
C19.8,62.7,18.4,61.3,17.1,59.8"/>
<path id="Fill-21" class="st0" d="M10.6,34.9c-0.5-0.5-1.2-0.6-2-0.6c-1.8,0-3.2,1.5-3.2,3.3c0,0.2,0,0.5,0.1,0.6
c-0.5-0.5-1.4-1-2.3-1c-1.8,0-3.2,1.5-3.2,3.3c0,1.8,1.4,3.3,3.2,3.3c0.9,0,1.7-0.4,2.3-1c0,0.2-0.1,0.4-0.1,0.6
c0,1.8,1.4,3.3,3.2,3.3c0.7,0,1.4-0.3,2-0.6c-0.4-1.7-0.5-3.6-0.5-5.4C10.2,38.5,10.4,36.7,10.6,34.9 M6.5,41
c0-0.2,0.1-0.4,0.1-0.6c0-0.3,0-0.5-0.1-0.6C6.8,40,7,40.2,7.4,40.3C7,40.5,6.7,40.8,6.5,41"/>
<path id="Fill-23" class="st0" d="M16.8,21.6c1.2-1.5,2.4-2.8,3.9-4.1c-0.5-1.4-1.6-2.3-3.1-2.3c-1.8,0-3.2,1.5-3.2,3.3
C14.3,19.9,15.4,21.2,16.8,21.6"/>
<path id="Fill-25" class="st0" d="M43.1,28.5V18.1c-0.8-0.1-1.7-0.2-2.5-0.2c-0.9,0-1.7,0.1-2.6,0.2v10.2
c0.8-0.2,1.7-0.3,2.5-0.3C41.4,28.2,42.3,28.3,43.1,28.5"/>
<path id="Fill-27" class="st0" d="M54.4,22.8l-7.2,7.3c1.4,0.9,2.7,2.2,3.6,3.6l7.2-7.3C56.9,25.1,55.7,23.9,54.4,22.8"/>
<path id="Fill-29" class="st0" d="M52.8,40.4c0,0.8-0.1,1.7-0.3,2.4h10.2c0.1-0.8,0.2-1.7,0.2-2.5c0-0.9-0.1-1.7-0.2-2.5H52.5
C52.7,38.7,52.8,39.5,52.8,40.4"/>
<path id="Fill-31" class="st0" d="M47.3,50.8l7.1,7.2c1.4-1.1,2.5-2.3,3.6-3.6l-7.1-7.2C49.9,48.6,48.7,49.8,47.3,50.8"/>
<path id="Fill-33" class="st0" d="M38,52.5v10.2c0.8,0.1,1.7,0.2,2.5,0.2c0.9,0,1.7-0.1,2.5-0.2V52.5c-0.8,0.2-1.7,0.3-2.5,0.3
C39.7,52.8,38.8,52.7,38,52.5"/>
<path id="Fill-35" class="st0" d="M30.3,47.1l-7.1,7.2c1.1,1.4,2.3,2.5,3.6,3.6l7.1-7.2C32.4,49.8,31.2,48.6,30.3,47.1"/>
<path id="Fill-37" class="st0" d="M28.3,40.4c0-0.9,0.1-1.8,0.3-2.6H18.4c-0.1,0.8-0.2,1.7-0.2,2.5c0,0.9,0.1,1.7,0.2,2.5h10.1
C28.4,42.1,28.3,41.3,28.3,40.4"/>
<path id="Fill-39" class="st0" d="M33.9,30.1l-7.2-7.3c-1.4,1.1-2.5,2.3-3.6,3.6l7.2,7.3C31.3,32.3,32.5,31.1,33.9,30.1"/>
</g>
<g class="st1">
<path class="st2" d="M102.8,24V7.2h8.2c2,0,3.5,0.5,4.4,1.5c0.9,1,1.4,2.3,1.4,3.9c0,1-0.3,2-0.8,2.9c-0.5,0.9-1.3,1.6-2.2,2
l3.1,6.5h-4.1l-3-5.9h-3.2V24H102.8z M106.4,14.6h4.6c1.3,0,1.9-0.7,1.9-2c0-0.6-0.1-1-0.4-1.4c-0.3-0.4-0.8-0.6-1.5-0.6h-4.6
V14.6z"/>
</g>
<g class="st1">
<path class="st2" d="M119.7,24V7.2h12.1v3.5h-8.4v3h4.7v3.5h-4.7v3.5h8.9V24H119.7z"/>
</g>
<g class="st1">
<path class="st2" d="M140.7,24.2c-1.3,0-2.4-0.3-3.3-0.8c-1-0.5-1.7-1.2-2.2-2c-0.5-0.8-0.9-1.8-1.2-2.7c-0.2-1-0.4-2-0.4-3.1
c0-1,0.1-2,0.4-3c0.3-1,0.6-1.9,1.2-2.8c0.5-0.9,1.3-1.6,2.2-2.1c1-0.5,2.1-0.8,3.3-0.8c1.5,0,2.8,0.4,3.9,1.2
c1.1,0.8,1.8,1.7,2.3,2.9l-3.3,1.5c-0.5-0.7-0.9-1.2-1.3-1.5c-0.4-0.3-0.9-0.5-1.6-0.5c-0.6,0-1.1,0.2-1.6,0.5
c-0.4,0.3-0.8,0.7-1,1.2c-0.2,0.5-0.4,1.1-0.5,1.6c-0.1,0.6-0.2,1.2-0.2,1.8c0,0.8,0.1,1.6,0.3,2.4c0.2,0.8,0.6,1.4,1.1,1.9
c0.5,0.5,1.1,0.8,1.9,0.8c1,0,2-0.7,2.9-2.2l3.3,1.2C145.6,22.8,143.5,24.2,140.7,24.2z"/>
</g>
<g class="st1">
<path class="st2" d="M155.8,24.3c-1.1,0-2-0.2-2.9-0.5c-0.9-0.3-1.6-0.8-2.1-1.4c-0.6-0.6-1-1.2-1.4-2s-0.6-1.5-0.8-2.3
c-0.2-0.8-0.3-1.6-0.3-2.5c0-0.9,0.1-1.7,0.3-2.5c0.2-0.8,0.4-1.6,0.8-2.3s0.8-1.4,1.4-2c0.6-0.6,1.3-1,2.1-1.4
c0.9-0.3,1.8-0.5,2.9-0.5c1.3,0,2.4,0.3,3.4,0.8s1.8,1.2,2.3,2c0.6,0.9,1,1.8,1.3,2.8s0.4,2,0.4,3.1c0,1.1-0.1,2.1-0.4,3.1
c-0.3,1-0.7,1.9-1.3,2.8c-0.6,0.9-1.3,1.5-2.3,2S157.1,24.3,155.8,24.3z M155.8,20.8c0.8,0,1.5-0.3,2.1-0.9c0.6-0.6,1-1.2,1.2-2
c0.2-0.7,0.3-1.5,0.3-2.3c0-0.9-0.1-1.7-0.3-2.4c-0.2-0.7-0.6-1.4-1.2-1.9c-0.6-0.6-1.3-0.8-2.2-0.8c-0.9,0-1.6,0.3-2.2,0.9
c-0.6,0.6-1,1.2-1.2,2s-0.3,1.5-0.3,2.4c0,0.6,0.1,1.2,0.2,1.8c0.1,0.6,0.3,1.1,0.6,1.6c0.3,0.5,0.7,0.9,1.2,1.2
S155.2,20.8,155.8,20.8z"/>
</g>
<g class="st1">
<path class="st2" d="M167.9,24l-6-16.8h4l3.6,10.6c0,0.1,0.1,0.3,0.1,0.5l0.1,0.3c0-0.1,0.1-0.4,0.2-0.7l3.6-10.6h3.9l-6,16.8
H167.9z"/>
</g>
<g class="st1">
<path class="st2" d="M178.5,24V7.2h12.1v3.5h-8.4v3h4.7v3.5h-4.7v3.5h8.9V24H178.5z"/>
</g>
<g class="st1">
<path class="st2" d="M193.8,24V7.2h8.2c2,0,3.5,0.5,4.4,1.5c0.9,1,1.4,2.3,1.4,3.9c0,1-0.3,2-0.8,2.9c-0.5,0.9-1.3,1.6-2.2,2
l3.1,6.5h-4.1l-3-5.9h-3.2V24H193.8z M197.4,14.6h4.6c1.3,0,1.9-0.7,1.9-2c0-0.6-0.1-1-0.4-1.4c-0.3-0.4-0.8-0.6-1.5-0.6h-4.6
V14.6z"/>
</g>
<g class="st1">
<path class="st2" d="M213.6,24v-6.5l-6.4-10.3h4.1l4.1,6.4l4.1-6.4h4.1l-6.4,10.3V24H213.6z"/>
</g>
<g class="st1">
<path class="st2" d="M102.8,34.2h6.2c1.4,0,2.7,0.2,3.7,0.7c1.1,0.5,1.9,1.1,2.6,1.9c0.6,0.8,1.1,1.7,1.4,2.7
c0.3,1,0.5,2,0.5,3.1c0,0.8-0.1,1.6-0.3,2.3s-0.5,1.5-0.9,2.3s-0.9,1.4-1.6,1.9c-0.6,0.6-1.4,1-2.4,1.3c-1,0.3-2,0.5-3.2,0.5
h-6.1V34.2z M109.3,47.5c1.4,0,2.4-0.5,3.1-1.5c0.7-1,1-2.1,1-3.4c0-1.3-0.3-2.5-1-3.5c-0.7-1-1.6-1.5-2.9-1.5h-3.1v9.9H109.3z"
/>
</g>
<g class="st1">
<path class="st2" d="M130.6,51v-6.9h-6.7V51h-3.6V34.2h3.6v6.4h6.7v-6.4h3.7V51H130.6z"/>
<path class="st2" d="M149.2,51l-1.2-3.3h-6.3l-1.2,3.3h-4l6.6-16.8h3.5l6.6,16.8H149.2z M146.7,44.4l-1.4-3.6
c-0.2-0.5-0.4-1-0.5-1.4c-0.1,0.3-0.2,0.7-0.5,1.4l-1.4,3.6H146.7z"/>
</g>
<g class="st1">
<path class="st2" d="M155.3,51V34.2h8.2c2,0,3.5,0.5,4.4,1.5c0.9,1,1.4,2.3,1.4,3.9c0,1-0.3,2-0.8,2.9s-1.3,1.6-2.2,2l3.1,6.5
h-4.1l-3-5.9h-3.2V51H155.3z M158.9,41.6h4.6c1.3,0,1.9-0.7,1.9-2c0-0.6-0.1-1-0.4-1.4c-0.3-0.4-0.8-0.6-1.5-0.6h-4.6V41.6z"/>
</g>
<g class="st1">
<path class="st2" d="M188.2,51h-3.6v-8.3c0-0.2,0-0.3,0-0.5c-0.1,0.2-0.2,0.4-0.2,0.5l-4.1,8.7l-4.1-8.6c0-0.1-0.1-0.3-0.2-0.5
v0.5V51h-3.6V34.2h3.7l3.9,8.6c0.1,0.3,0.2,0.6,0.4,1.1c0.2-0.4,0.3-0.8,0.4-1.1l4-8.6h3.4V51z"/>
<path class="st2" d="M203.1,51l-1.2-3.3h-6.3l-1.2,3.3h-4l6.6-16.8h3.5l6.6,16.8H203.1z M200.6,44.4l-1.4-3.6
c-0.2-0.5-0.4-1-0.5-1.4c-0.1,0.3-0.2,0.7-0.5,1.4l-1.4,3.6H200.6z"/>
</g>
<g class="st1">
<path class="st2" d="M112.8,84h-1.3l-5-8c-0.2-0.3-0.3-0.6-0.4-0.8c0,0.3,0,0.6,0,0.8v8h-1.4V72.8h1.4l5,8
c0.2,0.3,0.3,0.6,0.5,0.8c0-0.4,0-0.7,0-0.8v-8h1.4V84z"/>
</g>
<g class="st1">
<path class="st2" d="M118.8,84.2c-1.1,0-2-0.4-2.6-1.2c-0.7-0.8-1-1.8-1-3.1c0-1.3,0.3-2.4,1-3.1c0.7-0.8,1.5-1.1,2.6-1.1
c1,0,1.8,0.3,2.4,1s1,1.6,1,2.9c0,0.3,0,0.6,0,0.9h-5.5c0.1,0.7,0.3,1.3,0.7,1.8c0.4,0.5,0.9,0.7,1.5,0.7c0.7,0,1.3-0.2,1.8-0.7
l0.8,0.9C120.7,83.8,119.9,84.2,118.8,84.2z M116.6,79.3h4.2c0-0.8-0.2-1.5-0.6-1.8c-0.4-0.4-0.8-0.6-1.4-0.6
c-0.6,0-1.1,0.2-1.6,0.6C116.9,77.9,116.6,78.5,116.6,79.3z"/>
</g>
<g class="st1">
<path class="st2" d="M125.3,84l-2.1-8.2h1.4l1.2,5.5c0,0.1,0,0.2,0.1,0.4c0,0.2,0.1,0.4,0.1,0.5c0-0.1,0.1-0.4,0.2-0.9l1.5-5.5
h1.2l1.5,5.5l0.2,0.9c0-0.1,0.1-0.2,0.1-0.4c0-0.2,0.1-0.4,0.1-0.4l1.2-5.5h1.4l-2.1,8.2h-1.2l-1.5-4.8
c-0.1-0.5-0.3-0.8-0.3-1.1c-0.1,0.4-0.2,0.8-0.3,1.1l-1.5,4.8H125.3z"/>
</g>
<g class="st1">
<path class="st2" d="M141.6,84v-4.4l-3.8-6.8h1.6l2.9,5.4l3-5.4h1.5l-3.8,6.8V84H141.6z"/>
</g>
<g class="st1">
<path class="st2" d="M152.1,83c-0.7,0.8-1.5,1.1-2.6,1.1s-2-0.4-2.6-1.1c-0.7-0.8-1-1.8-1-3.1c0-1.3,0.3-2.4,1-3.1
c0.7-0.8,1.5-1.1,2.6-1.1s2,0.4,2.6,1.1c0.7,0.8,1,1.8,1,3.1C153.1,81.2,152.8,82.3,152.1,83z M147.9,82.1
c0.4,0.5,0.9,0.8,1.6,0.8s1.2-0.3,1.6-0.8c0.4-0.5,0.6-1.3,0.6-2.2c0-0.9-0.2-1.7-0.6-2.2c-0.4-0.5-0.9-0.8-1.6-0.8
s-1.2,0.3-1.6,0.8s-0.6,1.3-0.6,2.2C147.3,80.8,147.5,81.6,147.9,82.1z"/>
</g>
<g class="st1">
<path class="st2" d="M155.3,84v-8.2h1.4v1.1c0.4-0.8,1-1.3,1.9-1.3c0.5,0,0.9,0.1,1.3,0.4l-0.2,1.3c-0.3-0.2-0.7-0.4-1.2-0.4
c-0.5,0-0.9,0.2-1.3,0.6c-0.4,0.4-0.6,1-0.6,1.8V84H155.3z"/>
</g>
<g class="st1">
<path class="st2" d="M168,84h-1.5l-2.5-4.9l-1.2,1.2V84h-1.4V73.1l1.4-0.7v6.2l2.7-2.8h1.7l-2.1,2.2L168,84z"/>
</g>
<g class="st1">
<path class="st2" d="M178.6,84.2c-0.8,0-1.5-0.2-2.1-0.5c-0.6-0.3-1.1-0.8-1.5-1.3c-0.4-0.6-0.6-1.2-0.8-1.8
c-0.2-0.7-0.3-1.4-0.3-2.1c0-0.7,0.1-1.4,0.3-2.1c0.2-0.7,0.4-1.3,0.8-1.8s0.8-1,1.5-1.3s1.3-0.5,2.1-0.5c1.7,0,3,0.7,3.6,2
l-1.2,0.6c-0.3-0.4-0.6-0.8-1-1s-0.8-0.3-1.4-0.3c-0.8,0-1.4,0.2-1.9,0.7c-0.5,0.5-0.8,1-1,1.7c-0.2,0.6-0.3,1.3-0.3,2.1
c0,1.2,0.3,2.3,0.8,3.2c0.5,0.9,1.3,1.3,2.4,1.3s1.9-0.5,2.4-1.4l1.3,0.5c-0.3,0.7-0.8,1.2-1.4,1.6
C180.3,84,179.6,84.2,178.6,84.2z"/>
<path class="st2" d="M185.9,74.1c-0.2,0.2-0.4,0.2-0.6,0.2c-0.2,0-0.5-0.1-0.6-0.3c-0.2-0.2-0.2-0.4-0.2-0.6
c0-0.2,0.1-0.5,0.3-0.6c0.2-0.2,0.4-0.3,0.6-0.3c0.2,0,0.5,0.1,0.6,0.3c0.2,0.2,0.3,0.4,0.3,0.6
C186.2,73.7,186.1,73.9,185.9,74.1z M184.6,84v-8.2h1.4V84H184.6z"/>
<path class="st2" d="M190.9,84.2c-1.2,0-1.7-0.7-1.7-2V77h-1.3v-1.2h1.3v-2.7l1.4-0.7v3.4h2V77h-2v4.7c0,0.4,0.1,0.6,0.2,0.8
c0.1,0.2,0.3,0.3,0.7,0.3c0.4,0,0.8-0.1,1.2-0.4l-0.2,1.4C192,84.1,191.4,84.2,190.9,84.2z"/>
<path class="st2" d="M195.6,87.1l1.2-3.3l-3-8h1.4l2,5.6c0.1,0.2,0.2,0.4,0.3,0.8c0.1-0.3,0.2-0.6,0.3-0.8l2.1-5.6h1.4L197,87.1
H195.6z"/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

82
comments.php Normal file
View file

@ -0,0 +1,82 @@
<?php
/**
* The template for displaying comments.
*
* This is the template that displays the area of the page that contains both the current comments
* and the comment form.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WPRDNYC
*/
/*
* If the current post is protected by a password and
* the visitor has not yet entered the password we will
* return early without loading the comments.
*/
if ( post_password_required() ) {
return;
}
?>
<div id="comments" class="comments-area">
<?php
if ( have_comments() ) : ?>
<h2 class="comments-title">
<?php
printf(
esc_html( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'wp-rdnyc' ) ),
number_format_i18n( get_comments_number() ),
'<span>' . get_the_title() . '</span>'
);
?>
</h2>
<?php
if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
<nav id="comment-nav-above" class="navigation comment-navigation">
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'wp-rdnyc' ); ?></h2>
<div class="nav-links">
<div class="nav-previous"><?php previous_comments_link( esc_html( 'Older Comments' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( esc_html( 'Newer Comments' ) ); ?></div>
</div>
</nav>
<?php
endif; ?>
<ol class="comment-list">
<?php
wp_list_comments( array(
'style' => 'ol',
'short_ping' => true,
) ); ?>
</ol>
<?php
if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
<nav id="comment-nav-below" class="navigation comment-navigation">
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'wp-rdnyc' ); ?></h2>
<div class="nav-links">
<div class="nav-previous"><?php previous_comments_link( esc_html( 'Older Comments' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( esc_html( 'Newer Comments' ) ); ?></div>
</div>
</nav>
<?php
endif; ?>
<?php
endif; ?>
<?php
// If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
?>
<p class="no-comments"><?php esc_html( 'Comments are closed.' ); ?></p>
<?php
endif; ?>
<?php
comment_form(); ?>
</div>

5
composer.json Normal file
View file

@ -0,0 +1,5 @@
{
"require": {
"a7/autoload": "^2.1"
}
}

55
composer.lock generated Normal file
View file

@ -0,0 +1,55 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "c0d1ffb65b9e528acc693829affbf907",
"packages": [
{
"name": "a7/autoload",
"version": "2.1",
"source": {
"type": "git",
"url": "https://github.com/a7/autoload.git",
"reference": "2d4a63c88150869883e43ad04e04b81125b55fd9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/a7/autoload/zipball/2d4a63c88150869883e43ad04e04b81125b55fd9",
"reference": "2d4a63c88150869883e43ad04e04b81125b55fd9",
"shasum": ""
},
"require": {
"php": ">=7.0"
},
"type": "library",
"autoload": {
"files": [
"package.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Unlicense"
],
"authors": [
{
"name": "A7",
"email": "a7@fastmail.com",
"homepage": "https://github.com/a7"
}
],
"description": "Automatically and recursively require_once all php files in a given directory.",
"time": "2019-03-28T11:26:32+00:00"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
}

View file

@ -0,0 +1,56 @@
<?php
/**
* The article template.
*
* @author Recovery Dharma NYC
* @since 1.0.0
*/
namespace WP_RDNYC;
?>
<article class="post border-bottom border-gray pb-4 mb-3" itemscope itemtype="https://schema.org/CreativeWork">
<header>
<h2 class="post-title fs-2 fw-600 mb-2">
<?php
if ( is_archive() || is_search() || is_home() ) {
printf( '<a href="%s" rel="bookmark">%s</a>',
esc_url( get_the_permalink() ),
esc_html( get_the_title() )
);
} else {
echo get_the_title();
} ?>
</h2>
<div class="post-date font-monospace text-gray-300 <?php echo (has_tag() ? '' : 'mb-3'); ?>">
<?php
echo svg_icon_use("mdi-calendar-clock", "baseline me-2") . get_the_date('F j, Y');
echo ' by ' . svg_icon_use("mdi-account", "baseline me-1") . get_the_author();
?>
</div>
<?php
if (has_tag()) {
echo '<div class="post-tags fs-smaller mb-4">';
echo svg_icon_use("mdi-tag-multiple", "baseline text-gray-300 me-1");
$tag_strings = array_map(function ($tag) {
return '<span class="text-gray-300">#</span><a href="' . get_tag_link($tag) . '">' . $tag->name . '</a>';
}, get_the_tags());
echo implode(", ", $tag_strings) . '</div>';
}
?>
</header>
<div class="article post-body">
<?php
if ( has_post_thumbnail() ) {
echo get_the_post_thumbnail( get_the_ID(), 'large', ['class' => 'rounded shadow-lg'] );
}
the_content(); ?>
</div>
</article>

20
custom-functions.php Normal file
View file

@ -0,0 +1,20 @@
<?php
/**
* Function to support inline SVG icons by name with div wrapper
*/
function svg_icon_use($icon_name, $div_class = '') {
$div_class .= ' icon';
$output = "<div class=\"$div_class $icon_name\"><svg class=\"$icon_name\" aria-hidden=\"true\">";
$output .= "<use xlink:href=\"" . get_stylesheet_directory_uri() . "/dist/images/icon-sprites.svg#$icon_name\"></use>";
return $output . "</svg></div>";
};
function svg_logo_use($icon_name, $div_class = '', $svg_title = 'Logo') {
$div_class .= ' logo';
$output = "<div class=\"$div_class $icon_name\"><svg class=\"$icon_name\" role=\"img\"><title>$svg_title</title>";
$output .= "<use xlink:href=\"" . get_stylesheet_directory_uri() . "/dist/images/icon-sprites.svg#$icon_name\"></use>";
return $output . "</svg></div>";
};
?>

42
custom-shortcodes.php Normal file
View file

@ -0,0 +1,42 @@
<?php
require_once( WP_RDNYC_DIR . '/socials.php' );
/**
* Shortcode to insert line of social icons
*/
function social_icons_function( $atts = array() ) {
// set up default parameter
extract(shortcode_atts(array(
'prof' => '0'
), $atts));
if ($prof == '1') {
return get_social_icons_prof_str();
} else {
return get_social_icons_str();
}
}
add_shortcode('social_icons', 'social_icons_function');
/**
* Shortcode to insert single social icon by name
* However, social icon MUST be imported in main.js !
*/
function single_social_icon_function( $atts = array() ) {
// set up default parameter
extract(shortcode_atts(array(
'name' => '0',
'class' => 'baseline'
), $atts));
if ($name == '0') {
return 'social_icon shortcode requires "name" parameter, like "name=mdi-account"';
} else {
return svg_icon_use($name, $class);
}
}
add_shortcode('social_icon', 'single_social_icon_function');
?>

68
footer.php Normal file
View file

@ -0,0 +1,68 @@
<?php
/**
* The template for displaying the footer.
*
* Contains the closing of the #content div and all content after.
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package WPRDNYC
*/
namespace WP_RDNYC;
?>
<?php
// FIRST: if this is frontpage, we just do the sticky bottom right copyright footer
if ($args && $args['frontpage']) {
?>
<footer class="tek-fixed-footer">
<div class="px-2 px-sm-3 text-gray-400">
&copy; <?php echo date("Y") ?> Recovery Dharma NYC
</div>
</footer>
<?php } else {
// Not frontpage? Then show regular footer
?>
<footer class="d-flex flex-column align-items-center mt-2 px-3 py-3">
<?php
// widget content for blog content footers:
if (!is_page()) :
?>
<div id="footer-widgets" class="col-12 col-sm-9 col-md-11 col-lg-10 col-xl-9 col-xxl-8 d-flex flex-column align-items-center">
<div class="px-3 pt-3 pb-1">
<?php echo get_search_form(); ?>
</div>
<div class="d-flex flex-wrap flex-column flex-md-row justify-content-start justify-content-md-center align-items-start">
<?php
if ( is_active_sidebar( 'footer-widgets' ) ) :
dynamic_sidebar( 'footer-widgets' );
endif;
?>
</div>
</div>
<?php
endif;
// Regular footer content for all but front page:
?>
<span class="text-gray-400 mt-3">&copy; <?php echo date("Y") ?> Recovery Dharma NYC</span>
</footer>
<?php } ?>
<?php wp_footer(); ?>
</body>
</html>

36
front-page.php Normal file
View file

@ -0,0 +1,36 @@
<?php
/**
* The 73k theme static front page style
*
* @author Recovery Dharma NYC
* @since 1.0.0
*/
namespace WP_RDNYC;
get_header(); ?>
<main class="container d-flex justify-content-center">
<div class="d-flex flex-column-reverse flex-lg-row align-items-lg-end mt-sm-3 mt-md-4 pt-md-4 mt-lg-5 pt-lg-5 pb-5" id="tek-front-page">
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post(); ?>
<div class="col-auto mt-3 mt-lg-0">
<?php echo get_the_post_thumbnail( get_the_ID(), 'large' ); ?>
</div>
<!-- the_content(); -->
<div class="col-auto justify-content-start ms-lg-3">
<?php the_content(); ?>
</div>
<?php }
}
?>
</div>
</main>
<?php
get_footer('', array('frontpage'=>true));

32
functions.php Normal file
View file

@ -0,0 +1,32 @@
<?php
/**
* Kickoff theme setup and build
*/
namespace WP_RDNYC;
define( 'WP_RDNYC_VERSION', wp_get_theme()->version );
define( 'WP_RDNYC_DIR', __DIR__ );
define( 'WP_RDNYC_URL', get_template_directory_uri() );
/**
* Social icons definition & functions
*/
require_once( WP_RDNYC_DIR . '/socials.php' );
/**
* Custom functions
*/
require_once( WP_RDNYC_DIR . '/custom-functions.php' );
/**
* Custom shortcodes for use in content
*/
require_once( WP_RDNYC_DIR . '/custom-shortcodes.php');
/**
* Autoloader for browersync
*/
require_once( WP_RDNYC_DIR . '/vendor/autoload.php' );
\A7\autoload( __DIR__ . '/src' );

96
header.php Normal file
View file

@ -0,0 +1,96 @@
<?php
/**
* The header for our theme.
*
* This is the template that displays all of the <head> section and everything up until <div id="content">
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package WPRDNYC
*/
namespace WP_RDNYC;
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="description" content="Recovery Dharma NYC: a peer-led movement using Buddhist practices and principles to overcome addiction through meditation, personal inquiry, and community">
<link rel="preload" href="<?php echo get_stylesheet_directory_uri() . '/dist/fonts/overpass-latin-400-normal.woff2'; ?>" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="<?php echo get_stylesheet_directory_uri() . '/dist/fonts/permanent-marker-latin-400-normal.woff2'; ?>" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="apple-touch-icon" sizes="180x180" href="<?php echo get_stylesheet_directory_uri() . '/dist/images/apple-touch-icon.png'; ?>">
<link rel="icon" type="image/png" sizes="32x32" href="<?php echo get_stylesheet_directory_uri() . '/dist/images/favicon-32x32.png'; ?>">
<link rel="icon" type="image/png" sizes="16x16" href="<?php echo get_stylesheet_directory_uri() . '/dist/images/favicon-16x16.png'; ?>">
<link rel="manifest" href="<?php echo get_stylesheet_directory_uri() . '/dist/images/site.webmanifest'; ?>">
<meta name="apple-mobile-web-app-title" content="73k">
<meta name="application-name" content="73k">
<meta name="msapplication-TileColor" content="#2b5797">
<meta name="theme-color" content="#ffffff">
<link rel="icon" href="/favicon.ico">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?> itemscope itemtype="https://schema.org/WebPage">
<nav class="navbar navbar-expand-lg navbar-dark px-1 px-sm-2 px-lg-3 px-xl-4 px-xxl-5 pt-5 pb-3 ">
<div class="container-fluid">
<h1 class="my-0 py-0 lh-base">
<?php
printf( '<a class="navbar-brand" href="%1$s" rel="home">',
esc_url( home_url( '/' ) )
);
// printf( '<span class="font-handbrush">%1$s</span>',
// esc_html( get_bloginfo( 'name' ) )
// );
echo svg_logo_use("rdnyc-logo", "", "Recovery Dharma New York City");
echo "</a>";
?>
</h1>
<button class="hamburger hamburger--vortex collapsed navbar-toggler" id="navbarSupportedContentToggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="hamburger-box d-flex">
<span class="hamburger-inner"></span>
</span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<?php
if ( is_active_sidebar( 'navbar-socialicon-widget' ) ) :
dynamic_sidebar( 'navbar-socialicon-widget' );
endif;
?>
<?php
if ( has_nav_menu( 'navbar-main-menu' ) ) {
wp_nav_menu([
'theme_location' => 'navbar-main-menu',
'depth' => 1,
'menu' => 'navbar-main-menu',
'container' => '',
'container_class' => '',
'menu_class' => 'navbar-nav',
'menu_item_class' => 'nav-item',
'link_class' => 'nav-link font-monospace fs-6'
// 'link_before' => '<span>',
// 'link_after' => '</span>'
]);
}
?>
</div>
</div>
</nav>

39
index.php Normal file
View file

@ -0,0 +1,39 @@
<?php
/**
* The default archive page template.
*
* @author Recovery Dharma NYC
* @since 1.0.0
*/
namespace WP_RDNYC;
get_header(); ?>
<main class="container d-flex justify-content-center">
<div class="col-12 col-md-10 col-lg-9 col-xl-8 col-xxl-7 pb-2 mb-4 mt-3">
<?php if (is_archive()) : ?>
<h1 class="text-gray-300 fst-italic mb-4 tek-border-bottom-gray-dashed"><?= get_the_archive_title(); ?></h1>
<?php
endif;
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
echo get_template_part( 'content-templates/content', 'article' );
endwhile;
?>
<nav class="d-flex justify-content-between" aria-label="Page navigation">
<div class="nav-previous alignleft"><?php next_posts_link( '&larr; Older' ); ?></div>
<div class="nav-next alignright"><?php previous_posts_link( 'Newer &rarr;' ); ?></div>
</nav>
<?php
endif;
?>
</div>
</main>
<?php
get_footer('', array('frontpage'=>false));

17206
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

58
package.json Normal file
View file

@ -0,0 +1,58 @@
{
"name": "wp-rdnyc-theme",
"version": "1.0.1",
"description": "WP RDNYC",
"main": "./assets/js/main.js",
"scripts": {
"start": "cross-env NODE_ENV=development SERVER=true webpack --watch",
"watch": "cross-env NODE_ENV=development webpack --watch",
"dev": "cross-env NODE_ENV=development webpack",
"prod": "cross-env NODE_ENV=production webpack",
"build": "concurrently \"npm run prod\" \"npm run dev\""
},
"dependencies": {
"@fontsource/overpass": "^4.x",
"@fontsource/permanent-marker": "^4.x",
"@mdi/svg": "^5.x",
"@popperjs/core": "^2.x",
"bootstrap": "^5.x",
"hamburgers": "^1.x",
"regenerator": "^0.14.7"
},
"devDependencies": {
"@babel/core": "^7.x",
"@babel/preset-env": "^7.x",
"autoprefixer": "^10.x",
"babel-loader": "^8.x",
"browser-sync": "^2.x",
"browser-sync-webpack-plugin": "^2.x",
"concurrently": "^6.x",
"copy-webpack-plugin": "^9.x",
"cross-env": "^7.x",
"css-loader": "^6.x",
"css-minimizer-webpack-plugin": "^3.x",
"glob-all": "^3.x",
"mini-css-extract-plugin": "^2.x",
"postcss": "^8.x",
"postcss-loader": "^6.x",
"postcss-scss": "^4.x",
"purgecss-webpack-plugin": "^4.x",
"sass": "^1.x",
"sass-loader": "^12.x",
"svg-sprite-loader": "^6.x",
"webpack": "^5.x",
"webpack-cli": "^4.x"
},
"browserslist": [
"defaults",
"not dead",
"last 4 versions",
"not ie <= 10"
],
"engines": {
"node": ">=14.0.0",
"npm": ">=7.0.1"
},
"author": "Recovery Dharma NYC",
"license": "ISC"
}

44
page-resume.php Normal file
View file

@ -0,0 +1,44 @@
<?php
/**
* The 73k theme
*
* @author Recovery Dharma NYC
* @since 1.0.0
*/
namespace WP_RDNYC;
get_header(); ?>
<main class="container d-flex justify-content-center">
<div class="col-12 col-md-9 col-lg-8 col-xl-7 col-xxl-6 border-bottom border-gray pb-4 mb-3" id="tek-page-resume">
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post(); ?>
<article itemscope itemtype="https://schema.org/CreativeWork">
<header>
<h2>
<?php
echo svg_icon_use('mdi-account', 'baseline');
echo ' ' . get_the_author_meta('display_name');
?>
</h2>
</header>
<div class="article">
<?php the_content(); ?>
</div>
</article>
<?php
}
} ?>
</div>
</main>
<?php
get_footer();

View file

@ -0,0 +1,4 @@
<?php
/**
* Nothing here, but where templates should go.
*/

54
page.php Normal file
View file

@ -0,0 +1,54 @@
<?php
/**
* The default single page template.
*
* @author Recovery Dharma NYC
* @since 1.0.0
*/
namespace WP_RDNYC;
get_header(); ?>
<main class="container d-flex justify-content-center">
<div class="col-12 col-md-10 col-lg-9 col-xl-8 col-xxl-7 border-bottom border-gray pb-4 mb-3">
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post(); ?>
<article itemscope itemtype="https://schema.org/CreativeWork">
<header>
<h2 class="fs-2 fw-600 mb-0">
<?php
if ( is_archive() || is_home() ) {
printf( '<a href="%s" rel="bookmark">%s</a>',
esc_url( get_the_permalink() ),
esc_html( get_the_title() )
);
} else {
echo get_the_title();
} ?>
</h2>
</header>
<div class="article">
<?php
if ( has_post_thumbnail() ) {
echo get_the_post_thumbnail( get_the_ID(), 'large', ['class' => 'rounded shadow-lg'] );
}
the_content(); ?>
</div>
</article>
<?php
}
} ?>
</div>
</main>
<?php
get_footer();

4
postcss.config.js Normal file
View file

@ -0,0 +1,4 @@
module.exports = {
parser: require("postcss-scss"),
plugins: [require("autoprefixer")],
};

45
search.php Normal file
View file

@ -0,0 +1,45 @@
<?php
/**
* The template for displaying search results pages.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result
*
* @package WPRDNYC
*/
get_header(); ?>
<main class="container d-flex justify-content-center">
<div class="col-12 col-md-10 col-lg-9 col-xl-8 col-xxl-7 pb-2 mb-4 mt-3">
<?php if (have_posts()) : ?>
<h1 class="text-gray-300 fst-italic mb-4 tek-border-bottom-gray-dashed">
Search results for: <?php echo esc_html( get_search_query() ); ?></h1>
<?php
while ( have_posts() ) :
the_post();
echo get_template_part( 'content-templates/content', 'article' );
endwhile;
?>
<nav class="d-flex justify-content-between" aria-label="Page navigation">
<div class="nav-previous alignleft"><?php next_posts_link( '&larr; Older' ); ?></div>
<div class="nav-next alignright"><?php previous_posts_link( 'Newer &rarr;' ); ?></div>
</nav>
<?php
else :
echo '<h1 class="text-gray-300 fst-italic mb-4 tek-border-bottom-gray-dashed">Search: nothing found</h1>';
printf( 'Sorry, no results for %s',
esc_html( get_search_query() )
);
endif;
?>
</div>
</main>
<?php
get_footer('', array('frontpage'=>false));

27
searchform.php Normal file
View file

@ -0,0 +1,27 @@
<?php
/**
* The searchform.php template.
*
* Used any time that get_search_form() is called.
*
* @link https://developer.wordpress.org/reference/functions/wp_unique_id/
* @link https://developer.wordpress.org/reference/functions/get_search_form/
*/
/*
* Generate a unique ID for each form and a string containing an aria-label
* if one was passed to get_search_form() in the args array.
*/
$seventythreek_unique_id = wp_unique_id( 'search-form-' );
$seventythreek_aria_label = ! empty( $args['aria_label'] ) ? 'aria-label="' . esc_attr( $args['aria_label'] ) . '"' : '';
?>
<form role="search" <?php echo $seventythreek_aria_label; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped above. ?> method="get" class="search-form flex-fill flex-sm-grow-0" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<div class="d-flex flex-nowrap">
<label id="<?php echo esc_attr( $seventythreek_unique_id ) . '-label'; ?>" for="<?php echo esc_attr( $seventythreek_unique_id ); ?>" aria-hidden class="form-label d-none"><?php _e( 'Search&hellip;', 'seventythreek' ); // phpcs:ignore: WordPress.Security.EscapeOutput.UnsafePrintingFunction -- core trusts translations ?></label>
<input type="search" id="<?php echo esc_attr( $seventythreek_unique_id ); ?>" class="form-control me-2 tek-search-input" value="<?php echo get_search_query(); ?>" name="s" aria-labelledby="<?php echo esc_attr( $seventythreek_unique_id ) . '-label'; ?>" placeholder="Search blog&hellip;" />
<button type="submit" class="btn btn-outline-light" title="Search">
<?php echo svg_icon_use('mdi-magnify', 'baseline'); ?>
</button>
</div>
</form>

94
socials.php Normal file
View file

@ -0,0 +1,94 @@
<?php
/**
* Functions to help with social icons
*/
// definition of social icons:
$social_icons = array(
array(
'icon' => "mdi-typewriter",
'url' => '/blog',
'prof' => false,
'target' => "_self"
),
array('icon' => "mdi-rss", 'url' => '/feed', 'prof' => false, 'target' => "_blank"),
array(
'icon' => "mdi-linkedin",
'url' => "https://www.linkedin.com/in/adampiontek/",
'prof' => true,
'target' => "_blank"
),
array('icon' => "mdi-github", 'url' => "https://github.com/apiontek", 'prof' => true, 'target' => "_blank"),
array(
'icon' => "mdi-key-variant",
'url' => '/DF185CEE29A3D443_public_key.asc',
'prof' => true,
'target' => "_blank"
),
array(
'icon' => "mdi-goodreads",
'url' => "https://www.goodreads.com/user/show/2450014-adam-piontek",
'prof' => false,
'target' => "_blank"
),
array(
'icon' => "mdi-twitter",
'url' => "https://twitter.com/adampiontek",
'prof' => false,
'target' => "_blank"
),
array('icon' => "mdi-facebook", 'url' => "https://facebook.com/damek", 'prof' => false, 'target' => "_blank"),
array(
'icon' => "mdi-instagram",
'url' => "https://www.instagram.com/adampiontek/",
'prof' => false,
'target' => "_blank"
),
array(
'icon' => "mdi-steam",
'url' => "https://steamcommunity.com/id/apiontek/",
'prof' => false,
'target' => "_blank"
),
array(
'icon' => "mdi-discord",
'url' => "https://discordapp.com/users/328583977629646848",
'prof' => false,
'target' => "_blank"
)
);
function social_icon_is_prof($icon) {
return $icon['prof'];
}
function get_social_icons() {
global $social_icons;
return $social_icons;
}
function get_social_icons_prof() {
global $social_icons;
return array_values(array_filter($social_icons, 'social_icon_is_prof'));
}
function social_icons_str($icons_arr) {
$out_str = '<div id="social-icons">';
foreach ($icons_arr as $i=>$social) {
$pad = $i == 0 ? 'pe-1' : ($i == (count($icons_arr) - 1) ? 'ps-1' : 'px-1');
$out_str .= '<a href="' . $social['url'] . '" rel="noreferrer" target="' . $social['target'];
$out_str .= '" class="fs-3 link-light text-decoration-none ' . $pad . '">';
$out_str .= svg_icon_use($social['icon'], "baseline") . "</a>";
}
return $out_str . '</div>';
}
function get_social_icons_str() {
return social_icons_str(get_social_icons());
}
function get_social_icons_prof_str() {
return social_icons_str(get_social_icons_prof());
}
?>

96
src/classes.php Normal file
View file

@ -0,0 +1,96 @@
<?php
/**
* This file adds functions and actions for classes.
*
* @author Recovery Dharma NYC
* @since 1.0.0
*/
namespace WP_RDNYC;
add_filter( 'body_class', function( $classes ) {
if ( is_singular( ['post', 'page'] ) ) {
$classes[] = 'singular';
}
if ( is_front_page() ) {
$classes[] = 'front-page';
}
return $classes;
});
/**
* Filter to add CSS class to navbar menu <li> items
*/
add_filter( 'nav_menu_css_class' , function( $classes, $item, $args, $depth ) {
if ( 'navbar-main-menu' === $args->theme_location ) {
if (property_exists($args, 'menu_item_class')) {
array_push($classes, $args->menu_item_class);
}
}
return $classes;
}, 3, 4 );
/**
* Filter to add CSS class to navbar menu item <a> links
*/
add_filter( 'nav_menu_link_attributes' , function( $atts, $item, $args ) {
if ( 'navbar-main-menu' === $args->theme_location ) {
$atts['class'] = (empty($atts['class'])) ? '' : $atts['class'];
if ( in_array('current_page_item', $item->classes) ) {
$atts['class'] .= ' active';
}
if (property_exists($args, 'link_class')) {
$atts['class'] .= ' ' . $args->link_class;
}
}
return $atts;
}, 2, 3 );
/**
* Filter to add icons to navbar menu items
*/
add_filter( 'wp_nav_menu_objects', function($items, $args) {
$svgicon_prefix = 'icon-';
foreach ( $items as $k => $object ) {
foreach ($object->classes as $c) {
if (substr( $c, 0, strlen( $svgicon_prefix ) ) === $svgicon_prefix) {
$icon_slug = str_replace($svgicon_prefix, '', $c);
$object->title = svg_icon_use($icon_slug, 'baseline') . "\\" . $object->title;
}
}
}
return $items;
}, 1, 2 );
/**
* Filter to remove syntax-highlighting-code-block plugin styles from frontend
*/
add_filter('syntax_highlighting_code_block_styling', '__return_false');
/**
* Set document title (in html head) to be reversed with '\' separator
*/
add_filter( 'document_title_separator', function ( $separator ) {
return '\\';
} );
add_filter('document_title_parts', function ($title) {
return (is_home() || is_front_page()) ? $title : array_reverse($title);
});
/**
* Exclude pages from WordPress Search
*/
if (!is_admin()) {
add_filter('pre_get_posts',function($query) {
if ($query->is_search) {
$query->set('post_type', 'post');
}
return $query;
});
}

30
src/enqueue.php Normal file
View file

@ -0,0 +1,30 @@
<?php
namespace WP_RDNYC;
/**
* Enqueue scripts and styles
*/
add_action( 'wp_enqueue_scripts', function() {
$min_ext = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
// JS
wp_enqueue_script(
'wp_rdnyc_js',
WP_RDNYC_URL . "/dist/main{$min_ext}.js",
[],
WP_RDNYC_VERSION,
true
);
// CSS
wp_enqueue_style(
'wp_rdnyc_css',
WP_RDNYC_URL . "/dist/main{$min_ext}.css",
[],
WP_RDNYC_VERSION,
''
);
} );

37
src/setup.php Normal file
View file

@ -0,0 +1,37 @@
<?php
namespace WP_RDNYC;
/**
* Set up theme defaults and registers support for various WordPress features.
*
* @author Recovery Dharma NYC
* @since 1.0.0
*/
add_action( 'after_setup_theme', function () {
// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );
// Let WordPress manage the document title.
add_theme_support( 'title-tag' );
// Enable support for Post Thumbnails on posts and pages.
add_theme_support( 'post-thumbnails' );
// This theme uses wp_nav_menu() in one location.
register_nav_menus( [
'navbar-main-menu' => __( 'Navbar Main Menu', 'wp-rdnyc' ),
// 'footer' => __( 'Footer Menu', 'wp-rdnyc' ),
] );
// Switch default core markup for search form, comment form, and comments to output valid HTML5.
add_theme_support( 'html5', [
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
] );
} );

26
src/sidebars.php Normal file
View file

@ -0,0 +1,26 @@
<?php
namespace WP_RDNYC;
/**
* Register widget area.
*/
add_action( 'widgets_init', function () {
register_sidebar( [
'name' => esc_html( 'Navbar Social Icons' ),
'id' => 'navbar-socialicon-widget',
'description' => 'Navbar mini widget area for social icons',
'before_widget' => '<section id="%1$s" class="%2$s widget">',
'after_widget' => '</section>',
] );
register_sidebar( [
'name' => esc_html( 'Footer' ),
'id' => 'footer-widgets',
'description' => 'Blog page footer area for widgets',
'before_widget' => '<section id="%1$s" class="%2$s widget">',
'after_widget' => '</section>',
] );
} );

13
style.css Normal file
View file

@ -0,0 +1,13 @@
/**
* Theme Name: WP RDNYC
* Theme URI: https://github.com/apiontek/wp-rdnyc
* Author: Recovery Dharma NYC
* Author URI: https://73k.us
* Version: 1.0.0
* License: GNU General Public License v3 or later
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
* Text Domain: wp-rdnyc
*
* Based On Theme: WP 73k
* Based On Theme URI: https://github.com/apiontek/wp-73k
*/

195
webpack.config.js Normal file
View file

@ -0,0 +1,195 @@
const path = require('path');
const glob = require("glob-all");
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
const CopyWebpackPlugin = require('copy-webpack-plugin');
const SpriteLoaderPlugin = require("svg-sprite-loader/plugin");
const BrowserSyncPlugin = require('browser-sync-webpack-plugin');
const PurgecssPlugin = require("purgecss-webpack-plugin");
const isProduction = 'production' === process.env.NODE_ENV;
// Set the build prefix.
let prefix = isProduction ? '.min' : '';
const config = {
entry: './assets/js/main.js',
output: {
filename: `[name]${prefix}.js`,
path: path.resolve(__dirname, 'dist')
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
options: {
presets: [
[
"@babel/preset-env"
]
]
}
},
{
test: /\.[s]?css$/,
use: [
MiniCssExtractPlugin.loader,
"css-loader",
"sass-loader",
"postcss-loader",
],
},
{
test: /\.(woff(2)?|ttf|eot)(\?v=\d+\.\d+\.\d+)?$/,
type: 'asset/resource',
generator: {
filename: 'fonts/[name][ext]'
},
},
{
test: /\.svg$/,
loader: "svg-sprite-loader",
options: {
extract: true,
spriteFilename: "icon-sprites.svg",
publicPath: "./images/",
symbolId: (filePath) => {
if (filePath.includes("bootstrap-icons")) {
return `bi-${path.basename(filePath).slice(0, -4)}`;
} else if (filePath.includes("@mdi")) {
return `mdi-${path.basename(filePath).slice(0, -4)}`;
} else if (filePath.includes("heroicons")) {
if (filePath.includes("outline")) {
return `hio-${path.basename(filePath).slice(0, -4)}`;
} else {
return `his-${path.basename(filePath).slice(0, -4)}`;
}
} else {
return `${path.basename(filePath).slice(0, -4)}`;
}
},
},
},
]
},
optimization: {
minimizer: ["...", new CssMinimizerPlugin()],
},
mode: process.env.NODE_ENV,
resolve: {
alias: {
'@' : path.resolve('assets'),
'@images': path.resolve('../images')
}
},
plugins: [
new MiniCssExtractPlugin({ filename: `[name]${prefix}.css` }),
new SpriteLoaderPlugin({ plainSprite: true }),
new CopyWebpackPlugin({
patterns: [{
from: './assets/images/',
to: 'images',
globOptions: {
ignore: [
'**/.DS_Store'
]
}
}]
}),
].concat(
isProduction
? [
new PurgecssPlugin({
paths: glob.sync([
'./*.php',
'./src/**/*.php',
'./page-templates/*.php',
'./content-templates/*.php',
]),
safelist: {
greedy: getCSSWhitelistPatterns(),
},
}),
]
: []
)
}
// Fire up a local server if requested
if (process.env.SERVER) {
config.plugins.push(
new BrowserSyncPlugin(
{
proxy: process.env.BSYNC_PROXY || 'localhost',
files: [
'**/*.php',
'**/*.scss'
],
port: process.env.BSYNC_PORT || 8080,
host: process.env.BSYNC_HOST || '127.0.0.1',
listen: process.env.BSYNC_LISTEN || '0.0.0.0',
notify: false,
open: false,
ui: { port: process.env.BSYNC_UI_PORT || 8081 }
}
)
)
}
/**
* List of RegExp patterns for PurgeCSS
* @returns {RegExp[]}
*/
function getCSSWhitelistPatterns() {
return [
/^home(-.*)?$/,
/^blog(-.*)?$/,
/^archive(-.*)?$/,
/^date(-.*)?$/,
/^error404(-.*)?$/,
/^admin-bar(-.*)?$/,
/^search(-.*)?$/,
/^nav(-.*)?$/,
/^wp(-.*)?$/,
/^screen(-.*)?$/,
/^navigation(-.*)?$/,
/^(.*)-template(-.*)?$/,
/^(.*)?-?single(-.*)?$/,
/^postid-(.*)?$/,
/^post-(.*)?$/,
/^attachmentid-(.*)?$/,
/^attachment(-.*)?$/,
/^page(-.*)?$/,
/^(post-type-)?archive(-.*)?$/,
/^author(-.*)?$/,
/^category(-.*)?$/,
/^tag(-.*)?$/,
/^menu(-.*)?$/,
/^tags(-.*)?$/,
/^tax-(.*)?$/,
/^term-(.*)?$/,
/^date-(.*)?$/,
/^(.*)?-?paged(-.*)?$/,
/^depth(-.*)?$/,
/^children(-.*)?$/,
/^hljs(-.*)?$/,
/^tek(-.*)?$/,
/^html$/,
/^body$/,
/^blockquote$/,
/^input$/,
/^svg$/,
/^img$/,
/^ul$/,
/^li$/,
/^p$/,
/^a$/,
/^h.$/,
/^pre$/,
/^code$/,
];
}
module.exports = config