-
Notifications
You must be signed in to change notification settings - Fork 0
Factor1 Small Site Setup
Link to blueprint zip: https://github.com/factor1/developer-resources/tree/master/F1%20Small%20Site%20Blueprint
(f1-small-site-2.06.zip is the most current version)
Link to demo theme: https://github.com/factor1/f1-demo-theme
- Under your Mac's Finder menu, go to Go > Go to Folder
- Enter
~/Library/Application Support/Local
in the field - Put the .zip folder in the blueprints subfolder
The blueprint should now be an option when creating a new site in Local
This blueprint should include both the plugins and a theme named f1-demo-theme
-
Update the theme’s directory name to your project’s name (you will need to reselect the theme under Appearance > Menus in the Admin)
-
In Terminal, navigate into the demo theme directory
cd path/to/wp-content/themes/f1-your-theme-name
-
Update the following files:
-
.env
- Update the url with the development domain found in Local -
style.css
- update the information here -
package.json
- update the theme name here
-
-
Package Installation
- Run
yarn
to install theme packages - Run
yarn build
to compile theme assets
- Run
-
Create git repo and add to Github
-
git init
,git add .
,git commit -m “Initial commit of theme files”
- Create a new repository in Github and follow the instructions to commit an existing repo from the command line
-
- Update the site name under Settings > General
- Run any plugin/database updates if prompted
- Under “Site Options,” update the header and footer logos
- Update all menus under Appearance > Menus
- If ACF field groups are missing, there is a zipped
demo-theme-acf.json.zip
export within the theme that you can import under Custom Fields > Tools
Here is a brief list of files that will likely need changes for your theme
-
inc/enqueues.php
- include any missing assets (Font Awesome, Google Fonts, Typekit, etc) -
assets/scss
- make any needed changes to the following filessettings/_variables.scss
globals/_typography.scss
-
mixins/_sugar.scss
(a buttons mixin lives here) components/_nav.scss
components/_social-menu.scss
components/_buttons.scss
components/_menu-icon.scss
components/_pagination.scss
components/_forms.scss
-
inc/tweaks.php
- Add theme colors to the
custom_editor_colors
function - Add any special typography classes to the
custom_wysiwyg_options
function - Update the
custom_loginlogo
function
- Add theme colors to the
-
dist/editor-styles.css
- Add the CSS styles for the site typography here (use
assets/scss/globals/_typography.scss
as a reference)- ** Note that in version 2.0, this step is no longer required. See Version 2.0 New Features for details
- Add the CSS styles for the site typography here (use
-
assets/scss/parts/**
- Make any color/padding/misc style changes as needed
-
header.php
- Add a theme color to the meta theme color (line 12)
Not every site will need all of the available features included in this blueprint. To keep things as simple as possible for the client in question, delete features that aren't needed. Refer to the site design/tech notes to determine which features can be deleted.
For example, hero sections may not use background videos at all. If this is the case, delete the relevant ACF fields & code.
In addition to the latest versions of WP & our regular plugins (as of 3/2023), version 2 comes with several new features & changes to the existing ACF groups. (A new ACF zip has also been included in the demo theme.)
See How to Import a Blueprint above for directions on importing this blueprint.
Buttons are now controlled via 1 ACF group in the admin (the inactive, cloneable Buttons
group) and via 1 component file in our demo theme, under components/buttons.php
.
Within the button repeater group, you'll see a Button Preview
ACF message field. Our theme appends a preview window to this field that displays what a button will look like on the front end for our users.
This preview window will inherit the button styles you set on the front end (make sure to align these with the classes set in the Button Color
sub-field in the repeater).
Background images are now also a cloneable ACF group, and by default are used within the Hero & Banner sections.
There are options to select the thumbnail size (add options from your theme as needed) as well as percent-based horizontal and vertical alignment of the background image. There is also an option to include an overlay on the image.
There is now a cloneable Background Colors
ACF group, which is cloned into sections like the Centered Text Block and to which you can add in theme colors as needed.
In lieu of installing the ACF color swatches plugin, our theme now automatically appends color swatches to that list.
Our theme now includes 3 shortcodes by default: [name]
, [social_links]
, [social_share_links]
, and [typewriter_text]
. Details as to options for these and how they work can be found under the Shortcodes
tab in Site Options
.
Our theme now automatically pulls various styles into the admin, so there is no longer a need to manually create an editor-styles.css
file.
As of version 2.06, our demo theme uses SplideJS in place of Slick Slider. SplideJS doesn't not need jQuery so we save some processing power by this switch.
As of version 2.06, our theme defaults to using Font Awesome 6.
Feel free to open an issue if you find mistakes, enhancements, or would like to see some new documentation.