Keycloak Theme doesn't show up - themes

Keycloak 20.0.0.2
I tried to make a custom login theme where I just change the background image to my own.
I took the official documentation - it doesn't work.
I looked a youtube video and do the stuff they do - it doesn't work.
I cleared the cache - it doesn't work.
I set the theme for the client - it doesn't work.
I chown the whole custom theme directory to user and group keycloak - it chagnes nothing.
The only thing working is changing the parent from base to keycloak - I can see the change after refreshing the page.
This is what I have done so far:
I created a directory mycustom/login in the keycloak/themes directory.
I created a theme.properties file in the mycustom/login dir with the following content:
parent=keycloak
import=common/keycloak
styles=web_modules/#fontawesome/fontawesome-free/css/icons/all.css web_modules/#patternfly/react-core/dist/styles/base.css web_modules/#patternfly/react-core/dist/styles/app.css node_modules/patternfly/dist/css/patternfly.min.css node_modules/patternfly/dist/css/patternfly-additions.min.css css/login.css css/styles.css
Than I created a resources directory in the mycustom/login directory and in this resources dir I created a css and an img dir.
I put a styles.css with the following content in the css dir - which is the same as in the server developer guide from keycloak instead of the image name:
body {
background-image: url('../img/Ambient_6.jpg');
background-size: cover;
}
And at last I put my Ambient_6.jpg in the img dir.
I then set the mycustom theme in the Realm->Themes for the Login theme.
As a test I also set my theme for the client login theme directly.
It doesn't matter what I do - I always see the keycloak-bg.png image if parent=keycloak.
If I set parent=base I see my image but there is, of course, no styling on the controls.
How can I make the parent=keycloak setting work with my background?

Related

Quasar / Vue.js Image in header not showing

Im really new to Vue.js and Quasar and am currently trying to build just a basic application.
In there i have a header which should display a logo on the top left using the following code in my MainLayout.Vue.
<q-layout view="hHh LpR fFf">
<q-header elevated class="bg-accent text-white">
<q-toolbar>
<q-toolbar-title>
<q-img src= "public/icons/favicon-16x16.png" style="width: 70px;">
</q-img>
Title
</q-toolbar-title>
</q-toolbar>
</q-header>
<q-page-container>
<router-view />
</q-page-container>
</q-layout>
It runs without an error, but the image is not displayed. At its position there is just a blank space. When i open up the JavaScript Console in my Browser,
Failed to load resource: the server responded with a status of 404 (Not Found)
The path is definitely right. Placing the image inside of the src/assets folder did not help as well.
I followed this tutorial, which lead me to the point im at now.
The only difference i can see is that the project in the tutorial uses the "static" folder for its image, however my project does not contain such "static" folder.
Googling i found that the "static" folder got turned into the "public" folder through some update.
But since i'm using the public folder for my code above, this seemingly either is not true or the issue is something else.
So how do i get my logo to be displayed top left in my header?

I am new to the Laravel. I got this project and I don't know why this is not displaying pictures

Things I tried
1.simple path without URL::to
2.url() method
3.absolute path
4.asset(simple relative path)
in my .env file changed APP_URL from http://localhost to http://localhost:8000 since it runs on 8000 port
I am adding some pictures.
One thing which is important to mention here when i use Simple relative path it shows picture on hovering the mouse in IDE and on browser too but browser does not render it on webpage.
Please see pictures
src="{{URL::to('public/imgs/2.png')}}"
You have to put all your image resource files in public folder then access those resources through the following way:
src="{{ URL::asset('imgs/2.png') }}"

Images from public/assets folder in Ember returning 404

I am trying to create my first ember app, and I started fleshing out the landing page. I tried to create a billboard section at the top and placed an image in it with an inline style
background-image: url('/assets/images/photo.png')
I read that you are supposed to put all your images in an assets folder in the public directory which I did, but I am getting a 404 response for that image.
http://localhost:4200/assets/images/photo.png
Remove assets from URL.
background-image: url('/images/photo.png')
http://localhost:4200/images/photo.png

Modify index.html in hugo

I'm just getting started in the hugo quickstart tutorial.
Looking here, it suggests I ought to be able to modify the home/default/root index.html by creating an _index.md file.
$ hugo new site quickstart
Congratulations! Your new Hugo site is created in ~/quickstart.
Just a few more steps and you're ready to go:
1. Download a theme into the same-named folder.
Choose a theme from https://themes.gohugo.io/, or
create your own with the "hugo new theme <THEMENAME>" command.
2. Perhaps you want to add some content. You can add single files
with "hugo new <SECTIONNAME>/<FILENAME>.<FORMAT>".
3. Start the built-in live server via "hugo server".
Ok, let's try to modify the home page!
[~/quickstart]$ hugo new index.md
[~/quickstart/content/index.md created
[~/quickstart]$ hugo new _index.md
[~/quickstart/content/_index.md created
I've edited both of those, to the effect of:
---
title: "Welcome"
date: 2017-10-13T20:31:39-05:00
draft: false
---
# This is a website!
Why nothing appears?
But when I run
[~/quickstart]$ hugo server -D
Started building sites ...
Built site for language en:
0 draft content
0 future content
0 expired content
1 regular pages created
6 other pages created
0 non-page files copied
0 paginator pages created
0 tags created
0 categories created
total in 5 ms
Watching for changes in ~/quickstart/{data,content,layouts,static}
Serving pages from memory
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop
I see this, no content:
Is there anything else I need to do? A build or markdown or render step or something?
You don't need the index.md but you do need the _index.md. You can delete it.
In your layouts folder create a file named index.html. That's your template html file for the site's root page. Now add your basic boilerplate doc/html markup. That allows the the server to inject a Javascript auto-reload script. Now refresh your browser to pickup the script.
Now you are ready to play. in the body tag add {{.Title}} and watch the browser update.

local images are not displayed, in octopress

I create a post and hope to display some local images, so I put some images in the folder of source/images/my_dir/image.jpg
And then I use the following two ways to display the pictures.
![method 1](../images/my_dir/image.jpg)
![method 2](http://my_username.github.io/my_dir/image.jpg)
And then I generate the post and deploy to github page.
I can see that the images is copied in the folder of _deploy/images/my_dir/
But method 1 is not working, instead, method 2 is working. Why is that?
PS:I am using windows7 to write the post in markdown pad.
In your atom.xml all img src must be of the form ![method 2](http://my_username.github.io/my_dir/image.jpg). Feeds reader must have resources full urls to display them correctly.
In your post it's ![method 1](/images/my_dir/image.jpg)
Apparently, jekyll is enabled by default and will skip directories that begin with "_". To disable the behaviour, drop an empty file named ".nojekyll" in the root dir.
More info here
Yes, it drove me mad too.

Resources