Skip to content
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

Themes #24

Closed
ShalokShalom opened this issue May 27, 2021 · 8 comments
Closed

Themes #24

ShalokShalom opened this issue May 27, 2021 · 8 comments

Comments

@ShalokShalom
Copy link

So, you say index.html is the main theme, and when I go and look for HTML themes, they are most often also shipped with Javascript and CSS in the process.

Do I just throw them in the same directory with the index.html?

Do they cooperate at all?

@granicz
Copy link
Owner

granicz commented May 27, 2021

Sure, I'd put JS/CSS artifacts in separate subfolders and reference them accordingly from the main template file.

@ShalokShalom
Copy link
Author

How do I do this?

@granicz
Copy link
Owner

granicz commented May 27, 2021

Basically, you can either 1) change the current index.html and add your own styling (CSS) and JS, or 2) take a different HTML theme/template and embed the WebSharper.UI templating markers in it (placeholders, inner templates, event handlers) to fit the F# code (or change the code as per your needs).

@ShalokShalom
Copy link
Author

That doesnt really help me further.

@granicz
Copy link
Owner

granicz commented May 27, 2021

Ok, let's take a step back: tell me what you are doing and what you get that is unexpected, and I will try to help.

@ShalokShalom
Copy link
Author

I dont know, where to fill that in.
CSS and JS in the index.html or the WebSharper specifics into the new HTML stuff.
While I dont know where to start, and what to fill in at which place and so on.

@AngelMunoz
Copy link

AngelMunoz commented Aug 13, 2021

@ShalokShalom I'm just speculating here but
the whole design of the website is defined in the index.html file, it's being used in this line https://github.com/granicz/SiteFi/blob/master/src/Hosted/Main.fs#L125

if you wanted to introduce themes you'd need to provide a different index.html and also update the Main.fs file to match your template with the HTML Holes you may have introduced or changed

Edit:
You could also just switch the index file's contents with different layouts and theming things, without actually changing the HTML wholes and no changes would be needed to the Main.fs file

@ShalokShalom
Copy link
Author

I think I solved this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants