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.
Related
I have a file in my public folder of react project known as backgrund.jpg
I am trying to add it in styles.css of public folder to set it up as background image.
Here is the code for the same:
background-image:url("%PUBLIC_URL%/background.jpg");
The above code doesn't change anything however when I try:
background-image:url('https://i1.wp.com/sociallover.net/wp-content/uploads/2017/06/nature-images.png');
or
background-color: greenyellow;
both of them work perfectly. To give you a better picture, here's how the files are located:
Do let me know what exactly it is that I am doing wrong?
In the inspector I get this message:
GET http://localhost:3000/%PUBLIC_URL%/background.jpg 400 (Bad Request)
Additional things i did:
did a npm start after stopping the old server.
checked for the file name extension to ensure that my jpg matches with background.jpg.
Thanks to #Guy Incognito and #Ihor Vyspianky, I solved the problem by replacing:
background-image:url("%PUBLIC_URL%/background.jpg");
to
background-image:url("background.jpg");
Here's the context:
pdfjs-dist: v2.2.228
angualar/core: 8.2.0 (hybrid Env with an AngularJs 1.5.X)
Objective: to upgrade pdfjs-dist to the latest versions (2.3.200 or at least 2.2.X)
I upgraded from pdfjs-dist 2.0.4xx, and here's what is being rendered:
So basically, instead of having the PDF rendered correctly, with highlightable text and so on, there's like a duplicate of the text: one version of the text is rendered correctly (graphically), the other version seems to work OK for text selection and searching.
When doing any search, PDFFindController works on the highlightable layer (as you can see the area with the greenish text in the upper part of the image).
Any idea what might cause this behavior?
this is due to the new update of PDFjs requires css file to style the pdf.
you can get more details on this from the following question's answer
PDFJS: error on Text rendering for the PDF
I have a hugo site, and on a search engine (Duckduckgo), my site's summary is:
Add your own "layouts/partials/hero.html" to replace this text.
I tried looking for the string hero in the files in my public folder, can't seem to find it.
I have added this file with some content. Nothing seems to happen. Do I need to edit the theme files or something?
Edit: changed title to make problem clearer. The original question asked about "hero cards", which I thought might have been a standard search engine friendly part of a website.
I think I understand what is happening now. I originally installed the base16 theme which does contain the text:
Add your own "layouts/partials/hero.html" to replace this text.
( it is in the file themes\base16\layouts\partials\hero.html.).
I should have realised, but search engines take time to re-index a site. I originally published the site using base16 with some text unedited. Duckduckgo was showing that old text, it will probably disappear in time when the site is reindexed.
The answer is in the documentation for the base16 theme:
You probably want to edit the homepage. Get started by copying the
supplied homepage to your own site.
$ mkdir -p layouts/partials
$ cp themes/base16/layouts/partials/hero.html layouts/partials/hero.html
After this, you can edit layouts/partials/hero.html and make it
awesome.
The default layouts/partials/hero.html contains the code Add your own "<code>layouts/partials/hero.html</code>" to replace this text., which is what DuckDuckGo was using to make its summary. As you noted in your answer above, if you edit this file then the DuckDuckGo summary should change when DuckDuckGo next indexes your site.
I use the Cobalt editor theme in R Studio which I have slightly adjusted by changing the respective .cache.css file. The background color is dark (my choice) but the text cursor (mouse pointer) is dark as well so it is hard to see.
Where or how can I change the the mouse pointer color to e.g. green in the .cache.css file?
Using this issue on another tool, I added these lines to my cache.css file:
.ace_editor *, input.GNKRCKGCKS { cursor: -webkit-image-set(url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=') 1x, url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC') 2x) 5 8, text; }
I could not find way to edit cache.css but following from Devin's reply and rstudio forum worked on my end.
cd <path_to_rstudio_server>/www/rstudio/
nano 1C0010BF6F4789B46E4091CEC24E6DAD.cache.css
where 1C0010BF6F4789B46E4091CEC24E6DAD.cache.css matched current Material theme I am using for rstudio. To view css file for your rstudio theme, right-click anywhere in the upper code panel in rstudio browser window and select Inspect (Element) option for Chrome (Firefox). Under Styles section on right panel, you should see file name ~ alphanumberic_characters.cache.css.
Add cursor css from Devin's reply under .ace_string.ace_regexp:
.ace_cursor,
.ace_string.ace_regexp {
color: #D30102
-webkit-image-set(url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=') 1x, url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC') 2x) 5 8, text;
}
Save, exit and restart rstudio-server to take edits into effect.
Windows Solution
You can edit specific themes by going to 'C://Program Files/RStudio/resources/themes/your_theme_of_chocie'
Open the file, for example cobalt.rstheme with something like VS code
Paste the line as supplied by #Devin from above answer.
Save the file and re-open RStudio. While this is a .rstheme file, it is written in CSS.
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.