Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 2e1186a4 rédigé par Sting's avatar Sting Validation de Kubat
Parcourir les fichiers

INSTANCE: Basic CSS layout with dummy data

parent 9749546a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
2 requêtes de fusion!3Dev kubat,!1Create basic lib
...@@ -8,10 +8,17 @@ ...@@ -8,10 +8,17 @@
<script src="../style/jquery/jquery-3.5.1.js"></script> <script src="../style/jquery/jquery-3.5.1.js"></script>
<script src="../style/bootstrap-4.5.2-dist/js/bootstrap.min.js"></script> <script src="../style/bootstrap-4.5.2-dist/js/bootstrap.min.js"></script>
<script src="./main.js"></script> <script src="./main.js"></script>
<style>
::-webkit-scrollbar {
display: none;
}
</style>
</head> </head>
<body> <body style="overflow: hidden; height: 100vh;">
<div class="card"> <div class="container-fluid" style="height: 100%; display: flex; flex-direction: column; padding-bottom: 10px">
<div class="card-header text-center"> <div class="row" style="flex-basis: auto; height: 150px;">
<div class="card" style="width: 100%;">
<div class="card-header text-center" style="-webkit-user-select: none; -webkit-app-region: drag;">
<h2 class="text-center"> <h2 class="text-center">
LektorApp Admin Interface LektorApp Admin Interface
</h2> </h2>
...@@ -22,5 +29,15 @@ ...@@ -22,5 +29,15 @@
</button> </button>
</div> </div>
</div> </div>
</div>
<div class="row" style="width: 100%; margin-left: 0px; margin-right: 0px; flex-grow: 1; overflow: hidden; padding-top: 20px; padding-bottom: 20px;">
<div id="karaList" class="col" style="height: 100%; overflow-y: scroll;">
</div>
<div id="playingList" class="col" style="height: 100%; overflow-y: scroll;">
</div>
</div>
</div>
</body> </body>
</html> </html>
const {ipcRenderer} = require('electron'); const {ipcRenderer} = require('electron');
const karaJSON = require('../dummyKaras.json');
window.onload = function(){ window.onload = function(){
const closeApp = document.getElementById("closeButton"); const closeApp = document.getElementById("closeButton");
closeApp.addEventListener('click', () => { closeApp.addEventListener('click', () => {
ipcRenderer.send('close-app') ipcRenderer.send('close-app')
}); });
karaList(karaJSON);
}
function karaList(karas){
var karaList = "";
var playingList = "";
karas.forEach(function(kara) {
if(kara.author_name === "Sting"){
playingList += '<div class="card shadow" style="margin: 5px; border-radius: 10px; margin: 20px 0px 20px 0px;"><div class="card-body">' + kara.source_name + ' - ' + kara.song_name + '</div></div>';
}
karaList += '<div class="card shadow" style="margin: 5px; border-radius: 10px; margin: 20px 0px 20px 0px;"><div class="card-body">' + kara.source_name + ' - ' + kara.song_name + '</div></div>';
});
document.getElementById("karaList").innerHTML = karaList;
document.getElementById("playingList").innerHTML = playingList;
} }
\ No newline at end of file
...@@ -9,8 +9,8 @@ const {ipcMain} = require('electron') ...@@ -9,8 +9,8 @@ const {ipcMain} = require('electron')
function createInstanceWindow () { function createInstanceWindow () {
// Create the browser window. // Create the browser window.
const win = new BrowserWindow({ const win = new BrowserWindow({
width: 800, width: 1280,
height: 600, height: 720,
frame: false, frame: false,
webPreferences: { webPreferences: {
nodeIntegration: true nodeIntegration: true
...@@ -19,7 +19,7 @@ function createInstanceWindow () { ...@@ -19,7 +19,7 @@ function createInstanceWindow () {
// and load the index.html of the app. // and load the index.html of the app.
win.loadFile('instance/index.html'); win.loadFile('instance/index.html');
//win.webContents.openDevTools();
} }
/** Creates the main process for the Express app /** Creates the main process for the Express app
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter