Stylesheet not appearing in Drupal 7 sub theme - drupal-7

I added these lines to the read
css[979px-1088px.css][name] = 979px - 1088px
css[979px-1088px.css][description] = Stylesheet for smaller screen larger than tablet
css[979px-1088px.css][options][weight] = 11
I also added the file 979px-1088px.css to my css folder in the same theme.
I then flushed the cache but when I view source the file isnt appearing.
I was able to get it working by using
stylesheets[all][] = 'css/979px-1088px.css'
But this appears before the rest of the stylesheets and I would prefer control over the order of the css files.

Related

Codenameone: Sharing a file leads to an empty target-app-selection-Dialog

I try to share a file (zip or text - I tested both) from within my codenameone App using the share-API. But on my iOS-Devices (iPhone and iPad with iOS 13.3.1) the result is, that the Dialog, where an App can be selected with which you want to share the file, is empty (see Screenshot).
I used this call for the text file:
Display.getInstance().share(null, "file:///var/mobile/Containers/Data/Application/0999760A-D194-450D-8E27-B0D5D852FB93/Documents/de.zeitkuenstlervoll.gtd.gui/mylog.txt", "text/plain");
and this for the zip-file:
Display.getInstance().share(null, "file:///var/mobile/Containers/Data/Application/0999760A-D194-450D-8E27-B0D5D852FB93/Documents/de.zeitkuenstlervoll.gtd.gui/export.zip", "application/octet-stream");
The files are written with FileSystemStorage and always exists in the path (creating an Email with the mentioned files as attachments from within the code works well). Sharing a Text with the share-API works well (selection-dialog is not empty).
Do you have any idea what I can do to share text-files oder zips?

How to customize allure report title and logo

Below attached allure report image that generated via allure. Would like to customize report title and logo (image highlighted yellow) with my own title and logo instead of ALLURE REPORT and default logo. Appreciate your help.
To change the logo you should put the custom-logo-puglin into the puglins folder:
Edit the styles.css file and change the image reference to your own file.
In the jenkins to customize each project the plugins folder is placed here:
If you would like change for all the projects the folder is:
I recommend you the user manual
Title Change
I have changed the title by cloning the repository from git and built a local copy. (I am using Windows OS).
Prerequisite
Gradle Version 5.2.1-https://gradle.org/releases/
Node Js-https://nodejs.org/en/download/ -npm -6.4.1
After installing prerequisite please follow below steps
Visit https://github.com/allure-framework/allure2
Clone the repository- Link:
https://github.com/allure-framework/allure2.git
Assume the repository is saved locally under C:\allure2-2.10.0
Navigate to
C:\allure2-2.10.0\allure-generator\src\main\java\io\qameta\allure\summary
Edit SummaryPlugin.Java file with any text editor
Search for setReportName("Allure Report"); and change to whatever name
you want to give. Example setReportName("Automation Report")and save that file
Navigate to C:\allure2-2.10.0\allure-generator
Open command prompt (cmd) from this folder.Type gradle build and hit enter
Wait for few mins till it builds. It takes around 20 mins.
Navigate to c:\allure2-2.10.0\allure-generator\build\libs
Copy newly created file in build\libs folder allure-generator-2.10.0.jar file
I have installed manually from https://docs.qameta.io/allure/#_manual_installation
Navigate to allure-2.10.0\allure-2.10.0\lib and override allure-generator-2.10.0.jar file with the file created newly from the gradle build folder
Title change image screenshot
Logo Change
I have installed manually from
https://docs.qameta.io/allure/#_manual_installation
Navigate to folder allure-2.10.0\allure-2.10.0\config
With any text editor edit file named allure.yml
At the last add one more line i.e. enter code here
- custom-logo-plugin and save the file to activate the plugin. allure.yml screenshot
Navigate to allure-2.10.0\plugins\custom-logo-plugin\static edit
styles.css
.side-nav__brand {
background: url('yourlogo.svg') no-repeat left center !important;
padding-left: 180px !important;
margin-left: 10px;
}
In the same folder put your svg file or png image file
Now generate allure report.
Both title and logo will be changed according to your needs.
Hope it helps! Thanks
In the custom-logo-plugin/static/styles.css add "!important" to the background style. With that change the custom-logo-plugin should work. This replaces only the logo image.
You can also use a logo-with-text by using "display:none" to .side-nav__brand-text selector and adding a height to .side-nav__brand selector. Your logo in this case should be 170px width.
allure custom logo and report name / title plugin(s) are currently not working due to previous changes, you can achieve this goal by cloning the source, modifying it and building a local copy instead and using it until we fix such plugins or offer a new alternative.
I may answer a little late...
Concerning the report title, actually it seems to be hardcoded during the generation step.
Take a look at the files in "allure-generator/src/main/java/io/qameta/allure/summary",
especially SummaryPlugin.java
SummaryPlugin.java
A short term solution could consist in editing the file "allure-report/widgets/summary.json" between "allure generate" and "allure open".
summary.json
The long term one should be to add a parameter during the generation step.

