Adaptive Theme

AdaptiveTheme

Drupalテーマを開発するときに基盤となるデザインフレームワークです。ResponsiveなHTML5のDrupal 7 ベーステーマです。

Adaptivetheme

 

ダウンロード: drupal.org/project/adaptivetheme

開発元のドキュメント: adaptivethemes.com/documentation

 

 Tips: 

Q) 7.x-3.x へのバージョンアップや再インストールで古いバージョンが残ってしまう。

A) 古いテーマの情報をDBから削除してインストールします。まず、サイトをメンテナンスモードにして、テーマを他のテーマ、例えば、Bartikなどにでデフォルト変更します。その後、DBに接続し、以下の削除コマンドを実行します。テーマ名がCorollaの場合、その他のテーマ名に置き換えます。

delete FROM variable WHERE name = "theme_corolla_settings";

delete FROM variable WHERE name = "theme_corolla_files_directory";

その後、キャッシュクリアし、新しいAdaptivethme 7.x-3.x をインストールします。

詳細は adaptivethemes.com/documentation/how-to-uninstall-or-re-install-adaptivetheme-7x-3x-sub-themes

 

 Cusotm CSSの設定:

Atenaの場合

.pta-l #page-title {
display: none;
}

h6 {
    border-left:7px solid #1e90ff;  
    border-bottom:1px dashed #1e90ff;  
    padding:.6em .8em  
}  

h5 {
 border-left:7px solid #1e90ff;  
    border-bottom:1px solid #1e90ff;  
    padding:.6em .8em
}

 

サブテーマの作り方

adaptivethemeのディレクトリに入っている - at_core (the core base theme) - at_admin (AT Admin theme) - at_subtheme (the one we are interested in)

1. Copy and paste at_subtheme, it doesn't matter where you place the copied version as long as its in a theme directory. For example if you are using sites/all/themes you can place it there - so you end up with: sites/all/themes/footheme.

2. Rename the info file and edit the info file details. For example lets assume you want your theme to be called "footheme", the name of the info file will be "footheme.info". Once you have renamed the file open it up and change the "name" to footheme and change the description to suit your taste.

3. Edit the theme-settings.php and template.php files - here we will be replacing "adaptivetheme_subtheme" with your themes name, in this case "footheme" - this must match the name you gave to the info file. The easy way is to just use search and replace.

Drushコマンドの場合:

sites/all/theme ディレクトリにて

drush adaptivetheme 新しいテーマ名 新しいテーマ名

新しいテーマ名で空のサブテーマができます。

 

ワーニングの表示

PHP7.1 / 7.2 / 7.3 の場合、Drupal 7 用の adaptivetheme 7.x-3.4 で以下のようなワーニングが表示されます。

One or more CSS files were not found or does not exist: sites/all/themes/corolla/c. Did you delete any files or change a file name? You may need to save the theme settings or check all files names are correct in your theme. Please view the online documentation.

これは、以下のページのパッチを適用することでワーニングが出なくなりました。

PHP 7.1 no longer converts string to arrays the first time a value is assigned with square bracket notation

https://www.drupal.org/project/adaptivetheme/issues/2832900#comment-1181...

パッチファイル  https://www.drupal.org/files/issues/adaptivetheme-php_string_cast_array-...

 

 

 

オープンソースソフトウェア: 

CMS: