Drupal Planet

Subscribe to canal de noticias Drupal Planet
Drupal.org - aggregated feeds in category Planet Drupal
Actualizado: hace 12 horas 45 mins

OSTraining: How to Create a Search Box with a Sliding Effect in Drupal 8

Lun, 10/15/2018 - 04:36

One of OSTraining members asked how to create a search box with a sliding out effect. Their goal was to arrive at the search box similar to the one you can find at the top of Drupal's own website.

In this tutorial, you will learn how to create a search box that expands once you clicked on the icon. Also, while it stays expanded, it blur out your main menu.

OpenSense Labs: Efficacy of Kubernetes in Drupal Deployment

Dom, 10/14/2018 - 13:08
Efficacy of Kubernetes in Drupal Deployment Shankar Sun, 10/14/2018 - 20:38

First came the physical servers which were followed by the virtual machines and now the developer ecosystem is rapidly adopting container and serverless computing. One of the biggest challenges that physical servers pose is their management which virtualisation resolves by emulating the real system thereby streamlining the governance of different functions. Now, container and serverless computing are extrapolating the benefits to a whole new level for the developers. And this is where Kubernetes comes into play.


Google’s Cloud Next 2018 summit held in San Francisco emphasised upon the company’s active involvement in over thousands of open source projects including Kubernetes. By the time Kubernetes was introduced in Google Cloud, it had more than 20,000 contributors which made it one of the fastest moving projects in the open source history. Kubernetes can be a huge asset in the deployment of projects based on another open source framework - Drupal. But before we plunge into that, let’s traverse along the short timeline of Kubernetes’ formation.

Timeline of Kubernetes formation

Kubernetes was originally developed by a team at Google which has been open-sourced since its launch and is managed by a large community of contributors. RisingStack has compiled an interesting timeline which traces the history of Kubernetes with the birth of the Borg system. 

Around 2003-2004, Google introduced the Borg system, a large-scale internal cluster management system, which was followed by the introduction of Omega cluster management system in 2013.

In the mid-2014, Google introduced the open source version of Borg in the form of Kubernetes. In the mid-2015, Kubernetes v1.0 was officially released.

2016 was the year when Kubernetes went mainstream

2016 was the year when Kubernetes went mainstream with more advanced releases, case studies, conferences, and the support for Windows Server and OpenAPI.

In 2017, big enterprises started adopting and supporting Kubernetes with Microsoft, Oracle, Google, IBM, and Amazon coming up with more container orchestration methods using Kubernetes.

A Closer Look at Kubernetes


An open source system, Kubernetes is used for handling containerized application across numerous hosts offering basic mechanisms for deployment, maintenance, and scaling of applications. It is hosted by the Cloud Native Computing Foundation (CNCF). CNCF was formed through the partnership of Google and Linux Foundation. It aims to develop sustainable ecosystems CNCF helps in fostering a community of top-notch projects that orchestrate containers as part of a microservices architecture.

Kubernetes is a portable, extensible open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation - Kubernetes documentation

Kubernetes enables you to deploy containerised application swiftly and predictably and can scale containerised applications on the fly. It seamlessly rolls out new features to your containerised applications and optimises your hardware.

The significant features of Kubernetes include:

Deployment of containers and management of rollout control: With Kubernetes, you can describe your containers and define how many you want in a single deployment. It can govern the running of those containers (even across multiple hosts) and also manage changes like updating images, changing variables etc. to your containers.

  • Resource Bin packing: This lets you declare minimum and maximum computer resources (CPU and memory) for all the containers.
     
  • Service delivery: It has the provision of built-in service delivery for the automatic exposure of containers to the internet or other containers in the Kubernetes cluster.
     
  • Autoscaling: It automatically performs load balancing of traffic across matching containers.
     
  • Heterogenous clusters: It helps in developing a cluster with a mixture of virtual machines, on-premises servers, or bare metal in the company data centre.
     
  • Storage support: It has the provision for persistent storage support with support for Amazon Web Services EBS, Google Cloud Platform persistent disks, and many more. Vendors like Red Hat, Dell, NetApp and EMC offer persistent storage for Kubernetes.
     
  • High availability: It has very high availability such as multi-master and cluster federation enabling the linking of clusters together for load balancing.
Docker vs Kubernetes

Note that Kubernetes is not a replacement for Docker but it is for some of the top-of-the-line technologies that have emerged around Docker.
 
One of those technologies is Docker Swarm which is an orchestrator bundled with Docker. It is possible to leverage Swarm instead of Kubernetes but Docker Inc. has chosen to make Kubernetes a part of the Docker Community and Docker Enterprise editions moving forward.

Kubernetes is significantly more intricate than Docker Swarm

Kubernetes is not a drop-in replacement for Swarm. Kubernetes is significantly more intricate than Swarm and needs more work to deploy. But again, the work involved with the container orchestration using Kubernetes would provide a big payoff in the long run - a more governable, resilient application infrastructure. Docker Swarm is a good choice for the development work and smaller container clusters.

