Skip to content

Screen size warning #549

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,9 @@ addons/godot-plugin-refresher
# Exports
build/**/

#custom downloaded templates
templates/*
???custom-templates.zip

# Local user overrides
override.cfg
2 changes: 1 addition & 1 deletion html_export/index_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<div class="layer mobile-only" id="mobile-warning">
<div class="mobile-warning-modal notices">
<p>
You appear to be using a mobile browser. This application is not
Your browser window seems to be too narrow. This application is not
suitable for small screens and portrait orientation. If you want to
continue, it's at your own risk!
</p>
Expand Down
5 changes: 3 additions & 2 deletions html_export/static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ body {
.notices {
font-family: "Noto Sans", "Droid Sans", Arial, sans-serif;
color: #3b3943;
width: 640px;
max-width: 640px;
padding: 3em;
margin: 1em;
background: #fdfdfd;
box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22);
}
Expand Down Expand Up @@ -180,7 +181,7 @@ body {
display: none;
}

@media (orientation: portrait), (max-aspect-ratio: 4/3), (max-width: 750px) {
@media (orientation: portrait), (max-width: 700px), (max-height: 400px) {
.mobile-only {
display: flex;
}
Expand Down
21 changes: 20 additions & 1 deletion run
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@


APP_NAME="learn_to_code"
# This is used while developing to supply the `GODOT_VERSION` variable that is
# normally provided by the CI
local_godot_version=${GODOT_VERSION:-"3.4.4"}


######################################## HELP
Expand Down Expand Up @@ -363,6 +366,11 @@ push_all(){

prepare_ci_copytemplates(){
if [ "$1" == "help" ]; then
echo "-- DEPRECATED --"
echo "Do not use this, use gettemplates instead"
echo "We need to download custom templates to enable offline GDScript error reporting"
echo "Once/if this is merged in master, we can use copytemplates again"
echo "----------------"
echo "Prepares the CI by copying the template from the docker"
echo "You should not run this on your local computer"
echo "cannot run in dry mode"
Expand All @@ -385,7 +393,6 @@ prepare_ci_copytemplates(){
prepare_ci_gettemplates(){
if [ "$1" == "help" ]; then
echo "Prepares the CI by getting the custom templates online"
echo "You should not run this on your local computer"
echo "cannot run in dry mode"
exit 0
fi
Expand Down Expand Up @@ -499,6 +506,18 @@ prepare_htmltemplate(){
}


prepare_local(){
# TODO: remove this if/when prepare_ci_gettemplates becomes unecessary
if [ "$1" == "help" ]; then
echo "Downloads the custom templates locally"
echo "Necessary before any export"
echo "cannot run in dry mode"
exit 0
fi
GODOT_VERSION="$local_godot_version" prepare_ci_gettemplates
}


######################################## BOOTSTRAP


Expand Down