Any way to dump JavaFX FXML UI as a static HTML page? - html

We are building a JavaFX desktop app which is made themeable from the get-go with external CSS files. Now we'd like to give our designers (who are not programmers) some opportunity to tweak the look of the app without having to install JFX, NetBeans and restart the app each time.
Is there some way to dump the static FXML look of the UI as a HTML file of some sort? Basically so that the designer can tweak the CSS and refresh the look with F5.

AFAIK, the Scene Builder supports CSS, so there should be no need to transform FXML to HTML.
Otherwise you could write a XSL script or a Java programm (e.g. using StAX) to do the transformation, but that would be quite a bit of work, I guess.

Related

Get interactive html/css from Adobe XD

I'm using Adobe XD from the first time, I'm working actually on an xd created by a designer to export HTML/CSS scripts to be injected in the web application (Spring boot / JSP)
I've tried with the Adobe plugin Web Export, the static HTML/CSS pages are generated but the UI elements (textfield, checkboxes, radio, buttons...) are not interactive, they are just kind of static forms (rect, svg...)
Is there another way to export the XD to HTML pages much closer to
the expected template ?
Is there any required configuration to be done on the original XD
?
Do I have to rework them all and replace them with the correct
components ?
Am I missing something ?
Thanks a lot in advance
No, you cannot export interactive UI elements from XD. Usually, designers use XD with component libraries, elements from which you can use in the final code.

How can I serve an existing html file through a View in asp.net core mvc?

I've a set of pre-generated html documentation files (provided via an external mechanism). These are fully standalone in their own right, but I'd like to integrate these files into an existing portal.
Ideally, I'd like the existing site to take care of the (common) layout, and simply embed the existing html into this layout. I've been trying to get it to work over the last few hours to no avail.
Problems I've encountered (no specific order):
The pre-generated content already contains html/body/etc. tags (as mentioned, it is standalone documentation in its own right).
Redirection is no use, as it bypasses the view mechanism, losing the common layout.
I'm not really sure how to proceed, as I seem to have exhausted my googling ability on this matter. I'd appreciate any tips or pointers on concepts or terminology surrounding what I'm trying to do - I'm happy to do the leg work investigation as required.
have you tried putting your html files in the wwwroot folder and in the Startup.cs Configure method, add the line app.UseStaticFiles();
If you really need to static *.html use
var htmlString = System.IO.File.ReadAllLines(#"patch/to/your.html");
And then pass it to view and render by #Html.Raw() but i not reccomend this way. Better create partial view and then simply use by #Html.Partial() (official docs)

How to Add Social Sharing Buttons on a static site?

I'm looking to Add social sharing buttons on a static which is having more than 500 Static Pages.
I can add manually but it's very tedious task so looking for an easy way to add.
Is there any Way to get the Permalinks of a Static Site Dynamically I'm thinking to pass it to the Sharing Code so that I can append the URL in the code if there is any way to add a piece of code automatically to all the pages it would be of great help.
Best Regards,
Arpit
You manually have created 500 pages or using php to generate dynamically?
If it is generated dynamically, you can easily add social share plugin to every page.
HTML code for social share by social9.com
https://www.social9.com/get-free-social-share/
...Select "code your own" from the list for HTML Code.
Yes, there is a way.
Use regular expressions in an IDE to find the right places and place the code in the replacing string.
If that's not enough powerful, then write a script, using e.g. Bash in Linux, or Groovy, or I would personally write a simple Java program leveraging the JSoup library.
Lastly, and I would recommend that most, give up maintaining the files manually, and switch to static site generating software, like JBake.
JBake can take your HTML pages and take their content as an input and re-generate the website through templates.

Can I still use `.cshtml` files in a hybrid mobile project?

All the resources use only HTML, but stuff like Cordova and Ionic work on the client, with HTML pages (and JavaScript and CSS of course), and once MVC has served a page, that page is HTML, so the hybrid tooling should be able to use it.
The only problem is that once it's served, it lacks the .html extension, but maybe I can figure a way to add this.
The reason I'd like to stick to .cshtml for my layout is that I can scaffold views from my sever-side view models, and this adds quite a lot of value for me.
If the question is: can you have .cshtml files on your mobile device, the answer is no. .cshtml file is processed on server by the Razor view machine, so plain HTML can be generated. Obviously you don't have MVC, Razor and such on your hybrid ionic app.
You can however work around it by taking your angular templates to be generated on your server by MVC. So, when you setup your templateUrl somewhere, instead of taking the relative path to your local template .html file, you can point to the controller on your server, giving the full path, with http:// and so. The controller will then generate your template for you and return as plain HTML.
Bear in mind, that angular will cache this, so it will be loaded only once.

how to drag and drop css file in eclipse?

I'm new to elipse php. i have used dream viewer for my php development before moving to the eclipse. So, i need to know when i drag and drop the css file into html editor, it needs to auto genarate the <link> tag for that css file. It worked with dream viewer. But its not working with eclipse. And, also when i need to use css classes inside html tag it needs to type the css class name.But, instead that i need to know how to config that to all the css class as suggestion for html tags, like in dream viewer and netBeans.
The text DnD (Drag and Drop) feature (initially introduced by bug 11624 in 2007) has been slowly extended to various editors, as reported by the bug 231294:
Tested in EclipsePdt-2.2.0.v20100427
Verified fixed for:
PHP files
JS files
Still reproducible in:
CSS files
HTML files
XML files (source view)
So it is still "work in progress".
The relevant blocking issues are:
bug 178104: [DND] Need to revisit dnd API to allow multiple drop targets
bug 173405: Make use of IDragAndDropService (Show Votes)
bug 195655: Drag'n'drop selected text
First of all Eclipse is not an IDE, it's a platform you can build IDEs (or any other application). There are several implementations for different languages. Most popular one which is actually the origin of Eclipse is Java IDE. There is also a plugin/feature for PHP development, called PDT.
DreamViewer is a specialized WYSIWYG editor for web development (mostly around HTML/CSS/Javascript) that includes support for different web scripting languages. It has some special properties as you mentioned, that can create a link element when you DnD.
What you can do is request a new feature from PDT team, that creates a link element to the dropped file inside a HTML document.