Deploying Drupal using Kubernetes

Bay Area Drupal Camp 2017 had a presentation that exhibited the deployment of Drupal leveraging Kubernetes. A digital agency built a Lagoon platform that builds cloud web hosting solutions for decoupled Drupal with Node.js features. It showed that for scaling Drupal to a plethora of annual page views, decoupled CMS architecture enables the deployment of Docker, Kubernetes and OpenStack solutions together in data centres.


Lagoon platform was created for optimising hosting for Decoupled Drupal sites on the public cloud using OpenStack. With Lagoon, Drupal admins can build containers for PHP with NGINX, run the MYSQL or MariaDB installation in another container with Node.js configured on a third set.

Containers for Redis, Varnish Cache and Solr complete the install with the management of load balancing, page caching and auto-scaling web server nodes to match traffic rates. Lagoon relies upon Red Hat Enterprise Linux and the OpenShift platform in addition to the Original Community Kubernetes Distribution (OKD). System admins would have to use Jenkins, Ansible, Vagrant, TravisCI, Puppet, Docker, and CircleCI for configuration.

Programmers and developers would have to be adept with GraphQL, React, Apollo, Next.js and Prometheus. Lagoon leverages Alpine Linux for container installs from Docker images. Content Delivery Network (CDN) integration completes a different production route for anonymous traffic by geolocation thereby optimising datacentre hardware.

Workflow process with Lagoon involves reading the docker-compose.yml and creating disk images which set up the OS for web servers in containers. Then, disk images are pushed to an OS registry like GitHub or BitBicket. Using Ansible, the disk image is pushed to a git repository and commits are made to Node.js for testing. Lagoon deploys disk images from the git repository for Drupal web hosting requirement s in Kubernetes clusters.

Minishift can be leveraged to run OpenShift server administration on the desktop. Lagoon comprises of server-side rendering for Node.js and React on NGINX, running Drupal on NGINX in isolated containers individually. Then, Varnish Cache is used to handle HTML file transfers to users and CDNs.

Market trends Source: 451 Research

A study conducted by technology research and advisory company 451 Research investigated containers adoptions by enterprises across the wide array of industries. It revealed that enterprises of all sizes are rapidly using containers and man are even deploying and governing their containerised workloads with orchestration software. 52% of the organisations gestured that they are running container management and orchestration software in production today and 71% of the respondents were using Kubernetes.
 
Another survey by Portworx Annual Container Adoption in 2017 included insights from 491 IT pros across a variety of industries and company sizes. It delineated that Kubernetes was the preferred option when it comes to container orchestration(shown in the graph below).

Source: Portworx

Moreover, a report on Transparency Market Research stated that “key drivers of the Kubernetes solutions market are the rapid growth of container orchestration, increase in investment by vendors, more focus on hybrid cloud and multi-cloud, an increase in adoption of Kubernetes by major players offering cloud computing”.

This report also stated that while North America accounts for the largest share of Kubernetes solutions market, Europe trails behind the second largest. Also, Amazon Web Services, Google Inc., Microsoft Corporation, Red Hat, Inc., Apprenda Inc., UnitedHealth Group, IBM Bluemix, Cisco Systems, Inc., Target, Oracle Corporation, Huawei Technologies Co., Ltd, CenturyLink, Inc. Kismatic, Inc., Heptio, Core OS, Datera, and NavOps are the major vendors.

Conclusion

Drupal as a great content store has grown exponentially due to the presence of its large and active community which is committed towards the perpetual improvement of Drupal to powering digital innovation. Kubernetes, also being an open source software, can of huge help in the Drupal deployment and has made rapid strides with colossal adoption rate among the big enterprises in recent times.

At Opensense Labs, we have been offering a suite of services to provide amazing digital experience to our partners.

Ping us at hello@opensenselabs.com to develop and deploy Drupal-based web applications leveraging the power of Kubernetes.

blog banner blog image kubernetes Drupal Kubernetes Drupal deployment Drupal and Kubernetes Blog Type Articles Is it a good read ? On

Dries Buytaert: A fresh look for dri.es

Sáb, 10/13/2018 - 17:07

In 1999, I decided to start dri.es (formally buytaert.net) as a place to blog, write, and deepen my thinking. While I ran other websites before dri.es, my blog is one of my longest running projects.

Working on my site helps me relax, so it's not unusual for me to spend a few hours now and then making tweaks. This could include updating my photo galleries, working on more POSSE features, fixing broken links, or upgrading to the latest version of Drupal.

The past month, a collection of smaller updates have resulted in a new visual design for my site. If you are reading this post through an RSS aggregator or through my mailing list, consider checking out the new design on dri.es.

Before (left) and after (right).

The new dri.es may not win design awards, but will hopefully make it easier to consume the content. My design goals were the following:

  • Improve the readability of the content
  • Improve the discoverability of the content
  • Optimize the performance of my site
  • Give me more creative freedom
