From 0946fd4b47963a944bacb9ee9f3d1173ed8045dc Mon Sep 17 00:00:00 2001 From: Peli Date: Wed, 18 Mar 2020 15:24:18 -0700 Subject: [PATCH 1/5] port arcade share page style --- docfiles/script-page.css | 147 ++++++++++++++++++++++++++++++ docfiles/script.html | 187 +++++++++++++++++++++++++++------------ docfiles/scripthead.html | 16 ++++ 3 files changed, 293 insertions(+), 57 deletions(-) create mode 100644 docfiles/script-page.css create mode 100644 docfiles/scripthead.html diff --git a/docfiles/script-page.css b/docfiles/script-page.css new file mode 100644 index 000000000000..e96170bdb179 --- /dev/null +++ b/docfiles/script-page.css @@ -0,0 +1,147 @@ +body#root { + font-size: 12pt; + display: flex; + flex-direction: column; +} + +body#root.share-page { + font-family: 'Segoe UI', 'Helvetica Neue', Arial, Helvetica, sans-serif; +} + +body#root.share-page #pagemenu .ui.header { + font-family: 'Segoe UI', 'Helvetica Neue', Arial, Helvetica, sans-serif; + font-weight: 500; +} + +body#root.share-page #pagemenu { + height: 4rem; + min-height: 4rem !important; +} + +body#root.share-page .left.menu { + align-items: center; +} + +body#root.share-page .ui.mini.image.mclogo { + width: 45px; + max-height: 45px; +} + +.page-header { + flex-grow: 0; +} + +.mainbody { + margin-top: 0 !important; + padding-bottom: 0 !important; +} + +#page-header-wrapper { + display: flex; + flex-direction: row; + height: 4rem; + min-height: 4rem !important; +} + +.page-header-item { + display: flex; + height: 100%; + align-items: center; +} + +.page-header-content { + /* aligns with edge of embedded simulator */ + padding-left: 10px; + max-width: 50%; + flex-shrink: 1; +} + +.page-header-content .ui.header { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; +} + +.show-code-toggle { + flex-grow: 1; + padding-left: 1rem; +} + +.no-grow { + flex-grow: 0; +} + +.ui.container.script-content { + display: flex; + flex-direction: column; + flex-grow: 1; +} + +.script-embed { + width: 100%; + padding-left: 0.5rem; + padding-right: 0.5rem; + flex-grow: 1; +} + +.script-bookend { + flex-grow: 0; + margin-left: 0.5rem; + margin-right: 0.5rem; +} + +.script-frame { + width: 100%; + height: 100%; +} + +.script-info { + width: 100%; +} + +#abuse-message { + padding: 0 !important; + margin-bottom: 0.2em; +} + +.ui.header:first-child { + margin-top: 0.2rem !important; +} + +.abuse.content { + color: #333; + padding: 0.5rem; +} +@media only screen and (max-width: 1144px) { + .ui.container.mainbody { + padding-left: 0!important; + padding-right: 0!important; + margin-left: auto!important; + margin-right: auto!important; + } +} + +/* tablet */ +@media only screen and (max-width: 768px) { + body#root.share-page #pagemenu { + height: 2.8rem; + min-height: 2.8rem !important; + } + .ui.container.mainbody, .page-header .ui.container { + margin: 0 !important; + } +} + +@media only screen and (min-width: 769px) { + .ui.container.mainbody, .page-header .ui.container { + padding-left: 1em; + padding-right: 1em; + } + + .mainbody { + margin-top: 0 !important; + margin-bottom: 0 !important; + padding-left: 0 !important; + padding-right: 0 !important; + } +} diff --git a/docfiles/script.html b/docfiles/script.html index 16d43eaa4698..d163492ad7c8 100644 --- a/docfiles/script.html +++ b/docfiles/script.html @@ -2,66 +2,139 @@ - - @name@ - + + @name@ - - + + - - + + - - - - - - - - - -
- - @breadcrumb@ - - -

-
- @title@ - - Edit - -
@humantime@ -
-

-

- @description@ -

- -
-
- -
-
- - @body@ - -
- - - - - - - + + + + + + +
+ +
+
+
+
+

+ The content above is provided by a user, and is not endorsed by Microsoft. + Report abuse if you think it's not appropriate. +

+
+
+
+ + + + + + + +
+
+
+ + +
+
+ + @body@ +
+ + - \ No newline at end of file diff --git a/docfiles/scripthead.html b/docfiles/scripthead.html new file mode 100644 index 000000000000..a3cf6da859de --- /dev/null +++ b/docfiles/scripthead.html @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + From aee7f0a2218f333eb448aa7fde1a8969b0737d75 Mon Sep 17 00:00:00 2001 From: Peli Date: Wed, 18 Mar 2020 15:26:10 -0700 Subject: [PATCH 2/5] always show editor code --- docfiles/script.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docfiles/script.html b/docfiles/script.html index d163492ad7c8..b751f3872154 100644 --- a/docfiles/script.html +++ b/docfiles/script.html @@ -21,7 +21,7 @@

@title@

- - + + + -
- -
-
-
-
-

- The content above is provided by a user, and is not endorsed by Microsoft. - Report abuse if you think it's not appropriate. -

-
-
-
+
+ +
+
+
+
+

+ The content above is provided by a user, and is not endorsed by Microsoft. + Report abuse if you think it's + not appropriate. +

+
+
+
- + - + - -
-
-
+ +
+
+
- -
-
+ +
+
- @body@ -
+ @body@ +
- + + \ No newline at end of file diff --git a/docfiles/scripthead.html b/docfiles/scripthead.html index a3cf6da859de..c3d21d16b669 100644 --- a/docfiles/scripthead.html +++ b/docfiles/scripthead.html @@ -1,8 +1,9 @@ - + - + @@ -13,4 +14,4 @@ + \ No newline at end of file From 332ceeb16fb11742ac228dc95594769f95883704 Mon Sep 17 00:00:00 2001 From: Peli Date: Wed, 18 Mar 2020 15:30:19 -0700 Subject: [PATCH 4/5] add description in head --- docfiles/scripthead.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docfiles/scripthead.html b/docfiles/scripthead.html index c3d21d16b669..c242d419283a 100644 --- a/docfiles/scripthead.html +++ b/docfiles/scripthead.html @@ -1,7 +1,7 @@ - + From e83f2a0b5ddc86d842397c36d496e287d5ef8641 Mon Sep 17 00:00:00 2001 From: Peli Date: Wed, 18 Mar 2020 15:31:56 -0700 Subject: [PATCH 5/5] fix makecode url --- docfiles/script.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docfiles/script.html b/docfiles/script.html index 732ecb0fc07a..a6078478e49c 100644 --- a/docfiles/script.html +++ b/docfiles/script.html @@ -24,7 +24,7 @@

@title@

Edit Code
-