diff --git a/composer.json b/composer.json index 0ef8683e64bdd438726313734617287b9a66851f..41d36651ef9a2b1fcd167b0482440ea0f02b600c 100644 --- a/composer.json +++ b/composer.json @@ -110,7 +110,6 @@ "drupal/devel": "1.2", "drupal/bootstrap": "3.12", "drupal/adminimal_theme": "1.3", - "drupal/material_admin": "1.0-alpha6", "drupal/blazy": "1.0-rc2", "drupal/slick": "1.0", "drupal/slick_views": "1.0-rc2", @@ -138,8 +137,6 @@ "drupal/paragraphs_previewer": "1.2", "drupal/paragraphs_features": "1.2", "drupal/paragraphs_asymmetric_translation_widgets": "1.0-alpha2", - "drupal/material_admin_support": "1.x-dev#96ce192c31643faf69d77aca3c68578f778be3bc", - "drupal/type_style": "1.x-dev#486a8ec7c1c7dcd93790ee281c78cfa3dba90d78", "drupal/color_field": "2.0-rc3", "drupal/entity_reference_revisions": "1.5", "drupal/viewsreference": "2.0-alpha4", @@ -175,9 +172,7 @@ "drupal/varbase_blog" : "6.x-dev", "drupal/varbase_styleguide": "6.x-dev", "drupal/vartheme": "6.x-dev", - "drupal/vartheme_material": "6.x-dev", "drupal/vartheme_admin": "6.x-dev", - "drupal/vartheme_material_admin": "6.x-dev", "mkalkbrenner/php-htmldiff-advanced": "~0.0.8", "npm-asset/dropzone": "4.3.0", "npm-asset/blazy": "1.8.2", diff --git a/drupal-org.make b/drupal-org.make index 0e593ce00a163df3bde0e9349747ecd2bd4ee44e..4e5b5e30048b3dfb88a1a1db30ea9a4cb6faed13 100644 --- a/drupal-org.make +++ b/drupal-org.make @@ -362,16 +362,6 @@ projects[ckeditor_media_embed][patch][] = https://www.drupal.org/files/issues/em projects[styleguide][type] = module projects[styleguide][version] = 1.0-alpha3 -projects[material_admin_support][type] = module -projects[material_admin_support][download][url] = https://git.drupal.org/project/material_admin_support.git -projects[material_admin_support][download][revision] = 96ce192c31643faf69d77aca3c68578f778be3bc -projects[material_admin_support][download][branch] = 8.x-1.x - -projects[type_style][type] = module -projects[type_style][download][url] = https://git.drupal.org/project/type_style.git -projects[type_style][download][revision] = 486a8ec7c1c7dcd93790ee281c78cfa3dba90d78 -projects[type_style][download][branch] = 8.x-1.x - projects[pathauto][type] = module projects[pathauto][version] = 1.2 @@ -493,9 +483,6 @@ projects[adminimal_theme][version] = 1.3 ;; Issue #2696393: Checkboxes with .error class are not usable projects[adminimal_theme][patch][] = https://www.drupal.org/files/issues/adminimal-checkboxes_with_error-2696393-3.patch -projects[material_admin][type] = theme -projects[material_admin][version] = 1.0-alpha6 - ;;;;;;;;;;;;;;;;;;;;; ;; General Public contributed modules. ;;;;;;;;;;;;;;;;;;;;; @@ -564,15 +551,9 @@ projects[varbase_styleguide][version] = 6.x-dev projects[vartheme][type] = theme projects[vartheme][version] = 6.x-dev -projects[vartheme_material][type] = theme -projects[vartheme_material][version] = 6.x-dev - projects[vartheme_admin][type] = theme projects[vartheme_admin][version] = 6.x-dev -projects[vartheme_material_admin][type] = theme -projects[vartheme_material_admin][version] = 6.x-dev - ;;;;;;;;;;;;;;;;;;;;; ;; Libraries ;;;;;;;;;;;;;;;;;;;;; diff --git a/scripts/README.md b/scripts/README.md index 1994d503252ddb0f528fad0c371da9d39a2f53b0..be08bf359d1f9a92950b2338b0664a5be0207979 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -31,31 +31,3 @@ cd PROJECT_DIR_NAME/docroot/profiles/varbase/scripts bash ./create-new-vartheme.sh "THEME_NAME" ``` -------------------------------------------------------------------------------- - - -# Create new Vartheme Material sub theme for a project. - -By Bash: -``` -cd PROJECT_DIR_NAME/docroot/profiles/varbase/scripts -bash ./create-new-vartheme_material.sh "THEME_NAME" "ltr" -``` --------------------------------------------------------------------------------- - -## For right to left themes. - -By Bash: -``` -cd PROJECT_DIR_NAME/docroot/profiles/varbase/scripts -bash ./create-new-vartheme_material.sh "THEME_NAME" "rtl" -``` --------------------------------------------------------------------------------- - -## To create a new theme in the PROJECT_DIR_NAME/docroot/themes/custom - -By Bash: -``` -cd PROJECT_DIR_NAME/docroot/profiles/varbase/scripts -bash ./create-new-vartheme_material.sh "THEME_NAME" -``` --------------------------------------------------------------------------------- \ No newline at end of file diff --git a/scripts/create-new-vartheme_material.sh b/scripts/create-new-vartheme_material.sh deleted file mode 100644 index 7726f78e73ffaec09919d48031ff1a823b4a8d25..0000000000000000000000000000000000000000 --- a/scripts/create-new-vartheme_material.sh +++ /dev/null @@ -1,236 +0,0 @@ -#!//bin/bash -################################################################################ -## Create new vartheme Material subtheme. -################################################################################ -## -## Quick tip on how to use this script command file. -## -## Create new Vartheme Material sub theme for a project. -## By Bash: -## ----------------------------------------------------------------------------- -## cd PROJECT_DIR_NAME/docroot/profiles/varbase/scripts -## bash ./create-new-vartheme_material.sh "THEME_NAME" "ltr" -##------------------------------------------------------------------------------ -## -## For right to left themes. -## By Bash: -## ----------------------------------------------------------------------------- -## cd PROJECT_DIR_NAME/docroot/profiles/varbase/scripts -## bash ./create-new-vartheme_material.sh "THEME_NAME" "rtl" -## ----------------------------------------------------------------------------- -## -## To create a new theme in the PROJECT_DIR_NAME/docroot/themes/custom -## By Bash: -## ----------------------------------------------------------------------------- -## cd PROJECT_DIR_NAME/docroot/profiles/varbase/scripts -## bash ./create-new-vartheme_material.sh "THEME_NAME" -## ----------------------------------------------------------------------------- -## -################################################################################ - -# Basic yaml parser. -parse_yaml() { - local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') - sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \ - -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | - awk -F$fs '{ - indent = length($1)/2; - vname[indent] = $2; - for (i in vname) {if (i > indent) {delete vname[i]}} - if (length($3) > 0) { - vn=""; for (i=0; i<indent; i++) {vn=(vn)(vname[i])("_")} - printf("%s%s%s=\"%s\"\n", "",vn, $2, $3); - } - }' -} - -current_path=$(pwd); -drupal_root="$current_path"; - -if [[ "${drupal_root: -1}" == "/" ]]; then - drupal_root="${drupal_root::-1}"; -fi - -if [[ "${drupal_root: -24}" == "profiles/varbase/scripts" ]]; then - drupal_root="${drupal_root::-24}"; -fi - -if [[ "${drupal_root: -16}" == "profiles/varbase" ]]; then - drupal_root="${drupal_root::-16}"; -fi - -if [[ "${drupal_root: -8}" == "profiles" ]]; then - drupal_root="${drupal_root::-8}"; -fi - -if [[ "${drupal_root: -1}" == "/" ]]; then - drupal_root="${drupal_root::-1}"; -fi - -echo "Current path: $current_path"; -echo "Drupal root: $drupal_root"; - -# Read scripts.settings.yml file -eval $(parse_yaml $drupal_root/profiles/varbase/scripts/scripts.settings.yml); - -# Default theme name. -theme_name=$default_theme_name; - -# Grape the theme name argument. -if [ ! -z "$1" ]; then - arg1="$1"; - if [[ $arg1 =~ ^[A-Za-z][A-Za-z0-9_]*$ ]]; then - theme_name="$arg1"; - else - echo "---------------------------------------------------------------------------"; - echo " Theme name is not a valid theme name! "; - echo "---------------------------------------------------------------------------"; - exit 1; - fi -else - echo "---------------------------------------------------------------------------"; - echo " Please add the name of your theme! "; - echo "---------------------------------------------------------------------------"; - exit 1; -fi - -# Default direction. -direction=$default_direction; - -# Grape the direction argument. only if we have arg #2. -if [ ! -z "$2" ]; then - arg2="$2"; - if [[ "$arg2" == "rtl" || "$arg2" == "RTL" ]]; then - direction=$arg2; - elif [[ "$arg2" == "ltr" || "$arg2" == "LTR" ]]; then - direction=$arg2; - else - echo "---------------------------------------------------------------------------"; - echo " Direction of language is not valid! "; - echo " ltr - for (left to right) languages. "; - echo " rtl - for (right to left) languages. "; - echo "---------------------------------------------------------------------------"; - exit 1; - fi -fi - -# Default themes creation path. -theme_path=$drupal_root/$default_themes_creation_path; -mkdir -p ${theme_path}; -cp ${current_path}/README.md ${theme_path}/README.md - - -# Create the new Vartheme material subtheme if we do not have a folder with that name yet. -if [[ ! -d "$theme_path/$theme_name" ]]; then - - # 1. Copy the VARTHEME_MATERIAL_SUBTHEME folder to your custom theme location. - cp -r ${drupal_root}/themes/contrib/vartheme_material/VARTHEME_MATERIAL_SUBTHEME ${theme_path}/${theme_name}; - - # 2. Rename VARTHEME_MATERIAL_SUBTHEME.starterkit.yml your_subtheme_name.info.yml - mv ${theme_path}/${theme_name}/VARTHEME_MATERIAL_SUBTHEME.starterkit.yml ${theme_path}/${theme_name}/VARTHEME_MATERIAL_SUBTHEME.info.yml ; - mv ${theme_path}/${theme_name}/VARTHEME_MATERIAL_SUBTHEME.info.yml ${theme_path}/${theme_name}/${theme_name}.info.yml ; - - # 3. Rename VARTHEME_MATERIAL_SUBTHEME.libraries.yml your_subtheme_name.libraries.yml - mv ${theme_path}/${theme_name}/VARTHEME_MATERIAL_SUBTHEME.libraries.yml ${theme_path}/${theme_name}/${theme_name}.libraries.yml ; - - # 4. Rename VARTHEME_MATERIAL_SUBTHEME.theme your_subtheme_name.theme - mv ${theme_path}/${theme_name}/VARTHEME_MATERIAL_SUBTHEME.theme ${theme_path}/${theme_name}/${theme_name}.theme ; - - # 5. Rename VARTHEME_MATERIAL_SUBTHEME.settings.yml - mv ${theme_path}/${theme_name}/config/install/VARTHEME_MATERIAL_SUBTHEME.settings.yml ${theme_path}/${theme_name}/config/install/${theme_name}.settings.yml ; - - # 6. Rename VARTHEME_MATERIAL_SUBTHEME.schema.yml - mv ${theme_path}/${theme_name}/config/schema/VARTHEME_MATERIAL_SUBTHEME.schema.yml ${theme_path}/${theme_name}/config/schema/${theme_name}.schema.yml ; - - # 7.1 Rename VARTHEME_MATERIAL_SUBTHEME optional blocks. - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_MATERIAL_SUBTHEME_branding.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_branding.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_MATERIAL_SUBTHEME_breadcrumbs.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_breadcrumbs.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_MATERIAL_SUBTHEME_content.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_content.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_MATERIAL_SUBTHEME_copyright.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_copyright.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_MATERIAL_SUBTHEME_footer.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_footer.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_MATERIAL_SUBTHEME_help.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_help.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_MATERIAL_SUBTHEME_local_actions.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_local_actions.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_MATERIAL_SUBTHEME_local_tasks.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_local_tasks.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_MATERIAL_SUBTHEME_main_menu.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_main_menu.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_MATERIAL_SUBTHEME_messages.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_messages.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_MATERIAL_SUBTHEME_page_title.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_page_title.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_MATERIAL_SUBTHEME_socialauthlogin.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_socialauthlogin.yml - mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_MATERIAL_SUBTHEME_views_block__varbase_heroslider_media_varbase_heroslider_media.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_views_block__varbase_heroslider_media_varbase_heroslider_media.yml - - # 7.2 Rename the extentions of TWIG template files. - # html.html.twig is very important and needed file for RTL websites. - mv ${theme_path}/${theme_name}/templates/system/html.html.twig-VARTHEME_MATERIAL_SUBTHEME ${theme_path}/${theme_name}/templates/system/html.html.twig - - # Custom Better Login templates for edit, login, rest password, and register template files. - mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--edit.html.twig-VARTHEME_MATERIAL_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--edit.html.twig - mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--login.html.twig-VARTHEME_MATERIAL_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--login.html.twig - mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--password.html.twig-VARTHEME_MATERIAL_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--password.html.twig - mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--register.html.twig-VARTHEME_MATERIAL_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--register.html.twig - mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--reset.html.twig-VARTHEME_MATERIAL_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--reset.html.twig - mv ${theme_path}/${theme_name}/templates/betterlogin/block--social-auth.html.twig-VARTHEME_MATERIAL_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/block--social-auth.html.twig - - - # 8. Rename VARTHEME_MATERIAL_SUBTHEME.base.css files. - mv ${theme_path}/${theme_name}/css/base/VARTHEME_MATERIAL_SUBTHEME.base.css ${theme_path}/${theme_name}/css/base/${theme_name}.base.css - - # 9. Rename VARTHEME_MATERIAL_SUBTHEME-rtl.base.css files. - mv ${theme_path}/${theme_name}/css/rtl/base/VARTHEME_MATERIAL_SUBTHEME-rtl.base.css ${theme_path}/${theme_name}/css/rtl/base/${theme_name}-rtl.base.css - - # 10. Rename VARTHEME_MATERIAL_SUBTHEME.base.less file. - mv ${theme_path}/${theme_name}/less/base/VARTHEME_MATERIAL_SUBTHEME.base.less ${theme_path}/${theme_name}/less/base/${theme_name}.base.less - - # 11. Rename VARTHEME_MATERIAL_SUBTHEME-rtl.base.less file. - mv ${theme_path}/${theme_name}/less/rtl/base/VARTHEME_MATERIAL_SUBTHEME-rtl.base.less ${theme_path}/${theme_name}/less/rtl/base/${theme_name}-rtl.base.less - - # 12. Replace all VARTHEME_MATERIAL_SUBTHEME with the machine name of your theme. - grep -rl 'VARTHEME_MATERIAL_SUBTHEME' ${theme_path}/${theme_name} | xargs sed -i "s/VARTHEME_MATERIAL_SUBTHEME/${theme_name}/g" ; - - # 13. Replace the name: 'Vartheme Material Sub-Theme (LESS)' to the name of your theme. - grep -rl 'Vartheme Material Sub-Theme (LESS)' ${theme_path}/${theme_name} | xargs sed -i "s/Vartheme Material Sub-Theme (LESS)/${theme_name}/g" ; - - - # 14. If we want to use the RTL (right to left) bootstrap. - # 15.1 Delete the template folder bootstrap. - rm -rf ${theme_path}/${theme_name}/bootstrap ; - - # 15.2 Download the bootstrap library. change the version as you need. - wget -P ${theme_path}/${theme_name} https://github.com/twbs/bootstrap/archive/v${bootstrap_library_version}.tar.gz -vvv - - # 15.3 Extract the bootstrap library. - mkdir ${theme_path}/${theme_name}/bootstrap - tar -xzvf ${theme_path}/${theme_name}/v${bootstrap_library_version}.tar.gz --strip-components=1 -C ${theme_path}/${theme_name}/bootstrap -vvv - - # 15.4 Delete the archived bootstrap library. - rm ${theme_path}/${theme_name}/v${bootstrap_library_version}.tar.gz - - # 16. If we want to use the RTL (right to left) bootstrap. - if [[ $direction == "rtl" || $direction == "RTL" ]]; then - # 16.1. Delete the template folder bootstrap-rtl. - rm -rf ${theme_path}/${theme_name}/bootstrap-rtl ; - - # 16.2. Download the bootstrap library. change the version as you need. - wget -P ${theme_path}/${theme_name} https://github.com/morteza/bootstrap-rtl/archive/v${bootstrap_rtl_library_version}.tar.gz -vvv - - # 16.3. Extract the bootstrap library. - mkdir ${theme_path}/${theme_name}/bootstrap-rtl - tar -xzvf ${theme_path}/${theme_name}/v${bootstrap_rtl_library_version}.tar.gz --strip-components=1 -C ${theme_path}/${theme_name}/bootstrap-rtl -vvv - - # 16.4. Delete the archived bootstrap library. - rm ${theme_path}/${theme_name}/v${bootstrap_rtl_library_version}.tar.gz - fi - - generated_datetime="$(date '+%Y/%m/%d - %H:%M:%S')"; - generated_log=" Generated by -- composer create-new-vartheme_material ${theme_name} ${direction} ${theme_path} -- on ${generated_datetime}"; - echo "${generated_log}" >> ${theme_path}/${theme_name}/README.md; - - echo "---------------------------------------------------------------------------"; - echo " The new Vartheme Material subtheme were created at \"${theme_path}/${theme_name} :)\" "; - echo "---------------------------------------------------------------------------"; - exit 0; - -else - echo "---------------------------------------------------------------------------"; - echo " The folder \"${theme_path}/${theme_name}\" is already in the site!"; - echo "---------------------------------------------------------------------------"; - exit 1; -fi