Improve readability of the content

To improve the readability of the content, I implemented various usability best practices for spacing text and images.

I also adjusted the width of the main content area. For optimal readability, you should have between 45 and 75 characters on each line. No more, no less. The old design had about 95 characters on each line, while the new design is closer to 70.

Both the line width and the spacing changes should improve the readability.

Improve the discoverability of content

I also wanted to improve the discoverability of my content. I cover a lot of different topics on my blog — from Drupal to Open Source, startups, business, investing, travel, photography and the Open Web. To help visitors understand what my site is about, I created a new navigation. When the Archive-link is clicked, visitors will be presented the key topics I write about. It's a small change, but it should help new visitors figure out what my site is about.

Optimize the performance of my site

Less noticeable, is that the underlying HTML and CSS code is now entirely different. I'm still using Drupal, of course, but I decided to rewrite my Drupal theme from scratch.

The previous design had almost 52K of theme-specific CSS, while the new design has 16K of theme-specific CSS. That is more than three times smaller.

The new design also results in fewer HTTP requests as I replaced all stand-alone icons with inline SVGs. Serving this page now takes 16 HTTP requests compared to 33 HTTP requests with the previous design.

All this results in faster performance. This is especially important for people visiting my site from a mobile device, and even more important for people visiting my site from mobile devices in areas in the world with slow internet. A lighter theme with fewer HTTP requests makes my site more accessible. It is something I plan to work more on in the future.

Website bloat is a growing problem and impacts the user experience. I wanted to lead by example, and made my site simpler and faster to load.

The new design also uses Flexbox and CSS Grid Layout — both are more modern CSS standards. It is fully supported in all main browsers: Chrome, Firefox, Safari and Edge. It is, however, not fully supported on Internet Explorer, which accounts for less than 3% of all my visitors. Internet Explorer users should still be able to read all content though.

Give me more creative freedom

Last but not least, the new design provides me with a better foundation to build upon in subsequent updates. I wanted more flexibility for how to lay out images in my blog posts, highlight important snippets, and add a table of content on long posts. You can see all three in action in this post, assuming you're looking at this blog post on a larger screen.

Chromatic: The Cost of Custom

Vie, 10/12/2018 - 11:00

Custom code gives you exactly what you need, but it comes with a cost.

Agiledrop.com Blog: Top Drupal blog posts from September 2018

Vie, 10/12/2018 - 10:10

Each month, we revisit out top Drupal blog posts of the month, giving you the chance to check out some of our favourites. Let’s look at the top blog posts from September 2018.

READ MORE

Matt Glaman: Running Drupal's PHPUnit test suites on DDEV

Vie, 10/12/2018 - 06:00
Running Drupal's PHPUnit test suites on DDEV Friday 12, October 2018 mglaman

DDEV is a local development stack built on top of Docker. It gives you all of your environment needs without messy configured on your host machine, without needing to know Docker or configure your own containers. Which is great, and makes life easier. Instead of just using DDEV to develop your site or application locally, why not also run your tests within it?

Flocon de toile | Freelance Drupal: Dynamically override a configuration with Drupal 8

Jue, 10/11/2018 - 17:24

In some cases, it can be extremely interesting to be able to override a configuration dynamically. One of the first use cases immediately noticeable is in the case of a site factory with a set of shared and deployed features, and therefore identical configurations shared.

Lullabot: Update on the JavaScript Modernization Initiative

Jue, 10/11/2018 - 16:46
Mike and Matt interview members of the Drupal 8 JavaScript modernization initiative to find out what's going on, and the current status.

Acquia Developer Center Blog: Decoupled Drupal Authentication with OAuth 2.0

Jue, 10/11/2018 - 10:48

Perhaps the most critical component of any decoupled Drupal architecture is a robust authentication mechanism that protects data transmitted between a Drupal site and API consumers like JavaScript applications and native mobile applications. While Drupal core makes available HTTP Basic Authentication and cookie-based authentication, both easy to use, neither of these approaches is sufficiently secure when it comes to best practices.

Tags: acquia drupal planet

Ashday's Digital Ecosystem and Development Tips: How a Content Management System Can Help Streamline Your Business

Mié, 10/10/2018 - 18:00

 The reality is that running a business is such a diverse and complex endeavor that managing complex and rapidly evolving software solutions needed to execute the mission can be an overwhelming component. It already takes enough energy and expertise to be proficient in managing people, knowing your vertical, regulating cash flow, envisioning new products, evaluating old products, and on and on and on. The problem, however, is that if you don’t leverage complex and rapidly evolving software solutions to handle processes, you end up drowning in inefficiency and inconsistency. So therein lies a significant and difficult problem because you likely didn’t get into business to become an informal senior software architect. And that’s where leveraging something like a robust CMS comes into play. 

Let’s look at some of the ways leveraging a modern CMS, like Drupal, for example, can significantly streamline your business and free you to, well, run your business.

