Skip to content

Instantly share code, notes, and snippets.

@monochromer

monochromer/index.html

Last active Apr 26, 2016
Embed
What would you like to do?
Простой шаблон для html/css/js
<!DOCTYPE html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--[if lt IE 8]><html class="no-js ie ltie8 ltie9 ltie10" lang="ru"><![endif]-->
<!--[if IE 8]><html class="no-js ie ie8 ltie9 ltie10" lang="ru"><![endif]-->
<!--[if IE 9]><html class="no-js ie gtie8 ie9 ltie10" lang="ru"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html class="no-js" lang="ru"><!--><![endif]-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<!-- <link rel="stylesheet" href="css/reset.css"> -->
<!-- нормализация дефолтных стилей браузеров -->
<link rel="stylesheet" href="css/normalize.css">
<!-- основные стили -->
<link rel="stylesheet" href="css/main.css">
<script src="js/jquery-1.11.3.min.js"></script>
<!-- проверка поддержки свойств в разных браузерах -->
<script src="js/modernizr.custom.js"></script>
<!-- поддержка html5-тегов, css3-селекторов, медиа-запросов в IE<=8 -->
<!--[if lt IE 9]>
<script src="js/html5shiv.min.js"></script>
<script src="js/respond.min.js"></script>
<script src="js/nwmatcher-1.2.5.js"></script>
<script src="js/selectivizr-min.js"></script>
<![endif]-->
<!-- основные скрипты -->
<script src="js/scripts.js"></script>
<meta name="description" content="Your description">
<meta name="author" content="Author Name">
<title>Page Title</title>
</head>
<body>
<div class="page"></div>
</body>
</html>
// пространство имен для рабты элементов страниц
var UI = window.UI || {};
// пространство имен для функций, которые будут вызваны при загрузке DOM
UI.commonFuncs = UI.commonFuncs || {};
// события при загрузке DOM
document.addEventListener('DOMContentLoaded', function () {
// перебираем все функции из объекта commonFuncs и вызываем их
var funcs = UI.commonFuncs;
for (var func in funcs) {
if(funcs.hasOwnProperty(func) && typeof funcs[func] === 'function') {
funcs[func]();
}
};
});
/* ==========================================================================
Типографика
========================================================================== */
:root {
font: 14px/1.5 Arial, sans-serif;
text-rendering: optimizeLegibility;
font-smooth: always;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-tap-highlight-color: transparent
color: #333;
background-color: #efefef;
}
/* ==========================================================================
Часто используемые элементы страниц
========================================================================== */
/* ==========================================================================
Структурные элементы страниц
========================================================================== */
/* ==========================================================================
Элементы отдельных страниц
========================================================================== */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.