зеркало из https://github.com/mozilla/commonplace.git
add core templates
This commit is contained in:
Родитель
9d3a427d16
Коммит
86bd4aa2c7
|
@ -15,7 +15,8 @@ folders in ```dist``` that group the components:
|
|||
but are possibly shared between some projects.
|
||||
- ```core```: necessary JS modules that power all of our projects, the Commonplace framework.
|
||||
- ```core-css```: base CSS components that ship with every project for visual consistency.
|
||||
- ```templates```: reusable templates
|
||||
- ```core-templates```: reusable templates that every project uses
|
||||
- ```contrib-templates```: reusable templates that some projects use
|
||||
|
||||
### Adding a Core JS Component
|
||||
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no,
|
||||
initial-scale=1, maximum-scale=1">
|
||||
<meta name="theme-color" content="#fff">
|
||||
<title>Firefox Marketplace</title>
|
||||
<link rel="stylesheet" href="/media/css/splash.css">
|
||||
<link rel="stylesheet" href="/media/css/include.css">
|
||||
<link rel="dns-prefetch" href="//ssl.google-analytics.com">
|
||||
<link rel="dns-prefetch" href="//login.persona.org">
|
||||
<link rel="dns-prefetch" href="//firefoxos.persona.org">
|
||||
<link rel="dns-prefetch" href="//static.login.persona.org">
|
||||
</head>
|
||||
<body data-languages="["bg", "bn-BD", "ca", "cs", "da", "de", "el", "en-US", "es", "fr", "ga-IE", "hr", "hu", "it", "ja", "ko", "mk", "nb-NO", "nl", "pl", "pt-BR", "ro", "ru", "sk", "sq", "sr", "sr-Latn", "tr", "zh-CN", "zh-TW"]">
|
||||
<noscript><p>Sorry, you need JavaScript to access the Marketplace.</p></noscript>
|
||||
|
||||
<div id="splash-overlay">
|
||||
<div class="throbber"><b></b><b></b><b></b></div>
|
||||
</div>
|
||||
|
||||
<header id="site-header" class="header site-header"></header>
|
||||
|
||||
<div class="cloak"></div>
|
||||
|
||||
<main>
|
||||
<nav id="site-nav" class="site-nav" role="navigation"></nav>
|
||||
<div id="page" class="page" role="main"></div>
|
||||
</main>
|
||||
|
||||
<footer id="site-footer"></footer>
|
||||
|
||||
<div id="lightbox">
|
||||
<section>
|
||||
<ul class="content"></ul>
|
||||
<a class="close" href="#">×</a>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script src="/media/js/l10n.js"></script>
|
||||
<script src="/media/js/include.js" defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,56 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no,
|
||||
initial-scale=1, maximum-scale=1">
|
||||
<meta name="description"
|
||||
content="The Firefox Marketplace is the official source of apps for the Web Platform.">
|
||||
<meta name="theme-color" content="#fff">
|
||||
<title>Firefox Marketplace</title>
|
||||
<link rel="icon" href="/media/img/logos/128.png" sizes="128x128">
|
||||
<link rel="icon" href="/media/img/logos/64.png" sizes="64x64">
|
||||
<link rel="icon" href="/media/img/logos/32.png" sizes="32x32">
|
||||
<link rel="stylesheet" href="/media/css/splash.css">
|
||||
<link rel="stylesheet" href="/media/css/include.css">
|
||||
<link title="Firefox Marketplace"
|
||||
rel="search" type="application/opensearchdescription+xml"
|
||||
href="/opensearch.xml" />
|
||||
|
||||
<!--<link rel="dns-prefetch" href="{{ MEDIA_URL }}">-->
|
||||
<link rel="dns-prefetch" href="//ssl.google-analytics.com">
|
||||
<link rel="dns-prefetch" href="//login.persona.org">
|
||||
<link rel="dns-prefetch" href="//firefoxos.persona.org">
|
||||
<link rel="dns-prefetch" href="//static.login.persona.org">
|
||||
</head>
|
||||
<body data-build-id-js="" data-spaceheater="false" data-media="">
|
||||
<noscript><p>Sorry, you need JavaScript to access the Marketplace.</p></noscript>
|
||||
|
||||
<div id="splash-overlay">
|
||||
<div class="throbber"><b></b><b></b><b></b></div>
|
||||
</div>
|
||||
|
||||
<header id="site-header" class="header site-header"></header>
|
||||
|
||||
<div class="cloak"></div>
|
||||
|
||||
<main>
|
||||
<div id="cat-dropdown"></div>
|
||||
<div id="cat-list"></div>
|
||||
<div id="page" class="page" role="main"></div>
|
||||
</main>
|
||||
|
||||
<footer id="site-footer"></footer>
|
||||
|
||||
<div id="lightbox">
|
||||
<section>
|
||||
<ul class="content"></ul>
|
||||
<a class="close" href="#">×</a>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script src="https://login.persona.org/include.js" defer></script>
|
||||
<script src="/media/js/l10n.js"></script>
|
||||
<script src="/media/js/include.js" defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -27,16 +27,24 @@ var CORE_MODULES = [
|
|||
'utils',
|
||||
'z'
|
||||
];
|
||||
var CORE_SRC_PATH = 'commonplace/dist/core/';
|
||||
var JS_DEST_PATH = 'src/media/js/';
|
||||
var LIB_DEST_PATH = JS_DEST_PATH + 'lib/';
|
||||
var CORE_DEST_PATH = LIB_DEST_PATH + 'commonplace/';
|
||||
|
||||
var CORE_VIEWS = [
|
||||
'views/not_found',
|
||||
'views/tests'
|
||||
];
|
||||
|
||||
var BASE_TEMPLATES = [
|
||||
'app.html',
|
||||
'server.html'
|
||||
];
|
||||
|
||||
var CORE_SRC_PATH = 'commonplace/dist/core/';
|
||||
var CORE_TEMPLATE_PATH = 'commonplace/dist/core-templates/';
|
||||
var JS_DEST_PATH = 'src/media/js/';
|
||||
var LIB_DEST_PATH = JS_DEST_PATH + 'lib/';
|
||||
var CORE_DEST_PATH = LIB_DEST_PATH + 'commonplace/';
|
||||
|
||||
|
||||
// Build config object to tell Gulp which Bower files into project and where.
|
||||
var bowerConfig = {
|
||||
'jquery/jquery.js': LIB_DEST_PATH,
|
||||
|
@ -50,6 +58,9 @@ _.each(CORE_MODULES, function(module) {
|
|||
_.each(CORE_VIEWS, function(view) {
|
||||
bowerConfig[CORE_SRC_PATH + view + '.js'] = CORE_DEST_PATH + 'views/';
|
||||
});
|
||||
_.each(BASE_TEMPLATES, function(template) {
|
||||
bowerConfig[CORE_TEMPLATE_PATH + template] = 'src/';
|
||||
});
|
||||
|
||||
|
||||
// Build require config, to be used in development and AMD optimizers.
|
||||
|
|
Загрузка…
Ссылка в новой задаче