myDropWizard.com: Drupal 6 security update for Lightbox2 module

Mié, 10/10/2018 - 15:40

As you may know, Drupal 6 has reached End-of-Life (EOL) which means the Drupal Security Team is no longer doing Security Advisories or working on security patches for Drupal 6 core or contrib modules - but the Drupal 6 LTS vendors are and we're one of them!

Today, there is a Critical security release for the Lightbox2  module to fix a Cross Site Scripting (XSS) vulnerability.

The Lightbox2 module enables you to overlay images on the current page.

The module did not sanitize some inputs when used in combination with a custom View leading to potential XSS.

See the security advisory for Drupal 7 for more information.

Here you can download the Drupal 6 patch.

If you have a Drupal 6 site using the Lightbox2 module, we recommend you update immediately! We have already deployed the patch for all of our Drupal 6 Long-Term Support clients. :-)

If you'd like all your Drupal 6 modules to receive security updates and have the fixes deployed the same day they're released, please check out our D6LTS plans.

Note: if you use the myDropWizard module (totally free!), you'll be alerted to these and any future security updates, and will be able to use drush to install them (even though they won't necessarily have a release on Drupal.org).

OpenSense Labs: Most scalable CMS: Drupal 8

Mié, 10/10/2018 - 14:48
Most scalable CMS: Drupal 8 Shankar Wed, 10/10/2018 - 22:18

Everyone has their own preference when it comes to different genres of music ranging from alternative rock and post-rock to trap rap and drone metal. Website traffic touches sky-high when a horde of music lovers remain glued to their screens to witness their favourite artists being awarded in this annual event of Grammy awards. Being a scalable and high performing space, the website of Grammy has coped with huge spikes in traffic with ease.


Website scalability is such a crucial aspect which has a huge say in the performance of digital firms. Drupal 8 and its capabilities lend better web performance. Being highly scalable, Drupal 8 helps in building a web application that is unfazed by the colossal spike in the internet traffic and scales tremendously. Grammy, powered by Drupal, has extracted the scalability features of Drupal to a great extent. Let's find out how.

The Significance of Website Scalability 58% of application/site owners overestimate their capacity levels: State of Web Readiness Report by Load Impact


A report from Load Impact has some interesting statistics on web performance.

  • 68% of respondents have encountered performance or stability issues with their website where the main reason was pointed towards the lack of resources.
  •  
  • 39% of e-retailers claimed that they incurred a financial loss due to performance or stability problems. In comparison to this, just 24% of the non-e-retailers claimed that they incurred money loss.
  •  
  • 98% of e-retailers believed that sub-two-second response time was essential. But the load time for e-commerce sites that were analysed in this report surpassed the desirable response threshold by a huge margin. The average was 7.9 seconds which is more than that for non-e-commerce sites.

Typically, 90% of your website’s response time is from frontend resources but this laters as your load and traffic enhances.


Questions that you can raise while determining ways of scaling:

  • Is your website or application performing acceptably with a minimum number of users on the system?
  • Is the website or application responding running faster with additional concurrent users? And if so, how many?
  • Are there hardware bottlenecks in the present system?
  • Is the website or application able to handle the increasing number of users/data?
  • What is the maximum amount of load the system is able to handle?
Is Drupal Scalable?

Drupal is a highly scalable CMS. If you want your site to grow and be amongst the busiest of online spaces, then Drupal can scale with your needs. Even if you are already popular and offer stupendous digital experience to the customers, Drupal is scalable to cope with the gargantuan amount of traffic to your site content.

Large enterprises love Drupal with the digital presence of big names like Grammy, Weather.com, Pfizer, Time Inc., Tesla, Puma, Princess Cruises, and many more powered by Drupal. Whether it is the extreme traffic spikes on certain occasions or the constant web traffic, Drupal handles all of that with utmost ease.

Drupal accommodates content growth and supports the most content-rich sites and experiences. It scales to govern more traffic, content, and users. So whether if you have one or over a thousand content contributors, Drupal can efficaciously cope with a monumental amount of visitors, content, and Drupal users.

Optimising Drupal Performance and Scalability

A superfast website significantly contributes towards the improvement of user experience, usability and engagement. Drupal 8 is one of the most efficient CMS for enabling blistering page speed.

A superfast website significantly contributes towards the improvement of user experience, usability and engagement. Module management

Outdated modules can deter your efforts in speeding up your website. Updating every module enabled on your Drupal site can be beneficial.
 
It is also important to keep a record on used or no longer used modules. The number of Drupal modules installed on the site is directly proportional to the time taken for code execution thereby affecting page load time. Hence, uninstalling unwanted modules can improve execution time.
 
Furthermore, disabling the modules also add to the execution time of the code. So, a complete removal by uninstalling the unused modules would make the site faster.

Cache optimisation

