align badges to the right in github README using Markdown - badge

am translating a github readme file from English to Arabic,
while doing that i faced a problem where i can't algin this following badge form the left to the rghit
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on-ar.png"
alt="Get it on F-Droid"
height="70">](https://f-droid.org/packages/com.junkfood.seal/)
can anyone help me

You can add <div align= "right"></div> like this:
<div align="right">
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on-ar.png" style="text-align: right" alt="Get it on F-Droid" height="70">](https://f-droid.org/packages/com.junkfood.seal/)
</div>

Related

Scraping based on "nested property"

After having created a few different spiders I thought I could scrape practically anything, but I've hit a roadblock.
Given the following code snippet:
<div class="col-md-4">
<div class="tab-title">Homepage</div>
<p>
<a target="_blank" rel="nofollow"
href="http://www.bitcoin.org">http://www.bitcoin.org
</a>
</p>
</div>
How would you go about selecting the link that is in within <a ... </a> based on the text within the tab-title div?
The reason that I require that condition is because there are several other links that fit this condition:
response.css('div.col-md-4 a::attr(href)').extract()
My best guess is the following:
response.css('div.col-md-4 div.tab-title:contains("Homepage") a::attr(href)').extract()
Any insights are appreciated! Thank you in advance.
Note: I am using Scrapy.
How about this using XPath:
response.xpath('//div[#class="tab-title" and contains(., "Homepage")]/..//a/#href')
Find a div with class tab-title which contains Homepage inside, then step up to the parent and look for a child on any level.
EDIT:
Using CSS, you should be able to do it like this:
response.css('div.tab-title:contains("Homepage") ~ * a::attr(href)')

How to create a windows 8 like menu using ionic framework

I am trying to create a tile like menu for my mobile application which should look like the main menu on windows 8. I am using the ionic framework version 1.0.0. Please can anyone give me pointers on how to implemeny this.
2018 Update:
Use CSS Grid. You can use a feature query (#supports) to provide a backup for browsers that don't support Grid currently, taking advantage instead of flexbox. Alternatively, you could use the built-in Ionic grid and use a feature query to override the ionic styles using CSS Grid.
For example:
#supports (display: grid) {
ion-content {
display: grid;
}
}
I know this question is about ionic framework. When i tried for a similar application which gives windows 8 look i used Gridster.js. have a look into it. If you find it helpful use it. gridster
you can Use card Imaged from Ionic
<div class="list card">
<div class="item item-avatar">
<img src="avatar.jpg">
<h2>Pretty Hate Machine</h2>
<p>Nine Inch Nails</p>
</div>
<div class="item item-image">
<img src="cover.jpg">
</div>
<a class="item item-icon-left assertive" href="#">
<i class="icon ion-music-note"></i>
Start listening
</a>
</div>
here is the Link
Ionic Card Images
but Gridster is a pretty neat solution

How can I download the files using AngularJS?

I want to list all the files in <a></a> when clicking it we need to download it from the corresponding folder.
I tried the following code
<div ng-repeat="file in files">
<a download="{{file.name}}" href="/path of the file">{{file.name}}</a>
</div>
How can I achieve this?
Can anyone help me?
If you have an anchor tag that you'd like to not be processed by angular, you'll need to use target="_self" or some other valid target.
See the $location documentation
This should work for you:
<div ng-repeat="file in files">
<a target="_self" download="{{file.name}}" href="/path of the file">{{file.name}}</a>
</div>
Another option may be to use the full path to the filename, but this doesn't seem to work in every case.
Here's a plunker with examples.

ckeditor strips <span> and style attributes

I have a Drupal 7 site using ckeditor 4.2. I've created a basic page node and put a span inside an h2 heading in the body. I hard coded it in the html view. It looks fine but if I go back to edit the page, my has gotten stipped out of the html and also any style="" I've put into the html also. I've looked at the ckeditor config and text-formats. I've set the only formats allowed to be text and full html so I'm not using filtered at all. What gives? I've used the editor many times before but probably not this version.
If you are using the CKeditor module then there is an option in Advanced Options that is also mentioned in the module homepage where you should set:
config.allowedContent = true;
None of the above solutions worked for me. What I found was that CKEditor was removing empty <span> tags from the HTML. For example:
<div class="section-heading">
<span class="sep-holder-l"><span class="sep-line"></span></span>
<h4>Section Header</h4>
<span class="sep-holder-r"><span class="sep-line"></span></span>
</div>
Would yield:
<div class="section-heading">
<h4>Section Header</h4>
</div>
However, if I added a non-breaking space in the innermost <span>, CKEditor didn't edit the HTML:
<div class="section-heading">
<span class="sep-holder-l"><span class="sep-line"> </span></span>
<h4>Section Header</h4>
<span class="sep-holder-r"><span class="sep-line"> </span></span>
</div>
Hopefully that helps someone out there!
In Drupal 7 there's no automatic synchronization between CKEditor's filter (called the Advanced Content Filter) and Drupal's filter. As I understand you configured latter one, but not the first one. See config.extraAllowedContent.
CKEditor 4.+ will remove any empty tags it finds which are in CKEDITOR.dtd.$removeEmpty as part of the HTML parsing process.
See this answer for a hack to avoid it.

Bug jQuery mobile in a href + document.write

I want to use i18n translation plugin (http://code.google.com/p/jquery-utils/wiki/I18N) for translation of web app.
Is it mobile site: if I am trying:
<div data-role="header">
<h1><script type="text/javascript">document.write($.i18n('appTranslate', 'footer')); </script></h1>
</div>
everything is O.K.
But if I want to add translation to a href
<div data-role="content">
<ul data-role="listview">
<li><script type="text/javascript">document.writeln('footer'); </script></li>
<li><script type="text/javascript">document.writeln('footer'); </script></li>
</ul>
</div>
I get always only white screen with translated string.
Question is:
How to solve that or if is any better way how to use i18n with jQuery mobile ?
(http://the-m-project.org I tried).
Many thanks for help

Resources