-
-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refresh design, refactoring code for much easy templating and code reading #256
base: develop
Are you sure you want to change the base?
Conversation
Remove need of images for bar rendering. Using only css classes.
Remove bgcolor, replace by newly color- css class introduced by css bars.
On the second commit, title is not complete, should be : "set background TH color to css" |
Set "font-size: 9px" -> same presentation as day of month
Set font to sans-serif, system-ui Remove duplicates font family Change font size unit to rem unit
Remove pngs, use of full css clean css
Congrats, review all this old Perl is a nightmare 🤣 |
@IGLOU-EU For the font-size, i was just converting from px to em while reading the code. But, sure, removing styles, old html attributes and set css classes is good. We'll see. If @eldy merge the commits and is interested to move further this way (for the 8.0) i can do some rendering stuffs, opening for much easier theming and more modern design. It's not a complex work, it takes just some time. |
.aws_title { font: 13px verdana, arial, helvetica, sans-serif; font-weight: bold; background-color: #BBBBBB; text-align: center; margin-bottom: 0; padding: 1px 1px 1px 1px; } | ||
.aws_blank { font: 13px verdana, arial, helvetica, sans-serif; background-color: #FFFFFF; text-align: center; margin-bottom: 0; padding: 1px 1px 1px 1px; } | ||
body { body { font: 0.75rem sans-serif, system-ui; background-color: #FFFFFF; margin-top: 0; margin-bottom: 0; } } | ||
.aws_bodyl { background-image: url(/awstatsicons/other/backleft.png); background-repeat: repeat-y; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be we should use $DirIcons here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @eldy
It's a copypaste from awstats_default. I don't know the difference between awstats_default.css and awstats_bw.css, and their use except for example, because css is hardcoded in awstats.pl. Maybe we can keep only one.
By the way, did you hardcoded the css for a special purpose ? Or maybe we can include a default "$StyleSheet" from css folder and remove the hardcoded one ?
For the backleft image, maybe we just could remove this image. And the button.gif also.
Another consider i have is to refactor all the calculations for tables. For example, in HTMLMainMonthly, these are written 3 times, and calculated 2 times (or more if there are multiples plugins). We could just use the ShowGraph plugin calculated vars and then dispatch them for graph plugins and rendering bars table and data table.
Refactoring rendering of header, cells and footer (usable for other tables). Add some css classes to the html tags. Bars are integrated to the table (based on $BarWidth, =>100 is cool).
Using refactoring made with month table. Set average footer. Fix averages to calculate only with not empty days. Set averages for Month table.
See previous commit.
Like previous commits. + set flexible
In domain tables. Using UTF8 characters instead.
add options to ShowDomainsStats and defaulted to "UVPHB''. Already Coded by Josep Ruano here : https://github.com/eldy/AWStats/blob/269e9736ce02e65c25a2a4ad3e5be921ea92b878/wwwroot/cgi-bin/awstats.pl#L13217-L13243
- "différents" > "uniques" (plus court, évite les sauts de lignes) - "Heures" > "Heure"
- global update of redesigning, refactoring tasks - reintroducing a world map
- Add folder in installation setup - Update documentation
- rearrange code : declarations => datas manipulations => rendering - avoid loops : days are now parsed only once
resolve the width problems. set flexible, new design.
+ th not bg background + "remove" some tooltip (old system) waiting to refactor
The cell itself is build by awstats in sub HTMLShowHostInfo Set background to plugins columns Arrange paddings
returning only content cleaning code
Hi @eldy I didn't work on the graph for the moment because i don't use it and it is noted as experimental in the conf file. I though it is "on development", and i saw in issues that google one doesn't work anymore. Sorry. It seems i don't understand very well the pr system from a fork. I did a pr for the bars and the clock, and after all my commits added to the PR. PS: i managed to find the problem with the graphapplet plugin (printing directly, and format_byte function i included html in). I fixed it, but i can't test since i have not java in all my browsers (but all is well written in the html code with the fix). I think remember java applets in browser have been discontinued for some years. |
"Ofttopic" - problem with charts is already discussed here #249 (not solved, there is necessary to change "chart library") |
UTF8 country flags is a great idea. They don't display on Windows very well, but it is very easy to fix using https://github.com/talkjs/country-flag-emoji-polyfill |
Enhancements :
new responsive design
replacing png bars by css bars
replacing png clocks by css clocks
choice to have countries flags displayed with image or utf8 char
replacing js tooltip system by css system
add average filesize in pages report and downloads report
code cleaning
New functionnalities :
css vertical bars growing
in-table horizontal bars integrated in each data columns (and with no extra column)
table rows hovering
new world map with hovering animation
css vars for better and easy customisation
stylesheet heritage or replacement
Dark Mode
Ratios table
some expandable tables
AWStats update notification (JSON::Parse modules needed to activate). Notification shows in the footer's page
Updating considerations :
Plugins using "ShowInfoHost" and "ShowInfoURL" MUST now return a string instead of directly printing (for reports)
CONF file changes:
new FlagsType option to choose image or utf countries flags
new ShowMap option to show or not a worldmap in countries reporting
new StylesheetMode option to choose if your stylesheet override awstats stylesheet or if awstats stylesheet is ignored
removing BarHeight option (replaced by a css var in stylesheet)
CONF visual options are migrating to css (BarWidth, colors, ShowBars etc...)
Close issues :
Links become camouflaged when using the same color as titles #260
Add a style option to change the background color of the top bar (time period) #258
Tables "keyphrases" and "keywords" are in the same row and too wide #235
Modernizing the AWStats Interface #233
Still WIP but usable.
More and updated screenshots at : #233