Caching is an important feature that you can configure for enhancing your website speed. For advanced caching, Drupal comes with a great set of modules:

  • Internal Page Cache module assists in caching the web pages for anonymous users to enhance the speed for subsequent users.
  • Dynamic Page Cache module caches web pages for the anonymous and authenticated users.
  • BigPipe module lets users to swiftly see the unaltered, cacheable page elements while the personalised content is displayed next.
  • Redis module helps in integrating with the Redis key-value store thereby offering a tremendous cache system for static pages.
  • Varnish module allows you to integrate Drupal sites with an advanced and fast reverse-proxy system - Varnish cache- to serve static files and anonymous page views faster and at high volumes.
  • Memcache API and Integration module integrated Drupal sites with Memcached which helps in storing your data in active memory for a limited time period that makes the site faster to access.
Incorporation of Content Delivery Network (CDN)

CDN, Drupal module, assists in the integration of Content Delivery Network for the websites. It alters the file URLs thereby allowing the files like CSS, JavaScripts, images, videos, and fonts to be downloaded from the CDN instead of the web server. This helps in mitigating page load time and rapidly delivers web page components.

Usage of lazy loading

In traditional websites, all the images and content are preloaded into the web browser when someone accesses the site. Lazy loading loads these elements as soon as a user scrolls to view a content. Blazy, Drupal module, offers the functionalities of lazy loading and multi-serves the images to save bandwidth and server requests.

Image optimisation

Drupal 8 is loaded with image optimisation feature for setting the compression ratio of the images and fine-tune the page performance. Also, the size of the images for different screen sizes can be optimised in Drupal 8 which increases the page load speed.

Bandwidth optimisation

Optimising bandwidth refers to the aggregation of all CSS and JavaScript files to make them load together which ensures that all the page elements can be seen by the users almost immediately.

404 error management

When something on the site breaks to cause a 404 error, it can result in sluggishness. For instance, a failed image can hamper the performance of the site. Fast 404, Drupal module, utilises the resources better and whitelists files and checks pathways of problem.

Management of use of CSS and JavaScript

Avoiding overuse of CSS files and JS and adopting a minimalistic approach by keeping the code to a minimum can improve performance. Advanced CSS/JS Aggregation, Drupal module, can help in keeping a tab of your front-end performance by aggregating CSS and JavaScript files to improve speed.

Web hosting

It is of utmost significance that, while implementing every possible way of utilising the Drupal’s powerful capabilities, you select the best hosting provider that will decide your site’s ultimate speed, stability and security.

Scaling the server

In case, your server hardware is nearing its limits and you have optimised the site as much as possible, or you need a faster way of scaling than you can optimise, you can upgrade the server hardware in the following ways:

  • Scaling vertically: This is the simplest way of scaling the hardware. It refers to throwing more resources at the same server. In a cloud data centre, it may be as simple as upgrading the server size for more CPU cores, memory etc.
  • Scaling horizontally: This is a more intricate process than scaling vertically. It refers to adding more servers to separate the load. When done right, this can hugely minimise the load any single server receives.
  • Considering multiple servers: In case, you have multiple app servers for Drupal, you will require a method of deploying code to each server simultaneously. For instance, SaaS platforms like platform.sh and pantheon.io can handle the complete hosting setup for you but if you are doing it by yourself, you would need an rsync setup or git push to each of your servers etc. 
Up above the world so high: Drupal’s scalability for NASA Source: Drupal.org

A digital agency migrated the website of NASA to the AWS cloud and onto Drupal to create a fully responsive and user-centric experience. Several AWS based Drupal CMS solutions for NASA were implemented for NASA for serving a plethora of needs ranging from nasa.gov to the Science Mission Directorate’s science.nasa.gov in both English and Spanish to a multisite platform and governance model for numerous Drupal applications serving groups across different NASA centres.
 
Nasa.gov and all of its subdomain components were migrated and relaunched which involved replacement of a closed source system. It comprised of more than 250000 pages and almost 3 TB of content.

Drupal in action

Drupal compressed the complete development timeline and also saved a lot of money in the process. Building with Drupal on the Amazon cloud ensured that NASA’s content is stored safely and scales with the content growth. With its user-driven APIs, dynamic host provisioning, infinite compute scalability and storage, and well-architected security architecture, Drupal and AWS together was the right fit.

Drupal compressed the complete development timeline and also saved a lot of money in the process. Project highlights
  • Migration from proprietary, on-premise CMS system to an open source CMS in the Amazon cloud was performed without any service interruptions
  • Mobile-first approach was employed to the redesign of the site.
  • Headless Drupal in AWS cloud environment was built with security, performance and availability in mind.
Outcome  Source: Drupal.org

It is deployed in multiple AWS availability zones for redundancy handling approximately 500 content editors performing over 2000 content updates every day. On an average, it receives nearly one million page views a day and has handled peak loads of over 40,000,000 page views in a single day with a staggering and record-breaking 2,000,000+ concurrent users during NASA’s 2017 Total Solar Eclipse coverage.

Conclusion