Change default content type for previewing site with "nanoc view"

I generate HTML files without any filetype extension with the following route in nanoc’s Rules file:
route '/blog/*/' do
item.identifier.chop
end
So the file /content/blog/hello-world.html gets generated as /output/blog/hello-world, leading to the URL path /blog/hello-world.
When using nanoc’s built-in preview server (nanoc view, which uses adsf and WEBrick, as far as I understand), these extension-less HTML files get interpreted as plain text.
For previewing with nanoc view, how can I set the default content type (i.e. text/html) for files without filetype extensions?
(When publishing this site, I set the correct content type in Apache’s .htaccess file so that the files get interpreted as HTML, but WEBrick/adsf don’t seem to support .htaccess.)
You should be writing those to /output/blog/hello-world/index.html instead. That makes them work seamlessly in nanoc view, Apache (with no .htaccess), even by just opening the site files in your browser (assuming you're using relativized links).

Resize CiViCRM image in Drupal views

How to resize civicrm images(uploaded via webform) in Drupal views.
The images are getting displayed but the width and height are of the size when they upload images..
2 solutions come to mind
Use css to give each image a max-width property. This will make images appear correctly, but won't save bandwidth as the full image will be downloaded and scaled client-side.
Use a drupal module such as Image Resize Filter
If you need more advanced resizing / image transformation options, you can create a custom template file for the image URL field and use drupal image style (admin/config/media/image-styles) to define the required conversion.
As CiviCRM is protecting the files (we don't have the files urls in the database since 4.4.4 ?), you need to use imagecache_external (didn't manage to make image_style_url work). The drawback of this module is that the image is duplicated in drupal.
Anyway, to make this work :
install imagecache_external, go to the configuration page (http://YOUR_SITE/admin/config/media/imagecache_external) and add YOUR_SITE to the white list
create a style http://YOUR_SITE/admin/config/media/image-styles/add
configure the view as needed and add the CiviCRM Image URL field
Edit the view -> Advanced -> Information
Find the file name corresponding to the field you want to customize and create the file with this file name in YOUR_THEME/templates/
Paste the following code (replace 'thumbnail' with the style name you have created) :
<?php
if ($row->{$field->field_alias} != '') {
print theme('imagecache_external', array(
'path' => $row->{$field->field_alias},
'style_name'=> 'thumbnail'));
}
?>
back to Edit the view -> Advanced -> Information -> Rescan templates file and then save the view.
This didn't quite work on a drupal 7 / CiviCRM 5.10+ system (don't know if it still works on earlier).
To make it work put this in the template file:
<?php
$path = $field->render($row);
if (!empty($path)) {
print theme('imagecache_external', array(
'path' => $path,
'style_name'=> 'thumbnail'));
}
?>

Adding image in java code in code name

I am new in code name one. I have to add image in a container(flow layout) with specific width and height.
1: codenameone's guide says that we have to add image in resource folder. Where is that resource folder?
2: To create image i am using createImage(path) of image class. if we put image file in resource folder then what is path of that image.
3: Is here any type restriction of image file in it.
Please help.
When you put the image you would like to add in your src folder the code should look as followed:
Label i = new Label();
Image img = Image.createImage("/imageToAdd.png");
i.setIcon(img);
You can change the label to whatever object you would like to use to display your image.
Resource file not folder, the ".res" file in the root of the SRC directory contains your theme as well as additional images you might need. The value here is that you can add multi-images (see tutorial) as well as write very portable code.
You can access the resource file in a GUI builder via fetchResourceFile() or in a non-GUI builder app using Resources.open (as is demonstrated in the init method).
You can also place arbitrary JPG/PNG files in the src root next to the res file. While there is no restriction from Codename One, devices tend to support PNG/JPG well and might fail with other formats.

Resources