Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
bobanum committed Aug 15, 2020
0 parents commit 35f0570
Show file tree
Hide file tree
Showing 7 changed files with 153 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# https://git-scm.com/docs/gitignore
# https://help.github.com/articles/ignoring-files
# Example .gitignore files: https://github.com/github/gitignore
/bower_components/
/node_modules/
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
*.css.map
/.vscode/
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# application-base
Application de base pour débuter un projet

## Description
Description à venir

## Particularités

- Compléter

## Variantes et ajouts possibles

- Compléter
Binary file added favicon.ico
Binary file not shown.
18 changes: 18 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8"/>
<title>Application Javascript</title>
<link rel="stylesheet" href="./src/style.css"/>
<script type="module">
import App from "./src/App.js";
</script>
</head>
<body>
<div id="interface">
<header><h1>Application Javascript</h1></header>
<footer><span>&copy; 2020</span><strong>Application Javascript</strong></footer>
<div class="body" id="app">Le HTML créé par programmation devrait apparaître ici.</div>
</div>
</body>
</html>
23 changes: 23 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* @module App
*/
export default class App {
/**
* Méthode principale. Sera appelée après le chargement de la page.
*/
static main() {
console.log("Je suis prêt");
var app = document.getElementById("app");
// app.innerHTML = "La page est chargée";
}
/**
* Méthode qui permet d'attendre le chargement de la page avant d'éxécuter le script principal
* @returns undefined Ne retourne rien
*/
static init() {
window.addEventListener("load", () => {
this.main();
});
}
}
App.init();
51 changes: 51 additions & 0 deletions src/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions src/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
html {
height: 100%;
font-size: 16px;
font-family: arial;
}
body {
height: 100%;
margin: 0;
}
#interface {
min-height: 100%;
display: grid;
grid-template-rows: auto 1fr auto;
& > header, & > footer {
padding: .5em 1em;
background-color: #EEE;
display: flex;
justify-content: space-between;
}
& > header {
order: -1000;
h1 {
margin: 0;
}
}
& > footer {
order: 1000;
font-size: smaller;
}
}

#app {
padding: 1em;
}

0 comments on commit 35f0570

Please sign in to comment.