Website scalability and performance is a significant aspect that ensures how well the digital business does during the busiest of times. Whether internet users throng at your website causing a sudden spike in traffic, or you are managing a popular service that witnesses a constant web traffic, Drupal scales with your needs.
 
We have been steadfast in our objective of offering an amazing digital experience through a suite of services.
 
Contact us at hello@opensenselabs.com to build a highly scalable Drupal site for your business.

blog banner blog image website scalability Scalability scalable website scalable CMS high-performance website performance and scalability Drupal scalability Drupal performance server scaling Performance Optimisation Website Performance Optimisation Blog Type Articles Is it a good read ? On

Blair Wadman: Need to reuse HTML in multiple templates? Try using partial Twig templates

Mié, 10/10/2018 - 13:43

You have a piece of HTML code that needs to be included in multiple Twig templates. The code will be consistent across all of them - if you need to change it, you need to change it everywhere it is used.

As an example, I recently had to include a piece of code from a social share service called RhythmOne. I want to include this code in some, but not all, of the node templates.

Sooper Drupal Themes: Designing A Modern Drupal Drop-Down Menu with Glazed Theme

Mié, 10/10/2018 - 12:42

The Main Menu on your website is the first thing that catches visitor’s attention. Besides, it’s one of the most important elements that will assist the user in an effortless and intuitive navigation. In this article we are going to talk about how to design a Drupal Drop-down Menu with Glazed Theme.

Before diving into customizing our Main Menu, learn How to Create Drop-down menus with Drupal 8 and Glazed Theme.

To start customizing our menu design we need to go to the Glazed Theme Settings page. Amongst a dozen of options that are directly responsible for every element of your website design and how the end-user sees it, we are going to find the Header & Main Menu - the place that will change how our menu looks like.

Header & Main Menu

When navigating to the Header & Main Menu, first thing that will come to our attention is the “Top Header Options”.
Clicking it will open an entire new world of possibilities. Here We can choose 1 of the 7 layouts that come pre-installed with Glazed Builder. A layout for every taste! Depending on what you want to choose for your website, you can pick between having your logo on the left and menu on the right, which is the default layout that you are already familiar with (spoiler: the one on this website), having everything beautifully aligned in the center, place the menu on the left, or several others.

Header style is probably one of the most important settings here and will determine the overall look and feel for your website (will it be more minimalistic or will it have a more “heavy” look to it?). We are able to choose between 3 general types of header styles: Normal, Overlay or Pull-down Navbar.

You can see examples of each header style and header layouts on the Glazed Theme Live Demo Page.

Each one of these options look great when implemented, but they are going to need some further refinements to look exactly how you imagined. This brings us to our next element: Height. Choosing the height value will determine how tall or short our main menu will be. Once we got our perfect Height settings we will move on to deciding whether or not we would like our Menu to have a fixed position. A fixed header stays at the top of the browser window when a user scrolls.

Behavior of the Drupal Drop-Down Menu

If we decide that we want our menu to stick to the top of the browser when people scroll, then another option will pop-out asking us if we would also like a sticky header – which basically means that the menu will appear only after the user scrolls past a certain point on your page, only then will it stick to the top of his or her window. This will be determined by the scroll offset, height & background opacity values that you decide on.
Congrats! You’re past all the technical aspects of your gorgeous Menu bar. (Well not really but for now we are moving on to the fun part - choosing the colors)

Customize Navigation Colors

Here is the place where it all comes together. You can choose colors from your website’s color scheme (Custom one you made or Glazed Default) or add individual values to each settings’ custom color. In this menu we can choose the colors for every aspect of the navigation menu: text color, drop-down background, menu hover text, etc.

After we are happy with the result we can move on to adding the final touches to our menu design.

Side Header & Mobile Menu Options

In this area you can choose the layout look on mobile devices and your side header (if you choose to opt for one in the beginning). You can determine elements such as content alignment (left/center/right) and menu bar width.

The Main Menu Link is for determining the font style and hover style of our Main Menu (both website & mobile versions).
Last but not least, by going to Mobile Header menu we will determine the mobile breakpoint and the height of our menu in order to make it even more mobile-friendly.

We have designed a brand new Main Menu for our website which will be enjoyed by the visitors and help them easily navigate to the information they are looking for!

We also created some Main Menu designs along with you so you don’t get bored doing it all by yourself. We’ll leave each settings value below. If you like any of them feel free to recreate or use them as an inspiration for your future eye-catching Main Menu.

