mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2025-03-22 14:26:11 +00:00
parent
71c30990e4
commit
aa416d8065
3 changed files with 7 additions and 16 deletions
|
@ -1,7 +1,6 @@
|
||||||
use crate::common::consts::get_menu_from_url;
|
use crate::common::consts::get_menu_from_url;
|
||||||
use crate::common::*;
|
use crate::common::*;
|
||||||
use crate::events::{Event, EVENT_QUEUE};
|
use crate::events::{Event, EVENT_QUEUE};
|
||||||
use crate::mkdir;
|
|
||||||
use crate::training::frame_counter;
|
use crate::training::frame_counter;
|
||||||
use ramhorns::Template;
|
use ramhorns::Template;
|
||||||
use skyline::info::get_program_id;
|
use skyline::info::get_program_id;
|
||||||
|
@ -58,13 +57,11 @@ pub unsafe fn write_menu() {
|
||||||
// From skyline-web
|
// From skyline-web
|
||||||
let program_id = get_program_id();
|
let program_id = get_program_id();
|
||||||
let htdocs_dir = "training_modpack";
|
let htdocs_dir = "training_modpack";
|
||||||
let menu_dir_path = Path::new("sd:/atmosphere/contents")
|
let menu_html_path = Path::new("sd:/atmosphere/contents")
|
||||||
.join(&format!("{:016X}", program_id))
|
.join(&format!("{:016X}", program_id))
|
||||||
.join(&format!("manual_html/html-document/{}.htdocs/", htdocs_dir));
|
.join(&format!("manual_html/html-document/{}.htdocs/", htdocs_dir))
|
||||||
|
.join("training_menu.html");
|
||||||
|
|
||||||
let menu_html_path = menu_dir_path.join("training_menu.html");
|
|
||||||
|
|
||||||
mkdir(menu_dir_path.to_str().unwrap().as_bytes().as_ptr(), 777);
|
|
||||||
let write_resp = fs::write(menu_html_path, data);
|
let write_resp = fs::write(menu_html_path, data);
|
||||||
if write_resp.is_err() {
|
if write_resp.is_err() {
|
||||||
println!("Error!: {}", write_resp.err().unwrap());
|
println!("Error!: {}", write_resp.err().unwrap());
|
||||||
|
|
|
@ -68,10 +68,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-content {
|
.tab-content {
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-evenly;
|
margin-left: 3%; /* Workaround for "centering" menu items since justify-content: center doesn't work */
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
@ -80,13 +79,7 @@ body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Overwrite padding from keyword stuff. */
|
.header {
|
||||||
.l-main-content {
|
|
||||||
padding: 0px 0px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Handle alignment of items in the header */
|
|
||||||
.l-header {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -190,6 +183,7 @@ body {
|
||||||
/* Container div for menu link and menu list */
|
/* Container div for menu link and menu list */
|
||||||
width: 30%;
|
width: 30%;
|
||||||
margin: 6px;
|
margin: 6px;
|
||||||
|
padding: 0px 8px 0px 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-button, .menu-item > div button {
|
.menu-button, .menu-item > div button {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<script defer src="./js/training_modpack.js"></script>
|
<script defer src="./js/training_modpack.js"></script>
|
||||||
<div class="l-header">
|
<div class="header">
|
||||||
<a id="ret-button" tabindex="-1" class="return-icon-container" href="javascript:goBackHook();">
|
<a id="ret-button" tabindex="-1" class="return-icon-container" href="javascript:goBackHook();">
|
||||||
<img class="return-icon" src="./img/m_retnormal.svg">
|
<img class="return-icon" src="./img/m_retnormal.svg">
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Add table
Reference in a new issue