How to stop certain component from loading when i visit another component - node.js

I am working on a Mern-stack Application, and I want some info inside my App.js to not show when I visit Blog and other components.
Example:
anytime I visit the Blog page, I don't' want my full image slider and other components that I have in my App.js to display, rather I want the contents of that particular component that I visited to display only.

Perhaps you should consider navigation based on URL in your app. You can display specific view basing on URL match.
For example, at the root URL / you display your full image slider and other home page stuff, and when the URL is /blog you display your Blog component.
One really nice and intuitive way to do it in react is using react-router.

Related

Add Custom Page to Side Panel?

I would like to add a custom page to a side panel in Acumatica. For example, if the page redirects automatically to an external website, I want that to be the view the user sees when they load the side panel (without having to click a link through a GI, for example).
Is this doable? Does anyone have specific instructions on how to do it?

Have different header while saving it as a partial

I'm working on NodeJS/Express website using template with Mustache.
I have the header for all pages saved as partial, I want to have a background-color for example on one page and not having it in the home page, can this be possible or should I just make another partial?
Thank you

What is the best way to add a custom 'TLD' to a webview in electron

I have a webview in an electron app that serves webpages via some other elements like an address bar, or the inherent clicking of a link. I am making a browser that serves up real webpages and it works as it should, but I would like to find a way to add a custom TLD to the webview in electron.
e.g. https://kristconsole.kst -> looks up the a record at https://krist.ceriat.net/names/kristconsole, serves the page in the fake 'a' record and masks the url in that 'a' record to kristconsole.kst.
If the 'a' record is https://google.com/ then I want kristconsole.kst to be masked as the url, but I want it to display https://google.com/'s contents.
Perhaps there is some kind of proxy/dns that I can run through electron to add my fictional tld with masking to the site that actually serves the content.
What I have tried: I have tried listening to events on clicking and webpage switching on the webview, but it seems inefficient if there is another method that can just mask the URL.
Any help is very appreciated!
Fisher
EDIT: I should have added more information, the .kst TLD is the only one I want to add, as it is a fictional tld used in a project that me and some friends are doing. How it works is you use the fictional cryptocurrency to 'buy' these .kst domains, and I want to mask them over whatever url the user picks when they register/update the domain name.

Ghost theme static webpage

Right now im starting with my own personal blog, im doing this with Ghost, im developing my own theme based on casper, the blog is also my personal site, so i want to have a static page were i can upload all the reveal.js presentations that i've done (myblog.com/talks), like a list of presentations, right now i have my page-talks.hbs on my theme folder, but i wanna know of how can i upload all the static content from reveal.js, is there any way for doing this?
i've tried putting the html files directly inside the themes folder but i get 404 error when trying to access the url.
In ghost to make a static page, there are 2 important steps you should implement. First, you should create a static page on the admin panel (Click to "New Story"). After this, in the "Post Settings Menu" (by clicking on the gear icon in the top right corner) check the box to "Turn this into a static page". Hit 'Publish'.
Second, create a .hbs file manually in your theme folder with a prefix of "page-" and with the name (title) you choosed in the first step, like: page-your-choosed-name.hbs.
By now you should able to reach your static page, and you can easily fill in the hbs file with content.
Hope this helps!

Keep website url constant when navigating to another page?

I want my site address bar not to change its address when I go to subpages, it should show my index.html, even though I enter tosub pages.
Like if I open www.xyz.com and I navigate to any page it should still show www.xyz.com.
I heard this can be done with .htaccess is it possible?
You really should think about why you want it, because this way of working has a couple of drawbacks with it:
Users can't see they are on a different page
Users can't bookmark your pages for fast access
Users can't share links to eachother
Search Engines may have trouble spidering your side
But basically, there are two main ways to do this:
Use frames. Put the page into a frame, and have all the links stay in this frame.
Use Javascript. Have each page "load" into the current page, using AJAX.

Resources