Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
deltakosh committed Apr 26, 2019
1 parent 129f7df commit 0bb15c4
Show file tree
Hide file tree
Showing 20 changed files with 169 additions and 61 deletions.
2 changes: 1 addition & 1 deletion public/html/css/main.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public/html/img/babylonjs_identity_color.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/html/img/babylonjs_identity_color_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/html/img/logos/logo-babylonjs.png
Binary file not shown.
4 changes: 2 additions & 2 deletions public/scss/_define.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $blue : #BB464B;
$black : #333;
$darker_black : #2D2D2D;
$yellow: #f8eec7;
$dark : rgb(24, 34, 45);
$dark : #2A2342;

//--------------
// FONTS
Expand All @@ -26,7 +26,7 @@ $fa-font-path: "../fonts/font-awesome";
// Default font for regular text
$font-regular: "Roboto";
// Default font for titles
$font-title: "Open Sans";
$font-title: "acumin-pro";
// Defautl font for source code
$font-code:"Inconsolata";

Expand Down
4 changes: 0 additions & 4 deletions public/scss/classes/_mobile_classes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
#classes_classesListByTag{
width:100%;
}

.whats-new-banner{
padding-top:$bh;
}
}

@include media($x-small-screen) {
Expand Down
4 changes: 3 additions & 1 deletion public/scss/common/_banner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ $title_width : 300px;
.banner {
@include display(flex);
width : 100%;
background-color: rgb(34, 44, 55);
background-color: #2A2342;
height : $bh;

// The left menu (title + tabs)
Expand Down Expand Up @@ -83,6 +83,8 @@ $title_width : 300px;
color: white;
display: inline-block;
width:100%;
font-family: "acumin-pro";
font-size: 16px;
}
a:hover{
text-decoration: none;
Expand Down
35 changes: 31 additions & 4 deletions public/scss/example/example.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,36 @@
float: left;

#example-banner {
background-image : url("/img/pattern_ban_1.png");
background-repeat : repeat;
background-color: #151221;
text-align : center;
padding : 10px 0;
display: grid;
height: 100px;
grid-template-columns: 100%;
grid-template-rows: 100%;

.img-holder {
grid-row: 1;
grid-column: 1;
height: 100%;
width: 56%;
margin: 0 auto;
display: grid;
justify-content: flex-start;

img {
height: 100%;
margin-left: -25px;
}
}

h1 {
text-align: center;
align-self: center;
grid-row: 1;
grid-column: 1;
color: #e0684b;
font-size: 28px;
text-transform: uppercase;
font-weight: 100;
}
}

Expand Down Expand Up @@ -141,6 +164,10 @@
margin-top:35vh;
font-size:30px;
}

img {
height: 200px;
}
}
}
}
16 changes: 12 additions & 4 deletions public/scss/statics/_mobile_statics.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
/* MEDIUM SCREEN*/
@include media($medium-screen) {

.statics-banner {
.img-holder {
width: 80%;
}
}

.statics-content{
.fileList {
@include outer-container(100%);
}
}
}

/* SMALL SCREENS VERSION */
@include media($small-screen) {
.statics-banner{
padding-top:$bh;
.statics-banner {
.img-holder {
display: none;
}
}
}
}
41 changes: 34 additions & 7 deletions public/scss/statics/statics.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,39 @@
.statics-banner {
background-image: url("/img/pattern_ban_1.png");
background-repeat: repeat;
text-align: center;
padding: 10px 0;
background-color: #151221;
text-align: center;
display: grid;
grid-template-columns: 100%;
grid-template-rows: 100%;
height: 100px;

.img-holder {
grid-row: 1;
grid-column: 1;
height: 100%;
width: 56%;
margin: 0 auto;
display: grid;
justify-content: flex-start;

&.details {
width: 80%;
}

h1:first-letter {
text-transform: uppercase;
}
img {
height: 100%;
margin-left: -25px;
}
}

h1 {
align-self: center;
grid-row: 1;
grid-column: 1;
color: #e0684b;
font-size: 28px;
text-transform: uppercase;
font-weight: 100;
}
}

.statics-content {
Expand Down
4 changes: 3 additions & 1 deletion public/scss/whats-new/_mobile_whats-new.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
}