DESIGN 1

    Top Header Options

    • Layout: Logo Left, Menu Left
    • Header Style: Normal
    • Height: 70
    • Fixed position: OFF
     

    Customize Navigation Colors

    • Menu Background: White
    • Menu Text: Custom color - #21252a
    • Menu Hover Background: Custom color - #21252a
    • Menu Hover Text: White
    • Drop-down Background: Custom color - #21252a
    • Drop-down Text: White
    • Drop-down Hover Background: #111111  
    • Drop-down Hover Text: White


    DESIGN 2

      Top Header Options

      • Layout: Normal (Logo left - Menu right)
      • Header Style: Overlay
      • Header Opacity: 0
      • Height: 50
      • Fixed position: OFF
      • Sticky Header: OFF

      Customize Navigation Colors

      • Menu Background: None
      • Menu Text: White
      • Menu Hover Background: #ffffff00 (sets it to transparent)
      • Menu Hover Text: Custom color - #b2b2b2
      • Drop-down Background: Custom color - #fcfcfc
      • Drop-down Text: #282323
      • Drop-down Hover Background: Custom color - #d8d8d8
      • Drop-down Hover Text: Custom color - #21252a


      DESIGN 3

        Top Header Options

        • Layout: Centered (inline)
        • Header style: Overlay
        • Header opacity: 0
        • Height: 70
        • Fixed position: On
        • Sticky header: On


        Sticky Header Options

        • Hide before scrolling: Always show
        • Scroll offset: 120
        • Height: 70
        • Background opacity: 0


        Customize Navigation Colors

        • Menu background: none
        • Menu text: custom color - #21252a
        • Menu hover background: custom color - #ffffff00
        • Menu hover text: custom color - #65b7ff
        • Drop-down Background: custom color - #fcfcfc
        • Drop-down text: custom color -  #282323
        • Drop-down Hover Background: custom color - #ffffff00
        • Drop-down Hover text: custom color - #65b7ff

        Did you enjoy this article? Subscribe to our Newsletter to stay up-to-date with our latest blog posts! 

        Agiledrop.com Blog: Jonathan Hedstrom: Drupal is like Lego for adult professionals

        Mié, 10/10/2018 - 11:43

        This week we talked with Jonathan Hedstrom. Read about what he thinks has been the biggest evolution for Drupal, what contribution is he the proudest of and what he thinks is the most important about Drupal today.

        READ MORE

        Matt Glaman: OK PhpStorm, what methods does my entity have?

        Mié, 10/10/2018 - 06:00
        OK PhpStorm, what methods does my entity have? Wednesday 10, October 2018 mglaman

        Working in object-oriented programming is great. You can define interfaces which specify a contract that implementers need to fulfill. You can then extend these to define your end requirement and provide the implementation. This also means you can guarantee an object that implements that interface will have a guaranteed set of known methods. In Drupal, all entities implement EntityInterface, this is how we know that an entity can return its identifier, label, language, and other common methods.

        Chocolate Lily: Managing Shared Configuration Part 8: Summary and Future Directions

        Mar, 10/09/2018 - 20:19

        This is the eighth and last installment in a series presenting work on shared configuration that comes out of the Drutopia initiative and related efforts. If you've stuck with it this far, wow! If you haven't seen previous installments, you might want to start with Part 1, Configuration Providers.

        The series focus has been meeting the needs of distributions for creating and updating packages of shared configuration, a use case not addressed in Drupal 8 core.

        We've seen how configuration can be packaged using the Features module (Part 6). We've covered the ins and outs of updating packages of configuration, including how to assemble configuration as provided by extensions (Part 1), make needed changes to configuration from another package (Part 4), capture a previous configuration state (Part 2), and merge in configuration updates (Part 5). Along the way we've examined the particular cases of preserving configuration customizations (Part 3), working with core configuration required by multiple features (Part 7), and (bonus!) managing blocks when subthemes are in the mix.

        The fact we're on installment eight - not even including the sneak bonus episode - in itself suggests a general conclusion: addressing these needs is not simple!

        Drupal Association blog: A Successful Drupal Global Training Day in Kerala, India

        Mar, 10/09/2018 - 15:56

        This is a guest blog by Lijo Abraham and Ali Fathima N. A. to tell you about a recent Global Training Days event in Kerala.


        Group photo by Sumesh S (sumesh_sr)

        A Drupal Global Training Day (GTD) was held in Thiruvananthapuram, Kerala, India on September 29, welcoming 60 participants representing diverse sectors, including students from engineering colleges, software professionals, and government officials. The event created momentum to form the Drupal Community in Kerala.

        The International Centre for Free and Open Source Software (ICFOSS)—an autonomous institution under the Government of Kerala that is mandated with propagation, promotion, and development of Free and Open Source Software—donated the event. Zyxware Technologies provided the technical partnership for the GTD.

        The GTD had eminent personalities addressing the participants and sharing their experiences. In the inaugural address, M. Sivasankar IAS, Secretary of the E&IT Department for the Government of Kerala, stressed the role played by the Kerala Government in enabling the technology ecosystem in India. 

        Dr. Rajeev R. R., Program Head of ICFOSS, welcomed the participants. Thomas P. Thomas, CEO of Zyxware Technologies, offered an Introduction to Drupal, the Drupal Community, and the GTD.

        Vimal Joseph, Senior Manager of Technology at Zyxware Technologies, presented a session on 'Fueling the Digital Transformation with Drupal'—which was followed by open questions and answers regarding Drupal. 

        A case study on 'Multi-site Platform for a Government Agency' was presented by Mathew T. Abraham, a Project Manager at Zyxware Technologies. Participants interacted directly with the speakers.


        Fuelling Digital Transformation with Drupal, photo by Sudheesh S. Babu.

        Presentations were followed by hands-on Drupal workshops. Drupal developers of Zyxware Technologies namely  Abhinand Gokhala, Sumesh S, Jijo Joseph, Sudheesh S. Babu, Jithin Prabhakaran, Sahal V. A., Jeslin Shaji and Ali Fathima N. A. provided individual attention to the participants. Workshops led by Krishna R. P., Technical Project Manager, and Ajish J. Pulikottil, Technical Consultant, offered an introduction to Drupal, installing, and how to build a simple Drupal 8 application. Nearly a dozen staff from ICFOSS and Zyxware Technologies volunteered at the event as well.

        The workshop on Drupal has been very inspiring. I am feeling delighted to have been a part of this and will try to continue with the wave approach on society with this positive technique,” stated Aishwarya Soman Nair, a student at Saintgits College of Engineering.

        Overall, participants’ feedback stated that this was a new, helpful opportunity to learn more about Drupal in detail. Participants were awarded certificates of participation.

        One of the best workshops I have attended. The training was inspiring, informative, and its method of delivery was so easy to receive. I am interested in forthcoming open source training also,” said Raveena R. Marangattu, a student at Saintgits College of Engineering.

        You can be part of Global Training Days

        Get involved with Global Training Days! Join the group and host an event this November 30-December 1.

        Acro Media: Drupal 9 in 2020. What That Means for Drupal 7 and 8

        Mar, 10/09/2018 - 12:45

        It was recently announced that 2020 will be the year Drupal 9 is officially released into the wild. The exact date hasn’t been set, but we can now look forward to the 9.0 release that year. The announcement also gave us an official End of Life date of November 2021 for Drupal 7 AND Drupal 8. So, what does this mean if you’re currently running or developing a site on one of those versions? In this post, I’ll explain.

        What this means for Drupal 8?

        Drupal 8 is built around a concept of continuous innovation. What this means is that new features and backwards-compatible changes are continuously added. When an old system or code is depreciated, instead of removing it, it stays in the codebase. This ensures that custom code and contributed modules will continue to work and have time to update. Eventually, there will be an excess amount of depreciated code and dependencies and there will be a need to remove it. That is one of the reasons for the release of Drupal 9. All that old stuff gets removed and we start fresh with the latest and greatest technology.

        The great thing about Drupal 8 is that by the time Drupal 9 is released all of the modules and custom code in your site should be up-to-date. Therefor, updating from 8 to 9 is no different than from 8.5 to 8.6. Clean and painless!

        And that’s the point. This method of building and releasing versions will continue for the foreseeable future which is why we like to say that a migration to the latest Drupal will be the last migration you ever need.

        What this means for Drupal 7?

        Unfortunately, Drupal 7 is a different story. When Drupal 7 reaches end of life in November of 2021, it will no longer be supported by the community at large. There are plans to release a Drupal 7 version that uses the latest version of PHP. There is also a paid support program planned (similar to Drupal 6 LTS) that will allow people and organizations unable or unwilling to migrate to continue to keep their sites secure. But really, your best course of action is to plan for a migration to Drupal 8 by 2020. This keeps your site current and guarantees it’s security moving forward.

        The codebase between 7 and 8 is entirely different so a migration to Drupal 8 is a pretty big undertaking. You could call it replatforming. Drupal 8 does however include a built in data migration tool that will make the move easier. You might still need some help though depending on your site requirements and edge cases. Plus, data is one thing, but you would also need to move your theme, too. The silver lining is that migrating presents an opportunity to freshen up the look of your site and increase site speed with the latest software. For more information on what is involved in a migration, check out this post.

        Like I mentioned earlier in this post, a migration to Drupal 8 may likely be the last migration you ever need since subsequent major version updates (i.e. from 8 to 9) should be very quick and easy. Once you’ve made that initial investment migrating to Drupal 8, you can rest assured that you won't have to go through that process again, possibly forever.

        Migration experts

        Acro Media is a Drupal agency specialized in eCommerce. We help build and maintain successful eCommerce websites as well as the underlying Drupal Commerce platform. We are also heavily involved in the development of Drupal’s migration tools. If you want to discuss what a migration might look like for your business, talk to us! We’re happy to help.

        Drupal Modules: The One Percent: Drupal Modules: The One Percent — Login History (video tutorial)

        Mar, 10/09/2018 - 11:01
        Drupal Modules: The One Percent — Login History (video tutorial) NonProfit Tue, 10/09/2018 - 08:01 Episode 47

        Here is where we bring awareness to Drupal modules running on less than 1% of reporting sites. Today we'll check out Login History, a module logs details of user logins.

        Páginas