How to build persistent element like facebook chatbar which not reload when navigate to any page? - css-position

i developed a radio stations widget (see it at my site). the problem is, i dont know how to make it persistent same like on the http://josephbeeson.com/gwapdemo/gwap.html . it's like facebook chatbar which not reload when navigate to any page. i have try n look for the demo codes but still not understand. please give step by step tutorial. i want to implement it on my social website http://www.heypy.com.

The whole page does not get reloaded, the new content is just loaded via AJAX and displayed within the current document.
To make it look to the user like he’s navigated to some other URL, the address bar content is updated using the HTML5 History API.
please give step by step tutorial.
Happy to give you the relevant keywords, so you can do research on them yourself. But won’t provide a private tutorial here, that’s not the purpose of this site. Thanks for your understanding.

Related

Reason SPA pages are refreshing?

Just finished learning Vuejs and after visiting a few websites that use Vuejs like;
a) https://coderstape.com
b) https://www.thenetninja.co.uk
c) https://laracasts.com
I noticed that by navigating around the websites we by clicking on navbar links and some other links then the pages refresh and I haven't been able to find out the reason online. Could someone kindly explain what's happening in that? Doesn't it go against the purpose of SPA?
For example the last site you specified: https://laracasts.com.
On its main page there is a white button "BROWSE COURSES". If you open Chrome DevTools panel(look at the picture with explanations), go to tab "Networks" (1) and then click on this white button, you can see GET request to "series?curated" (2). If you open its details, you can see that as response, new page is received in the form of an HTML code (3), not JSON for example, as is usually the case in SPA.
Also, if you look at what programming language is used on this site, for example, using service https://whatcms.org/?s=laracasts.com, you can see that this is a PHP, namely Laravel.
From all this, I can make the assumption that they use Vue.js only partially, maybe in several components, but the site navigation itself is presented in the form of traditional static pages, which is why the page reloads.
Also, for example, if you take a look at this website https://www.spendesk.com/, you can see that they use Vue.js+Nuxt.js, as well as Node.js, as indicated by service whatcms.org, and if you try to navigate to various pages on this site, you will see no page loading. I can say that this site is a true SPA in the form in which you mean it.
I heard that you can do a SPA with a Laravel backend, but I think that's another story.

Branch.io: Is there a way to specify which page a branch banner can appear on in a single page app?

I am using a branch.io banner via the branch.io SDK on a site that is a single page app.
Branch has a feature where it lets you specify the urls where the banner will appear.
The problem is because my site is a single page app, branch appears to fail to recognize page changes, and which page is actually being viewed.
is there any way to configure branch smart banners to slow on specific pages when using it on a single page app, or am I out of luck?
Jackie from Branch here.
Here's how we support single page web apps.
Close the current Journey: https://docs.branch.io/pages/web/journeys/#closing-a-journey-programmatically
Trigger to show the Journey: https://docs.branch.io/pages/web/journeys/#trigger-a-journey-to-show-by-firing-an-event
Set deep link data(https://docs.branch.io/pages/web/journeys/#deep-linking-from-the-banner-or-interstitial) - this is only required if custom key-value pairs are used. With Canonical URL, Branch handles this at its end.
As a point of reference, feel free to take a look at our example single app, using the above features: https://mikekwon36.github.io/owners_testpage
Hope this helps!

Flattr button only shown after page reload

I've followed the instructions in here to add an embedded flattr button to my site but it's only being shown after reloading the page. This is the page: http://nipanipa.com/en/donations/new. Actually, if you visit that url directly, the button will be shown but if you visit it throught the "Donate" link in the header it will not! I get this behaviour in both Firefox and Chromium.
What am I missing? Probably this has something to do with my poor knowledge of javascript... :S
Thanks a lot!!
Your website (or framework if you are using one) is bundling all javascripts in to one neat package that is only loaded on the first page load. The flattr javascript is automatically triggered onLoad, but unless you are actually on the donate page during the initial page load, there will be no flattr button to initialize.
One way of solving this is to call FlattrLoader.setup() somewhere on the Donation page.
But since you are only interested in having one Flattr button for one url there is a much easier way to add it.
Remove all Flattr related code from your source code and then use the embed tool to generate the button specific html/javascript and paste that code where you want the button to appear.
Hope this helps :)

Modifying photosphere on website thing

What i am trying to do is to use a photosphere on my website so that it shows up on full screen as a website cover page. The problem is the the code to embed a photosphere in a webpage given here by google
https://developers.google.com/photo-sphere/web/
lets only the photosphere size to be hardcoded as
displaysize="600,400"
what ever the values but its still hardcoded. What i want is that it gets adjusted to the screen of the user and gets displayed in the whole browser window. Any one got an idea how to pull it off? I didn't find any stuff about 'photosphere on web' other than the google link i gave above.
Indeed the API is currently designed to take static values. I think it's a good point that users might want to set the dimensions to 100% and let it resize dynamically.
I put it on the TODO list and will try to get to it shortly.
In the meantime, one work around is the following: After the viewer loads you will find an iframe on the page which contains it. You can change it's dimensions dynamically to your liking and the viewer should adapt.
The API provided by Google wraps the whole photosphere in layers of iFrames.
You can use the API to request a certain photosphere but only use the response to parse it for the values you need. Then you create your own request and the result can be shown fullscreen.
An example link is this
I created this link dynamically from the JSON response from the elements
media$group media$content 0 url
Hope it helps.
Can't you take the raw image and just use webgl to project it on the inside of a sphere?

The ted.com twitter widget?

On all the videos on ted, there is a widget thing with an inputfield that says tweet this (we'll add the url later) you put stuff in a box, it get's a tiny-url and get's pushed to facebook.
I'm trying to figure out what it's called. Does anyone have a clue?
example:
http://www.ted.com/talks/dan_phillips_creative_houses_from_reclaimed_stuff.html
Looks like they are using the service provided by AddThis. Looking at their site, they offer some stock sharing links, but also have an API for creating more advanced ones.