Skip to content

Martszii/guides

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 

Repository files navigation

Web Development Guides, Tutorials and Snippets

Guides, tutorials, demos and snippets for front end and back end web development.

Design

Development

More


Full Screen Navigation Overlay

A style of navigation that triggers a full screen overlay. This example utilizes flexbox.

TutorialDemo

aside {
	position: fixed;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	opacity: 0;
	visibility: hidden;
	z-index: 2;
}
.open {
	opacity: 1;
	visibility: visible;
}
<aside>
  <div class="toggle-overlay">
    <a class="close"> Toggle </a>
  </div>
  <nav>
  </nav>
</aside>
 $('.toggle-overlay').click(function() {
		$('aside').toggleClass('open');
	});

Off Canvas Navigation

Slide out navigation that is hidden off canvas until triggered. Inspired by the Lanyon/Poole theme for Jekyll.

TutorialDemo

html, body { overflow-x: hidden; }

.position {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
}
@media screen and (min-width: 800px) {
  .position { position: fixed; }
}
aside {
  width: 250px;
  height: 100%;
  position: fixed;
  top: 0;
  left: -250px;
}
main {
  width: 100%;
  position: absolute;
  left: 0;
}
article {
  padding: 0 80px;
}
.show-nav aside, .show-nav .position, .show-nav main { transform: translateX(250px); }
.show-nav .position { position: fixed; }
<aside> Navigation </aside>
<a id="nav-toggle" class="position">Toggle</a>
<main>
  <article> Main content </article>
</main>
$('#nav-toggle').click(function () {
	this.classList.toggle("active");
	if ($('body').hasClass('show-nav')) {
		$('body').removeClass('show-nav');
	} else {
		$('body').addClass('show-nav');
	}
});

Responsive Dropdown Navigation Bar

A classic top navigation bar with dropdowns. The navigation links collapse into a hamburger icon toggle on mobile collapse.

TutorialDemo

$('nav ul li a:not(:only-child)').click(function (e) {
	$(this).siblings('.nav-dropdown').toggle();
	$('.nav-dropdown').not($(this).siblings()).hide();
	e.stopPropagation();
});
$('html').click(function () {
	$('.nav-dropdown').hide();
});
$('#nav-toggle').click(function () {
	$('nav ul').slideToggle();
});

Flexbox Grid

A simple, responsive grid made with flexbox. This grid is based on percentages and is infinitely expandable.

TutorialDemo

.column { flex-basis: 100% }

@media screen and (min-width: 800px) {
  .row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
  }
  .column { flex: 1; }
  .one-fourth { flex: 2.5; }
  .one-third { flex: 3.3; }
  .half { flex: 5; }
}
<div class="row">
  <div class="column"> 50% </div>
  <div class="column"> 50% </div>
</div>

Float Grid

A simple, responsive grid made with CSS floats and a clearfix hack. This grid is based on percentages rather than the traditional 12-column grid. You can add as many classes as you want columns.

TutorialDemo

.row::before, .row::after {
  display: table;
  content: " ";
  clear: both;
}
.one, .one-third, .two-thirds, .one-fourth, .half { width: 100%; }

@media only screen and (min-width: 800px) {
  .one { width: 100%; }
  .half { width: calc(100% / 2); }
  .one-third { width: calc(100% / 3); }
  .one-fourth { width: calc(100% / 4); }
  .two-thirds { width: calc(100% / 3 * 2); }
  .column { float: left }
}
<div class="row">
  <div class="half column"> 50% </div>
  <div class="half column"> 50% </div>
</div>

Fundamentals of Responsive Design

Before integrating third party frameworks into your websites, learn how to build your own simple framework and understand responsive breakpoints, grids, and navigation styles.

Understanding the Fundamentals of Responsive Design

  1. Foundation - <meta name="viewport" content="width=device-width, initial-scale=1">
  2. Breakpoints - @media screen and (min-width: 800px) { }
  3. Structure - a grid system
  4. Navigation - collapsible navigation

Bootstrap

Bootstrap is one of the most popular CSS frameworks. Learn what a framework is, how to get started with Bootstrap, and how to use the documentation to build a responsive frame upon which you can add custom styles.

What Bootstrap Is and How To Use It

  • What is Bootstrap?
  • Why is a framework important?
  • Building a basic Bootstrap template
  • Applying custom styles

Local Server Environment - MAMP

Setting up a local environment is necessary In order to begin working in the back end with languages such as PHP and MySQL. Learn how to set up a LAMP/MAMP/WAMP stack.

Setting Up a Local Server Environment with MAMP

  • Linux/Mac/Windows
  • Apache
  • MySQL
  • PHP

Virtual Hosts

If you want to set up more than one websites on a local server, you can use virtual hosts to work on as many sites as you want.

Setting Up Virtual Hosts

  • Editing the Apache configuration file - httpd.conf
  • Editing the hosts files - hosts
  • Setting the correct ports

Developing a WordPress Theme from Scratch

You know HTML, but your potential clients don't. If you intend to make a website and pass it on to a user so that they might edit it by themselves in the future, a content management system (CMS) will be necessary. WordPress is the most popular CMS, and it's built on PHP.

This guide will show you how to take your HTML site and turn it into a WordPress theme. It assumes no prior knowledge of PHP or WordPress.

Developing a WordPress Theme from Scratch

Migrating WordPress

After creating a WordPress theme in a local environment, there are a few necessary steps to take to ensure that the site doesn't break when migrating to a live server.

Migrating a WordPress Site to a Live Server

Getting Started with Git

Links to Git repositories are everywhere. Learn how to use the command line to create a local project, upload it to a Git repository host (such as GitHub), and upload it onto a live server, bypassing FTP.

This guide assumes no prior knowledge with or familiarity of Git, GitHub, version control software, or using command lines.

Getting Started with Git

Using Grunt and Sass

Understand how to use Node.js, Node Package Manager (npm), Grunt, Sass, and command line can be daunting. This guide assumes no prior knowledge of using the command line, installing Node.js, using npm, Grunt or Sass, and details every step along the way to ensure that Grunt it up and running.

By the end of this article you will be able to set up Grunt and use it to compile SCSS into CSS which is minified and autoprefixed, as well as minifying and linting JavaScript code.

Getting Started with Grunt and Sass

More

In Progress

About

Web Development Guides and Tutorials

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published