Improve widths

This commit is contained in:
Rodrigo Fernandes 2016-10-15 22:18:16 +01:00
parent 316ece4fa0
commit 4ed847bf14
No known key found for this signature in database
GPG key ID: 08E3C5F38969078E
10 changed files with 56 additions and 23 deletions

View file

@ -44,8 +44,8 @@
</script> </script>
</head> </head>
<body class="swag-line template-index"> <body class="template-index ">
<div> <div class="swag-line">
<div class="container"> <div class="container">
<nav class="navbar navbar-default navbar-tall navbar-full" role="navigation"> <nav class="navbar navbar-default navbar-tall navbar-full" role="navigation">

View file

@ -3,6 +3,14 @@
* Adapted by @rtfpessoa * Adapted by @rtfpessoa
*/ */
.template-index {
width: 100%;
}
.template-index-min {
min-width: 700px;
}
.m-b-md { .m-b-md {
margin-bottom: 23px !important margin-bottom: 23px !important
} }
@ -87,13 +95,13 @@
@media (min-width: 768px) { @media (min-width: 768px) {
.footer { .footer {
padding: 60px 0 padding: 60px 0;
} }
} }
@media (min-width: 768px) { @media (min-width: 768px) {
.container { .container {
width: 710px width: 100%;
} }
.row-centered { .row-centered {
@ -108,13 +116,13 @@
@media (min-width: 992px) { @media (min-width: 992px) {
.container { .container {
width: 890px width: 100%;
} }
} }
@media (min-width: 1200px) { @media (min-width: 1200px) {
.container { .container {
width: 1050px width: 100%;
} }
} }
@ -168,7 +176,7 @@
.swag-line:before { .swag-line:before {
content: ''; content: '';
position: absolute; position: fixed;
display: block; display: block;
top: 0; top: 0;
left: 0; left: 0;

2
docs/main.min.css vendored

File diff suppressed because one or more lines are too long

View file

@ -51,8 +51,8 @@
</script> </script>
</head> </head>
<body class="swag-line template-index"> <body class="template-index template-index-min">
<div> <div class="swag-line">
<div class="container"> <div class="container">
<nav class="navbar navbar-default navbar-tall navbar-full" role="navigation"> <nav class="navbar navbar-default navbar-tall navbar-full" role="navigation">

View file

@ -554,9 +554,9 @@ $(document).ready(function() {
var diff2htmlUi = new Diff2HtmlUI({diff: data}); var diff2htmlUi = new Diff2HtmlUI({diff: data});
if (outputFormat === 'side-by-side') { if (outputFormat === 'side-by-side') {
$container.css({'min-width': '1280px'}); $container.css({'width': '100%'});
} else { } else {
$container.css({'width': '980px'}); $container.css({'width': ''});
} }
diff2htmlUi.draw(container, { diff2htmlUi.draw(container, {

2
docs/url.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -9,11 +9,28 @@ var websitePages = fs.readdirSync(root + '/pages');
var template = hogan.compile(readFile(root + '/template.mustache')); var template = hogan.compile(readFile(root + '/template.mustache'));
var options = {
'url': {
'extraClass': 'template-index-min'
}
};
websitePages.map(function(page) { websitePages.map(function(page) {
var pagePartial = readFile(pagesRoot + '/' + page + '/' + page + '.partial.html'); var pagePartial = readFile(pagesRoot + '/' + page + '/' + page + '.partial.html');
var pageAssets = readFile(pagesRoot + '/' + page + '/' + page + '-assets.partial.html'); var pageAssets = readFile(pagesRoot + '/' + page + '/' + page + '-assets.partial.html');
var pageScripts = readFile(pagesRoot + '/' + page + '/' + page + '-scripts.partial.html'); var pageScripts = readFile(pagesRoot + '/' + page + '/' + page + '-scripts.partial.html');
var pageHtml = template.render({assets: pageAssets, scripts: pageScripts, content: pagePartial});
var templateOptions = {assets: pageAssets, scripts: pageScripts, content: pagePartial};
// Allow each page to have custom options
var pageOptions = options[page] || {};
for (var key in pageOptions) {
if (pageOptions.hasOwnProperty(key)) {
templateOptions[key] = pageOptions[key];
}
}
var pageHtml = template.render(templateOptions);
writeFile('docs/' + page + '.html', pageHtml); writeFile('docs/' + page + '.html', pageHtml);
}); });

View file

@ -3,6 +3,14 @@
* Adapted by @rtfpessoa * Adapted by @rtfpessoa
*/ */
.template-index {
width: 100%;
}
.template-index-min {
min-width: 700px;
}
.m-b-md { .m-b-md {
margin-bottom: 23px !important margin-bottom: 23px !important
} }
@ -87,13 +95,13 @@
@media (min-width: 768px) { @media (min-width: 768px) {
.footer { .footer {
padding: 60px 0 padding: 60px 0;
} }
} }
@media (min-width: 768px) { @media (min-width: 768px) {
.container { .container {
width: 710px width: 100%;
} }
.row-centered { .row-centered {
@ -108,13 +116,13 @@
@media (min-width: 992px) { @media (min-width: 992px) {
.container { .container {
width: 890px width: 100%;
} }
} }
@media (min-width: 1200px) { @media (min-width: 1200px) {
.container { .container {
width: 1050px width: 100%;
} }
} }
@ -167,7 +175,7 @@
.swag-line:before { .swag-line:before {
content: ''; content: '';
position: absolute; position: fixed;
display: block; display: block;
top: 0; top: 0;
left: 0; left: 0;

View file

@ -158,9 +158,9 @@ $(document).ready(function() {
var diff2htmlUi = new Diff2HtmlUI({diff: data}); var diff2htmlUi = new Diff2HtmlUI({diff: data});
if (outputFormat === 'side-by-side') { if (outputFormat === 'side-by-side') {
$container.css({'min-width': '1280px'}); $container.css({'width': '100%'});
} else { } else {
$container.css({'width': '980px'}); $container.css({'width': ''});
} }
diff2htmlUi.draw(container, { diff2htmlUi.draw(container, {

View file

@ -48,8 +48,8 @@
</script> </script>
</head> </head>
<body class="swag-line template-index"> <body class="template-index {{extraClass}}">
<div> <div class="swag-line">
<div class="container"> <div class="container">
<nav class="navbar navbar-default navbar-tall navbar-full" role="navigation"> <nav class="navbar navbar-default navbar-tall navbar-full" role="navigation">