I recently started moving from DBA to SysAdmin, so I am very new to everything, please pardon if this is a stupid question.
I have figured most of the widgets out in Dashing, but I can not understand what what comments widget does, or how to feed data to it.
All the others are working properly and data being fed via bash and ruby.
If anyone can clarify what to send to it it would be hugely appreciated.
It is for twitter as it is stated in the widget: "Tweets tagged with #todayilearned"
# sampletv.erb
<li data-row="1" data-col="1" data-sizex="2" data-sizey="1">
<div data-id="twitter_mentions" data-view="Comments" style="background-color:#ff9618;" data-moreinfo="Tweets tagged with #todayilearned"></div>
<i class="icon-twitter icon-background"></i>
</li>
Related job script is jobs/twitter.rb also you can check in github: https://github.com/Shopify/dashing/blob/master/templates/project/jobs/twitter.rb
data-id is twitter_mentions, it was matched, due to environment, I can't test it so far.
Related
The thing is that I have two routes
/istifta and /istifta/edit
The /istifta route displays istiftas (questions) while /istifta/edit route opens up a panel for editing questions on the same page due to same _layout.svelte file.
The only problem is that when I access /istifta/edit from /istifta. It not only opens up the editing panel but also scrolls to the top of page. How can I stop this behavior? I want to remain on the same scroll position upon this navigation. The istiftas is a long list. For editing it should remain on the same scroll position. Scrolling to bottom again and again and finding ids is overly complicated for the user.
Please solve this. Specially, Rich Harris, if you are reading this.
We really should get round to documenting this, but if you add a sapper-noscroll attribute to an <a> tag, it will prevent that behaviour:
<!-- in src/routes/istifta/index.svelte -->
<a href="istifta/edit" sapper-noscroll>edit</a>
"sapper": "^0.27.9"
sapper-noscroll not working for me
blogs
blogs/index.svelte
<a sapper-noscroll href="blogs/1">Go to Blog 1</a>
<a sapper-noscroll href="blogs/2">Go to Blog 2</a>
<a sapper-noscroll href="blogs/3">Go to Blog 3</a>
<a sapper-noscroll href="blogs/4">Go to Blog 4</a>
...
...
<a sapper-noscroll href="blogs/100">Go to Blog 100</a>
blogs/[slug].svelte
Go Back to Blogs
<h1> Blog details<h1>
still it scrolls to the top when I go back to Blogs page from Blog Details page. Am I missing something?
it's 2020 and it looks like things have changed by one char since Rich's answer.
sapper-noscroll didn't work for me, but sapper:noscroll did.
Sapper docs on the subject
This has been changed with the release of SvelteKit
To prevent scrolling on click, it is now <a href="path" data-sveltekit-noscroll>Path</a>
Docs:
https://kit.svelte.dev/docs/link-options#data-sveltekit-noscroll
to display and style my tweets on my website I use somethiong like this code:
<a
class="twitter-timeline"
href="https://twitter.com/YourNickname"
data-widget-id="xxxxxxxxxxxxxxxxxxx" <!--you will haveyour own number http://stackoverflow.com/questions/16375116/what-is-data-widget-id-in-twitter-api-how-i-can-get-the-data-widget-id-->
data-chrome="noheader nofooter noborders noscrollbar transparent" <!--tweak these for the looks-->
data-tweet-limit="5"
data-link-color="#FFFFFF"
data-border-color="#FFFFFF"
lang="EN" data-theme="light" <!--light or dark-->
height="447"
width="255"
data-screen-name="yourName"
data-show-replies="false"
data-aria-polite="assertive">
Tweets by #YourName
</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
I'm looking for a way to remove images in case they are twitted.
Looking for a solution I've found this:
https://dev.twitter.com/discussions/19073
They suggest to add a line
data-src-2x="false"
to my code.
This solution, sadly, doesn't seem to work for me.
If any of you have solved this problem, a hint would be much appreciated!
Cheers!
The following answer is no longer relevant due to recent changes by twitter!
In the configuration options when creating the widget there is a checkbox labeled 'auto expand photos'. Uncheck this, but be aware it takes
I am trying to learn EmberJs, in conjuction with Laravel 4, to create a blog. Things have been going great, stuff hasn't been too difficult yet. But I got into a snag when trying to have a <img/> tag in one of my handlebar templates.
From my understanding to use info from a model in a template you use {{attribute_name}} and like magic, it's there! And so for my tag I was trying something like:
<img src="{{URL::asset('images/posts/')}}#{{id}}.#{{image_extension}}" }}" alt=""/>
Adding the url to images with Laravel and Blade, then on the template, just adding in those last little pieces to make the it all work. But I get this instead:
<img src="http://localhost/blog/images/posts<script id='metamorph-11-start' type='text/x-placeholder'></script>26<script id='metamorph-11-end' type='text/x-placeholder'></script>.<script id='metamorph-12-start' type='text/x-placeholder'></script>jpg<script id='metamorph-12-end' type='text/x-placeholder'></script>" alt="">
Obviously theres script tags in my src tag and this is causing some issues.
Now then, upon much research I discovered {{unbound attribute_name}} and came up with:
<img src="{{URL::asset('images/posts')}}/#{{unbound id}}.#{{unbound image_extension}}" alt=""/>
and while this works on the first blog post I click, it doesn't switch images when I switch posts. So is there a way to make this guy work? I'm running out of ideas! Any information you could shed on this would be great! I really like ember so far and want to get even better! IF there's any more info you need, let em know and I will edit this question! Thanks so much!
EDIT:
Based on the advise from #buruzaemon, I tried
<img src="{{URL::asset('images/posts')}}/#{{bind-attr src=id}}.#{{bind-attr src=image_extension}}" alt="Post image"/>
and it feels like it's on the right path, but not quite there. Any more advice?
Perhaps you should have a look at bind_attr in Ember.js. It will allow you to set the src attribute properly with value that can be set in your controller.
How would I go about doing this? Putting the following code into the
Markdown generator
gives me the desired output
<div style="float: left"><img src="http://ompldr.org/vaDU5NQ/scrotter.png"/>
</div>
I'm trying not to, kid. Don't act so surprised, Your Highness. You weren't
on any mercy mission this time. Several transmissions were beamed to this
ship by Rebel spies. I want to know what happened to the plans they sent
you. Kid, I've flown from one side of this galaxy to the other.
I've seen a lot of strange stuff, but I've never seen anything to make me
believe there's one all-powerful Force controlling everything.
However, adding this code to my README.md file makes it an inline image instead
of floating.
How could I work around this? Is it a Github bug?
I know this thread's old, but for anyone interested, you can use <img align="left" src="img.jpg"> and <img align="right" src="img.jpg"> to float images on GitHub.
I believe it is a security issue with GitHub. My understanding is they strip all HTML attributes such as style with the execption of perhaps href.
I want to refresh with ajax just a part of a site.I searched protorypjs and i found ajax.updater but i am having trobule making it work.
this is part of my page
<li id="Home">Home</li>
Can anyone tell me how i can implement this : Ajax.Updater(container, url[, options]) ?
and make it work?
I linked prototype.js in the html.
One solution to update content is by using
$('#refreshMe').innerHtml(_new_ajax_content_);
where element is i.e. a
<div id="refreshMe">
If you want more specific help, you should post more information/code from your project.
thank you for the help. i made it work
here is what i wanted to do :)
<li id="Servicii"><a href=# onclick="new Ajax.Updater('container', 'servicii.html',
{asynchronous:true});">Servicii