【JavaScript】利用window.onload來製作loding的轉場效果

window.onload = function () { $('#loading').delay(1000).fadeOut(); //毫秒 }; ` ...

【Drupal8】如何在twig判斷使用者

Drupal8裡面有提供user.getroles的參數可以供我們來取得當前使用者的角色 {% set roles = user.getroles() %} ` ...

【F2E】HTML5的Video使用筆記

Your browser does not support the video tag. 想要在網站上播放影片的話需要用到video這個HTML Tag 如果影片需要自動播放的話就必須在video的標籤 ...

【Drupal 8】Autosubmit Exposed-form

// Autosubmit 'view-class-here' views exposed form. $("view-class-here").find("form.views-exposed-form").find("select").bind("change", function () { $(this).closest("form").trigger( ...

【Drupal 8】依據使用者的不同在body上面增加Class

有些時候會需要依照使用者的不同來製作不同的樣式 像是買家與賣家使用的文字hover顏色、網站管理員與一般使用者要看到不同的特效,等諸如此類的東西 像這種情形我們就能使用preprocess來做判斷! function YOUTHEMENAMEpreprocesshtml(&$variables) { // The getRoles() method will re ...