diff --git a/src/Mod/Start/StartPage/CMakeLists.txt b/src/Mod/Start/StartPage/CMakeLists.txt index ef969cf37d..44de6556f8 100644 --- a/src/Mod/Start/StartPage/CMakeLists.txt +++ b/src/Mod/Start/StartPage/CMakeLists.txt @@ -26,6 +26,12 @@ SET(StartPage_ImageResources images/installed.png images/new_file_thumbnail.svg images/settings.png + images/new_empty_file.png + images/new_import_file.png + images/new_parametric_part.png + images/new_csg_part.png + images/new_2d_draft.png + images/new_architecture.png ) SET(StartPage_Resources diff --git a/src/Mod/Start/StartPage/LoadNew.py b/src/Mod/Start/StartPage/LoadNew.py index f373ce6fee..83b86c4542 100644 --- a/src/Mod/Start/StartPage/LoadNew.py +++ b/src/Mod/Start/StartPage/LoadNew.py @@ -21,8 +21,37 @@ import FreeCAD import FreeCADGui - -FreeCADGui.runCommand('Std_New') - from StartPage import StartPage -StartPage.postStart() + +# template will be given before this script is run +template_name = str(template) + +match template_name: + case "empty_file": + FreeCADGui.runCommand('Std_New') + StartPage.postStart() + case "import_file": + FreeCADGui.runCommand('Std_New') + StartPage.postStart() + FreeCADGui.runCommand("Std_Import") + case "parametric_part": + FreeCADGui.runCommand('Std_New') + FreeCADGui.activateWorkbench("PartDesignWorkbench") + FreeCADGui.runCommand("PartDesign_Body") + FreeCADGui.Selection.addSelection('Unnamed','Body') + FreeCADGui.runCommand('PartDesign_NewSketch',0) + FreeCADGui.Selection.clearSelection() + StartPage.postStart(False) + case "csg_part": + FreeCADGui.runCommand('Std_New') + FreeCADGui.activateWorkbench("PartWorkbench") + StartPage.postStart(False) + case "2d_draft": + FreeCADGui.runCommand('Std_New') + FreeCADGui.activateWorkbench("DraftWorkbench") + FreeCADGui.runCommand("Std_ViewTop") + StartPage.postStart(False) + case "architecture": + FreeCADGui.runCommand('Std_New') + FreeCADGui.activateWorkbench("ArchWorkbench") + StartPage.postStart(False) diff --git a/src/Mod/Start/StartPage/StartPage.css b/src/Mod/Start/StartPage/StartPage.css index e39c563024..46720d94cd 100644 --- a/src/Mod/Start/StartPage/StartPage.css +++ b/src/Mod/Start/StartPage/StartPage.css @@ -1,4 +1,4 @@ -html{ +html { height: 100%; display: flex; flex-direction: column; @@ -11,49 +11,63 @@ body { font-size: FONTSIZE; height: 100%; } -OVERFLOW -a, a:link, a:visited { + +OVERFLOW +a, +a:link, +a:visited { text-decoration: none; color: LINKCOLOR; font-weight: bold; } + h1 { width: 100%; text-align: center; } + h2 { text-align: center; clear: both; + padding-top: 15px; } + hr { height: 20px; border: none; } + .hidden { display: none; } + .version { font-size: 0.8em; float: right; padding-right: 10px; } + .settingsicon { width: 16px; height: 16px; margin-left: 20px; - vertical-align:middle; + vertical-align: middle; } + .container { margin: 2%; height: 95%; } + ul.tabs { margin: 9px 0; } + ul.tabs li { list-style: none; display: inline; } + ul.tabs li a { color: TEXTCOLOR; background-color: BOXCOLOR; @@ -62,22 +76,26 @@ ul.tabs li a { font-size: 1em; font-weight: bold; text-transform: uppercase; - border:1px solid BOXCOLOR; + border: 1px solid BOXCOLOR; border-radius: 3px 3px 0px 0px; box-shadow: #445 0 -5px 5px; outline: 0; } + ul.tabs li a:hover { background-color: TEXTCOLOR; color: BASECOLOR; border-color: TEXTCOLOR; } -ul.tabs li a.active, ul.tabs li a.active:hover { + +ul.tabs li a.active, +ul.tabs li a.active:hover { color: TEXTCOLOR; background-color: BASECOLOR; border-bottom: 1px solid BASECOLOR; border-color: BASECOLOR; } + .panel { background: BASECOLOR; color: TEXTCOLOR; @@ -88,9 +106,11 @@ ul.tabs li a.active, ul.tabs li a.active:hover { overflow: auto; box-shadow: SHADOW 0 2px 5px; } + ul.icons { clear: both; } + .icon { list-style: none; display: inline; @@ -104,32 +124,76 @@ ul.icons { box-shadow: SHADOW 0 0px 6px; word-wrap: break-word; } + .icon h4 { margin: 3px 0; max-width: 90%; } + .icon img { width: 128px; height: 128px; } + .icon p { margin: 0; } + .caption { clear: both; } -a .caption, a .caption:link, a .caption:visited { - color: TEXTCOLOR; - text-decoration-color: TEXTCOLOR; -} .caption p { font-weight: normal; } +a .caption, +a .caption:link, +a .caption:visited { + color: TEXTCOLOR; + text-decoration-color: TEXTCOLOR; +} + +.icon-new-template { + list-style: none; + display: flex; + align-items: center; + float: left; + padding: 5px 10px; + width: 235px; + height: 70px; + background: BOXCOLOR; + border-radius: 3px; + margin: 10px; + box-shadow: SHADOW 0 0px 6px; + word-wrap: break-word; +} + +.icon-new-template a { + display: flex; +} + +.icon-new-template h3 { + margin: 3px 0; + max-width: 90%; + text-align: left; + margin-bottom: 5px; +} + +.icon-new-template img { + width: 64px; + height: 64px; + margin-right: 10px; +} + +.icon-new-template p { + margin: 0; +} + .docbox a:hover { text-decoration: underline; } + .docbox { float: left; padding: 10px; @@ -139,63 +203,88 @@ a .caption, a .caption:link, a .caption:visited { margin: 10px; box-shadow: SHADOW 0 0px 6px; } + .docbox h2 { text-align: center; } + .docbox img { max-width: 24px; max-height: 24px; } + .forum img { max-width: 100% !important; max-height: 100% !important; } + .allwidth { max-width: 98%; } + h3 a { height: 32px; vertical-align: middle; padding-bottom: 18px; padding-left: 5px; } + #commits ul { margin: 30px 0; } -#commits ul li, .forum ul li { + +#commits ul li, +.forum ul li { margin-bottom: 10px; } + .footnote { text-align: center; - display: block; /* footnote tips display */ + display: block; + /* footnote tips display */ clear: both; padding-top: 10px; } -ul.workbenches, ul.addonslist { + +ul.workbenches, +ul.addonslist { overflow: hidden; padding: 10px; } -ul.workbenches li, ul.addonslist li { + +ul.workbenches li, +ul.addonslist li { list-style: none; float: left; display: inline; width: 50%; } + .forum { - display: none; /* forum display */ /* don't change this line */ + display: none; + /* forum display */ + /* don't change this line */ } + .forum pre { white-space: pre-wrap; } + .thumbnails { float: left; - width: 100%; /* thumbs display */ /* don't change this line */ + width: 100%; + /* thumbs display */ + /* don't change this line */ } + .notes { - display: none; /* notes display */ /* don't change this line */ + display: none; + /* notes display */ + /* don't change this line */ float: right; width: 30%; } + #notepad { width: 95%; height: 100%; @@ -209,13 +298,13 @@ ul.workbenches li, ul.addonslist li { .iframe { - display:block; + display: block; margin: auto; text-align: center; - width:50%; - height:100%; + width: 50%; + height: 100%; } .iframecontainer { - height:90%; + height: 90%; } \ No newline at end of file diff --git a/src/Mod/Start/StartPage/StartPage.html b/src/Mod/Start/StartPage/StartPage.html index 12c6ab2446..fa3c7af324 100644 --- a/src/Mod/Start/StartPage/StartPage.html +++ b/src/Mod/Start/StartPage/StartPage.html @@ -1,163 +1,170 @@ - - T_TITLE - - - - - - -
-
-
- VERSIONSTRING - - T_VTOOLTIP - -
-
- -
-
- - SECTION_RECENTFILES - -
- T_TIP: T_ADJUSTRECENT
-
- - SECTION_EXAMPLES - - SECTION_CUSTOM - -
- T_CUSTOM -
- -
- -
- -

T_NOTES

- - - -
- -
- - -