just adjusting some CSS, so I thought, I share.
This has bnen tested with AG 25.15.
I want to thank Jan for this ideas and input about formating and his so often "the easiest way is CSS". The forum and AG would not be the same with out you.
Sure this is nothing really new for those of you who have worked with CSS, but maybe someone finds it interesting.
I think currently two things are missing:
a) the CSS would be applied always, not caring if the user has selected some other style (user settings). To accomodate for this, I suggest checking which style is currently used and give the user a choice to apply this.
b) user defined settings: create a table that holds the definitions for the CSS and let the user create his own. Then, the user-defined CSS can be injected dynamically into the footer-extras. This indeed should make it possible to have a much more user defined individual look.
To add CSS formating to all files, I added to hooks/header-extras.php this line.
Actually I moved the line to hooks/header-footer.php to ensure overwriting any other CSS that have been set before.
Code: Select all
<link rel="stylesheet" href="<?php echo PREPEND_PATH; ?>hooks/common_main.css?v=<?=time()?>">You need to know my settings:
- I always had id as primary key, I always have it as first field.
- I did not set "hide in detailview"
- I did set "hide in tableview"
I was looking for an easy way to do this in all generated detail view pages.
This is the CSS that does the trick:
Code: Select all
/* start hiding ID fields in view */
.form-group[class*="-id"] { display: none; }
For some reason links on top of the detailview show up on the right side with rather large icons.
I wanted to have them left and with smaller icons.
This is the CSS that does the trick:
Code: Select all
/* resize images */
.detail_view .children-links img {
width: 16px;
height: 16px;
}
/* overwrite Bootstrap-Klasse pull-right in this context to show links at the left */
.detail_view .children-links a.pull-right {
float: none !important;
/* display: inline-block; */
}
Smaller images in child-tabs (below detail view)
I admit, this is not new and not from my but from https://forums.appgini.com/phpbb/viewto ... f=4&t=3031 . Nevertheless I thought this is a good place to post if (again)
This is the CSS that does the trick:
Code: Select all
/* resize images */
#children-tabs > ul > li > a > img { width: 16px; }
Call me old fashioned, but I like the absolute standard bootstrap style (button-colors seem logical to me, black text on white is good contrast).
However, I wanted to have a lookt a little more modern: I want "real" corners not rounded ones.
This shall be applied to all buttons and also the child tabs
This is the CSS that does the trick:
Code: Select all
/* real corners on buttons */
.btn { border-radius: 0 !important; }
/* real corners on child tabs */
.nav-tabs > li > a { border-radius: 0; }
/* real corners for fields on the form */
.form-control,
.select2-container .select2-choice {
border-radius: 0;
}
/* real corners the "frame" */
.panel { border-radius: 0; }
Change color of (gray) border to something else
This is the CSS that does the trick:
Code: Select all
/* Change color of (gray) border to something else */
.panel-default { border-color: #ff0909ff; }
This is the CSS that does the trick:
Code: Select all
/* Change color of DV header (where the word Details is shown) */
.panel-default > .panel-heading {
color: #333;
background-color: #7dfb97;
border-color: #ff6464;
}
This is the CSS that does the trick:
Code: Select all
/* start start children tabs */
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
color: #555;
cursor: default;
background-color: #fff;
border: 1px solid #d91818;
}
.tab-content {
background-color: greenyellow;
border: 1px solid #d91818;
}
/* end start children tabs */
This is the CSS that does the trick:
Code: Select all
/* start add/improve visual indicator which form-field has focus */
button.btn:focus,
button,
input:focus,
select:focus,
textarea:focus,
.select2-container--focus .select2-selection, /* need to use -- !*/
.select2-container--open .select2-selection, /* need to use -- !*/
.select2-container-active, /* depricated, was used in select2 3.x - from 4.x not anymore! */
.select2-container-active .select2-selection /* depricated, was used in select2 3.x - from 4.x not anymore! */
{
outline: none;
border-color: #005fcc;
background-color: #eef5ff;
}
/* optional for dropdown: color list background and frame */
.select2-container--open .select2-dropdown /* need to use -- !*/
{
border-color: #1a73e8;
}
/* optional for dropdown: highligt active entry */
.select2-results__option--highlighted { /* need to use -- !*/
background-color: #1a73e8;
color: #ffffff;
}
/* extra visuals: mark active group */
.form-group:focus-within {
background-color: #f5f9ff;
border-left: 3px solid #1a73e8;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
outline: none;
}
/* end add/improve visual indicator which form-field has focus */
This is the CSS that does the trick:
Code: Select all
/* START change nav bar attributes */
/* important: you need to define NAV BAR CSS for different @mdia types: max-with 767 ... let's define the same color for all */
@media (min-width: 1px), (max-width: 767px) {
.navbar-default {
background-color: brown;
border-color: black;
color: greenyellow; /* attention: most likely the navbar holds links which need extra formating */
}
/* nav bar brand (total left, application title) */
.navbar-default .navbar-brand,
.navbar-default .navbar-brand a,
.navbar-default .navbar-nav > li > a {
color: rgb(76, 123, 4);
}
/* nav bar links and over */
.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus,
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .open > a:focus,
.navbar-default .navbar-nav .open .dropdown-menu > li > a,
.navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
.navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
color: plum;
background-color: brown;
}
/* opened drop down menu */
.navbar ul.dropdown-menu {
background-color: brown;
border-radius: 0;
}
.nav
{
background-color: brown;
}
/* drop down menu links - base color */
.dropdown-menu > li > a,
.navbar-default .navbar-nav .open .dropdown-menu > li > a {
color: rgb(76, 123, 4);
background-color: brown;
text-decoration: none;
}
/* drop down menu open, active link*/
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
color: plum;
background-color: brown;
text-decoration: none;
}
}
/* END change nav bar attributes */
Open for comments and improvements. Do you have any changes you want to share?
PS: It's not meant to look nice, but to give you the CSS classes you need to change things.
Olaf