.whats-new-banner{
padding-top:$bh;
.img-holder {
display: none;
}
}
}
37 changes: 32 additions & 5 deletions public/scss/whats-new/whats-new.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,35 @@
.whats-new-banner{
background-image : url("/img/pattern_ban_1.png");
background-repeat : repeat;
text-align : center;
padding : 10px 0;
.whats-new-banner{
background-color: #151221;
text-align : center;
display: grid;
grid-template-columns: 100%;
grid-template-rows: 100%;
height: 100px;

.img-holder {
grid-row: 1;
grid-column: 1;
height: 100%;
width: 80%;
margin: 0 auto;
display: grid;
justify-content: flex-start;

img {
height: 100%;
margin-left: -25px;
}
}

h1 {
align-self: center;
grid-row: 1;
grid-column: 1;
color: #e0684b;
font-size: 28px;
text-transform: uppercase;
font-weight: 100;
}
}

#whats-new{
Expand Down
56 changes: 28 additions & 28 deletions scripts/compile-html/compile-html-examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ var pug = require('pug'),
path = require('path'),
appRoot = require('app-root-path').path,
logger = require(path.join(appRoot, 'config/logger'));
var EXAMPLES_PATH_JSON = path.join(appRoot, 'examples/list.json');

var EXAMPLES_PATH_JSON = path.join(appRoot, 'examples/list.json');

/*************************************************************************
* SCRIPT *
Expand All @@ -26,12 +26,12 @@ function checkDirectorySync(directory) {
}
}

module.exports = function (done) {
module.exports = function(done) {
checkDirectorySync("public/html/");
checkDirectorySync("public/html/examples/");
var content = "";
let pugContent =
`
let pugContent =
`
include includes/header.pug
include includes/banner.pug
#wrapper.example
Expand All @@ -42,17 +42,17 @@ include includes/banner.pug
input(id='filterBar',type='text', name='filter', placeholder='Filter examples...')
img(id="filterBarClear" src="/img/UI/clear_button.png")
`;
fs.readFile(EXAMPLES_PATH_JSON, function (err, listJson) {

fs.readFile(EXAMPLES_PATH_JSON, function(err, listJson) {
var list = JSON.parse(listJson);
var elemCountID = 0;
list.examples.forEach(category => {
if (category.ignoreInDoc) {
return;
}
pugContent +=
`

pugContent +=
`
div(class="categoryContainer")
p ` + category.title;
var samples = category.samples;
Expand All @@ -66,40 +66,40 @@ include includes/banner.pug
return 0;
});
samples.forEach(sample => {
pugContent +=
`
div( id='`+ elemCountID +`', class="itemLine `+sample.title+` contentBlock", onclick="load('`+sample.PGID+`','`+ elemCountID +`')")
img(src="`+ sample.icon +`", onclick="loadMobile('`+sample.PGID+`')")
div(class = "contentDiv`+ elemCountID +` itemContent" )
div(class="contentDivPlaygrond", onclick="loadMobile('`+sample.PGID+`')")
h3(class="itemLineChild", onclick="loadMobile('`+sample.PGID+`')") `+ sample.title +`
p(class="itemLineChild") `+ sample.description +`
a(href="`+ sample.doc +`", class="itemLineChildLink childLink", target="_blank") Documentation
a(href="https://playground.babylonjs.com/frame.html`+sample.PGID+`", class="itemLineChildLink childLink", target="_blank", id="PGlink_`+sample.PGID+`") Playground`;
elemCountID++;
pugContent +=
`
div( id='`+ elemCountID + `', class="itemLine ` + sample.title + ` contentBlock", onclick="load('` + sample.PGID + `','` + elemCountID + `')")
img(src="`+ sample.icon + `", onclick="loadMobile('` + sample.PGID + `')")
div(class = "contentDiv`+ elemCountID + ` itemContent" )
div(class="contentDivPlaygrond", onclick="loadMobile('`+ sample.PGID + `')")
h3(class="itemLineChild", onclick="loadMobile('`+ sample.PGID + `')") ` + sample.title + `
p(class="itemLineChild") `+ sample.description + `
a(href="`+ sample.doc + `", class="itemLineChildLink childLink", target="_blank") Documentation
a(href="https://playground.babylonjs.com/frame.html`+ sample.PGID + `", class="itemLineChildLink childLink", target="_blank", id="PGlink_` + sample.PGID + `") Playground`;

elemCountID++;
});
});

// Add the "no results for search" field
pugContent +=
`
pugContent +=
`
div(class="categoryContainer" id="noResultsContainer")
p(id="noResults") No results found.`;

// Add the iframe for playground preview
pugContent +=
`
pugContent +=
`
div#parentIframe
div(class='Centerer')
p(style="font-size: 20px") Please, choose an example in the list
img(src='../img/logos/logo-babylonjs.png')
img(src='../img/babylonjs_identity_color.svg')
include includes/footer.pug
script(src='/js/examples.js')
`;

var htmlRender = pug.render(pugContent, { filename:"views/examples.pug", pretty: false, currentUrl: '/' });
var htmlRender = pug.render(pugContent, { filename: "views/examples.pug", pretty: false, currentUrl: '/' });
fs.writeFileSync('public/html/examples/index.html', htmlRender);
logger.info("> examples.html compiled.");
if (done) {
Expand Down
10 changes: 9 additions & 1 deletion typedoc/default/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -865,5 +865,13 @@ input[type=checkbox]:checked + .tsd-widget:before { background-position: -160px
img { max-width: 100%; }

.background-babylon {
background-image: url(/img/pattern_ban_1.png);
background-color: #151221;
height: 100px;
}

.tsd-page-title h1 {
color: #e0684b;
font-size: 28px;
text-transform: uppercase;
font-weight: 100;
}
4 changes: 3 additions & 1 deletion typedoc/default/layouts/default.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
<link rel="shortcut icon" href="/img/favicon.ico">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="https://use.typekit.net/cta4xsb.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.min.css">
<link rel="stylesheet" href="/css/libs/slideout.css">
<link rel="stylesheet" href="/css/libs/highlight/github.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/jquery.perfect-scrollbar/0.6.3/css/perfect-scrollbar.min.css">
<link rel="stylesheet"
href="//cdnjs.cloudflare.com/ajax/libs/jquery.perfect-scrollbar/0.6.3/css/perfect-scrollbar.min.css">
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.10.0/styles/default.min.css">
<link rel="stylesheet" href="{{relativeURL "assets/css/main.css"}}">
Expand Down
1 change: 1 addition & 0 deletions views/includes/header.pug
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ html(style={height: '100%'})
link(rel="shortcut icon", href="/img/favicon.ico")
meta(name="msapplication-TileColor", content="#ffffff")
meta(name="theme-color", content="#ffffff")
link(rel="stylesheet", href="https://use.typekit.net/cta4xsb.css")

link(rel='stylesheet', href='//cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.min.css')
link(rel='stylesheet', href='/css/libs/slideout.css')
Expand Down
Loading

0 comments on commit 0bb15c4

Please sign in to comment.