Skip to content

Commit

Permalink
style updates; forms
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaiz committed Nov 27, 2019
1 parent a92e44f commit 729653b
Show file tree
Hide file tree
Showing 34 changed files with 209,427 additions and 1,258 deletions.
24 changes: 0 additions & 24 deletions acf-json/README.html

This file was deleted.

2 changes: 1 addition & 1 deletion acf-json/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ All you need is a folder in your theme called `acf-json`. ACF will create or upd

Note that it doesn't save the *post data* saved with your fields but all of your field groups, fields, and location settings.

Instead of forgetting to add this folder with each project, I'm now including it with Plate by default so it will be at the ready.
Instead of forgetting to add this folder with each project, I'm now including it with the theme by default so it will be at the ready.

If you don't use ACF or don't need this, just delete it. I mean, *GOSH*, it's just a folder.
2 changes: 1 addition & 1 deletion comments.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
The comments page for Plate
The comments page for Air
*/

// don't load it if you can't comment
Expand Down
51 changes: 5 additions & 46 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,20 @@


/************************************
* Air Takeoff (theme init function)
* Air Takeoff
*
* Now calling all seats/all rows.
*
* Wheels up!
*
************************************/

add_action( 'after_setup_theme', 'air_takeoff' );

function air_takeoff() {

// editor style
add_editor_style( get_stylesheet_directory_uri() . '/library/css/editor-style.css' );
add_editor_style( get_stylesheet_directory_uri() . '/library/css/editor/editor-style.css' );

// let's get language support going, if you need it
load_theme_textdomain( 'airtheme', get_template_directory() . '/library/translation' );
Expand Down Expand Up @@ -480,7 +482,7 @@ function in case you don't need them.

function air_block_editor_styles() {

wp_enqueue_style( 'air-block-editor-styles', get_template_directory_uri( '/library/css/editor/editor.css' ), false, '1.0', 'all' );
wp_enqueue_style( 'air-block-editor-styles', get_template_directory_uri( '/library/css/editor/block-editor.css' ), false, '1.0', 'all' );

}

Expand Down Expand Up @@ -1135,49 +1137,6 @@ function air_time_link() {
endif;



/**
* Dashboard Widget
*
* Add a widget to the dashboard in the WP Admin.
* Great to add instructions or info for clients.
*
* If you don't need/want this, just remove it or
* comment it out.
*
* Customize it...yeaaaahhh...but don't criticize it.
*
*
*/

function air_add_dashboard_widgets() {

// Call the built-in dashboard widget function with our callback
wp_add_dashboard_widget(
'air_dashboard_widget', // Widget slug. Also the HTML id for styling in admin.scss.
__( 'Welcome to air!', 'airtheme' ), // Title.
'air_dashboard_widget_init' // Display function (below)
);
}
add_action( 'wp_dashboard_setup', 'air_add_dashboard_widgets' );

// Create the function to output the contents of our Dashboard Widget.
function air_dashboard_widget_init() {

// helper vars for links and images and stuffs.
$url = get_admin_url();
$img = get_template_directory_uri() . '/library/images/logo.svg';

echo '<div class="dashboard-image"><img src=' . $img . ' width="96" height="96" /></div>';
echo '<h3>You\'ve arrived at the WordPress Dashboard aka the \'Site Admin\' or \'WordPress Admin\' or simply the \'Admin\'.</h3>';
echo '<p><strong>Thank you for using the <a href="https://github.com/joshuaiz/air" target="_blank">air</a> theme by <a href="https://studio.bio/" target="_blank">studio.bio</a>!</strong></p>';
echo '<p>You can add your own message(s) or HTML here. Edit the <code>air_dashboard_widget_init()</code> function in <code>functions.php</code> at line 1225. Styles are in <code>admin.scss</code>. Or if you don\'t want or need this, just delete the function. Have it your way.</p>';
echo '<p>This is a great place for site instructions, links to help or resources, and to add your contact info for clients.</p>';
echo '<p>Make sure to remind them about the <code>Screen Options</code> tab on the top right. Often clients do not know about that and that they can show or hide or rearrange these Dashboard Widgets or show/hide boxes on any edit screen.</p>';

}


// Live Reload for Grunt during development
// If your site is running locally it will load the livereload js file into the footer. This makes it possible for the browser to reload after a change has been made.
if ( in_array($_SERVER['REMOTE_ADDR'], array('127.0.0.1', '::1')) ) {
Expand Down
22 changes: 11 additions & 11 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* updated with non-blocking order
* see here: https://csswizardry.com/2018/11/css-and-network-performance/
*
* In short, place any js here that doesn't need to act on css before any css to
* In short, place any js here (like Google Analytics) that doesn't need to act on css before any css to
* speed up page loads.
*/
?>
Expand All @@ -22,23 +22,23 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<?php // favicons (for more: http://www.jonathantneal.com/blog/understand-the-favicon/) ?>
<link rel="icon" href="<?php echo get_theme_file_uri(); ?>/favicon.png">
<link rel="icon" href="<?php echo get_template_directory_uri(); ?>/favicon.png">
<!--[if IE]>
<link rel="shortcut icon" href="<?php echo get_theme_file_uri(); ?>/favicon.ico">
<link rel="shortcut icon" href="<?php echo get_template_directory_uri(); ?>/favicon.ico">
<![endif]-->

<!-- Apple Touch Icon -->
<link rel="apple-touch-icon" href="<?php echo get_theme_file_uri(); ?>/library/images/apple-touch-icon.png">
<link rel="apple-touch-icon" href="<?php echo get_template_directory_uri(); ?>/library/images/apple-touch-icon.png">

<!-- Safari Pinned Tab Icon -->
<link rel="mask-icon" href="<?php echo get_theme_file_uri(); ?>/library/images/icon.svg" color="#0088cc">
<link rel="mask-icon" href="<?php echo get_template_directory_uri(); ?>/library/images/icon.svg" color="#0088cc">

<?php // updated pingback. Thanks @HardeepAsrani https://github.com/HardeepAsrani ?>
<?php if ( is_singular() && pings_open( get_queried_object() ) ) : ?>
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php endif; ?>

<?php // put font scripts like Typekit/Adobe Fonts here ?>
<?php // put font scripts like Typekit/Adobe Fonts/Google Fonts here ?>
<?php // end fonts ?>

<?php // WordPress head functions ?>
Expand Down Expand Up @@ -103,11 +103,11 @@

<?php wp_nav_menu( array(

'container' => false, // remove nav container
'container_class' => 'menu', // class of container (should you choose to use it)
'menu' => __( 'The Main Menu', 'airtheme' ), // nav name
'menu_class' => 'main-menu flex items-center', // adding custom nav class
'theme_location' => 'main-nav', // where it's located in the theme
'container' => false, // remove nav container
'container_class' => 'menu', // class of container (should you choose to use it)
'menu' => __( 'The Main Menu', 'airtheme' ), // nav name
'menu_class' => 'main-menu flex items-center', // adding custom nav classes
'theme_location' => 'main-nav', // where it's located in the theme
)
); ?>

Expand Down
61 changes: 50 additions & 11 deletions library/admin.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*------------------------------------
* Theme: air by studio.bio
* Theme: Air by studio.bio
* File: Admin custom functions
* Author: Joshua Michaels
* URI: https://studio.bio/themes/air
Expand All @@ -17,13 +17,8 @@
Clean up the Dashboard, yo.
*********************/

/*
Eddie's old function wasn't working on some widgets so I've updated it
This cleans up a lot of the widgets on the Dashboard page. If you want
to have any of these back, comment them out.
*/


// Comment some of these out if you want those dashboard widgets to show.
// Still, a clean dashboard is cool. No one likes a mess.
add_action('wp_dashboard_setup', 'air_remove_dashboard_widgets');

function air_remove_dashboard_widgets() {
Expand All @@ -43,6 +38,46 @@ function air_remove_dashboard_widgets() {

}

/**
* Dashboard Widget
*
* Add your own widget to the dashboard in the WP Admin.
* Great to add instructions or info for clients.
*
* If you don't need/want this, just remove it or
* comment it out.
*
* Customize it...yeaaaahhh...but don't criticize it.
*
*/

function air_add_dashboard_widgets() {

// Call the built-in dashboard widget function with our callback
wp_add_dashboard_widget(
'air_dashboard_widget', // Widget slug. Also the HTML id for styling in admin.css.
__( 'Welcome to air!', 'airtheme' ), // Title.
'air_dashboard_widget_init' // Display function (below)
);
}
add_action( 'wp_dashboard_setup', 'air_add_dashboard_widgets' );

// Create the function to output the contents of our Dashboard Widget.
function air_dashboard_widget_init() {

// helper vars for links and images and stuffs.
$url = get_admin_url();
$img = get_template_directory_uri() . '/library/images/logo.svg';

echo '<div class="dashboard-image"><img src=' . $img . ' width="96" height="96" /></div>';
echo '<h3>You\'ve arrived at the WordPress Dashboard aka the \'Site Admin\' or \'WordPress Admin\' or simply the \'Admin\'.</h3>';
echo '<p><strong>Thank you for using the <a href="https://github.com/joshuaiz/air" target="_blank">air</a> theme by <a href="https://studio.bio/" target="_blank">studio.bio</a>!</strong></p>';
echo '<p>You can add your own message(s) or HTML here. Edit the <code>air_dashboard_widget_init()</code> function in <code>admin.php</code> at line 72. Styles are in <code>admin.css</code>. Or if you don\'t want or need this, just delete the function. Have it your way.</p>';
echo '<p>This is a great place for site instructions, links to help or resources, and to add your contact info for clients.</p>';
echo '<p>Make sure to remind them about the <code>Screen Options</code> tab on the top right. Often clients do not know about that and that they can show or hide or rearrange these Dashboard Widgets or show/hide boxes on any edit screen.</p>';

}

/*********************
CUSTOM LOGIN PAGE
Customize it, we don't criticize it.
Expand All @@ -57,10 +92,14 @@ function air_login_css() {
}

// changing the logo link from wordpress.org to your site
function air_login_url() { return home_url(); }
function air_login_url() {
return home_url();
}

// changing the alt text on the logo to show your site name
function air_login_title() { return get_option( 'blogname' ); }
function air_login_title() {
return get_option( 'blogname' );
}

// calling it only on the login page
add_action( 'login_enqueue_scripts', 'air_login_css', 10 );
Expand All @@ -81,7 +120,7 @@ function air_login_title() { return get_option( 'blogname' ); }
*/


// Load admin-specific styles. Edit in admin.css.
// Load admin-specific styles. Edit in /css/admin/admin.css.
function air_admin_css() {
wp_enqueue_style( 'air_admin_css', get_template_directory_uri() . '/library/css/admin/admin.css', false );
}
Expand Down
2 changes: 1 addition & 1 deletion library/air.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
*/

add_filter( 'plate_include', 'var_air_include', 1000 );
add_filter( 'air_include', 'var_air_include', 1000 );

function var_air_include( $t ){
$GLOBALS['current_theme_template'] = basename($t);
Expand Down
32 changes: 20 additions & 12 deletions library/css/admin/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,23 @@ customize the dashboard and WordPress admin area. All admin
functions are located in `admin.php`.
******************************************************************/
#plate_dashboard_widget {
width: 48vw;
padding-bottom: 1em; }
#plate_dashboard_widget * {
line-height: 1.4; }
#plate_dashboard_widget h2 {
font-size: 2em; }
#plate_dashboard_widget h3 {
font-size: 1.664em; }
#plate_dashboard_widget p {
font-size: 15px; }
/*# sourceMappingURL=admin.css.map */
#air_dashboard_widget {
width: 48vw;
padding-bottom: 1em;
}

#air_dashboard_widget * {
line-height: 1.4;
}

#air_dashboard_widget h2 {
font-size: 2em;
}

#air_dashboard_widget h3 {
font-size: 1.664em;
}

#air_dashboard_widget p {
font-size: 15px;
}
9 changes: 9 additions & 0 deletions library/css/editor/block-editor-styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@import 'tailwindcss/base';
@import 'tailwindcss/components';

/* purgecss start ignore */
@import "../partials/_base";
/* add your styles or custom imports here */
/* purgecss end ignore */

@import 'tailwindcss/utilities';
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
}

.edit-post-visual-editor h1 {
font-size: 2em;
font-size: 2.25rem;
margin: 0.67em 0
}


.edit-post-visual-editor hr {
box-sizing: content-box;
height: 0;
Expand Down
Loading

0 comments on commit 729653b

Please sign in to comment.