Skip to main content
Suggestions Concerning Links Started by AaronB · · Read 5650 times 0 Members and 1 Guest are viewing this topic. previous topic - next topic

Suggestions Concerning Links

 ;D   Sorry, but that was the best title I could come up with.  One of the 'issues' myself and friends discussed about SMF was the nearly consistant use of one colour for links. This made it difficult for some themers ( maybe many ) to simply apply their colours to a theme and at times, the default link colour made some links not stand out at all.  I have three suggestions; one with an example and two without because I am not bright enough to do the other two.

In the Administration Centre, the 'look to us for help' link is virtually indiscernable as a link. What I did is colour it red and gave it an italic font. I do this by adding an admin_win class to the index_light.css file and then in AdminEnglish.php ( about line 56 ) I change the 'new_win' to the 'admin_win'.

Code: [Select]
a.admin_win:link, a.admin_win:visited {
color: #ff0000;
font-style: italic;
text-decoration: none;
}

a:hover, a.admin_win:hover{
text-decoration: underline;
}

subset of AdminEnglish.php
Code: [Select]
to <a href="http://www.elkarte.net/index.php" target="_blank" class="admin_win">look to us for help</a> with the problem.<br />

The link to ElkArte for help is now quite visible to a user. Of course, it could be any colour the designer wants it to be.

The second two suggestions are a bit more to implement and they are to give more colour versatility to the Calendar section and to the 8 mimed items in the Admin Centre that are placed below the 'Latest Software Updates' block. Having a separate class for links and fonts for these areas would, I belive, enhance the overall theme-ability for ElkArte.

Just tossing those suggestions into the pool for consideration. The first suggestion I know how to do but the other two are way above my skill level.  

Thanks,

Re: Suggestions Concerning Links

Reply #1

Since I have my links set to be roughly cyan on black that "look to us for help" pops right out, so I guess that depends on the theme.  But if you wanted to style links on the admin screen differently can't you just use the id="admin_content" that the admin page is wrapped in to color the links "new_win" links on that page how you wanted with the existing markup?

Re: Suggestions Concerning Links

Reply #2

Hi Scripple,

Neat idea and yes that does work. I changed the admin_win to admin_content in both places and that does change the link colour as well.  I never considered the admin_content as a possibility. I will tinker with this a bit and see if there are any adverse affects to using the admin_content method.

As long as using it does not break something somewhere else, I would prefer to use admin_content as it is already available.

Re: Suggestions Concerning Links

Reply #3

Actually I meant not touching the theme .php file but just changing the css.  Put this in admin_{theme}.css

Code: [Select]
#admin_content a.new_win:link, a.new_win:visited {
  color: #ff0000;
}

And all the links with the class new_window inside the admin_content div will be red.

Re: Suggestions Concerning Links

Reply #4

Not knowing any better I took a different path. I added admin_content ( renamed from admin_win ) to admin.css and and made the change in the AdminEnglish.php file. But, I see what you are talking about now; I had misunderstood your original intent. I will give that method a try.


ETA: your method is not working for me ...yet. But I am exhausted, been up 22 hours and groggy. I will revisit it again after I get some sleep.  :)
Last Edit: March 29, 2014, 12:56:30 am by AaronB

Re: Suggestions Concerning Links

Reply #5

Quote from: AaronB – lThe second two suggestions are a bit more to implement and they are to give more colour versatility to the Calendar section and to the 8 mimed items in the Admin Centre that are placed below the 'Latest Software Updates' block. Having a separate class for links and fonts for these areas would, I belive, enhance the overall theme-ability for ElkArte.
You should be able to do this with the existing classes by using descendants. I used this sort of trick on part of the board index, for instance.

Taking the main calendar as an example you could use this to target standard text:

Code: [Select]
.days {color: whatever;}

and this to target links in the day blocks:

Code: [Select]
.days a:link, .days a:visited {color: whatever_else;}

For the admin blocks in question the markup is this bit:

Code: [Select]
						<div class="windowbg2 quick_tasks">
<div class="content">
<ul id="quick_tasks" class="flow_hidden">';

foreach ($context['quick_admin_tasks'] as $task)
echo '
<li>
', !empty($task['icon']) ? '<a href="' . $task['href'] . '"><img src="' . $settings['default_images_url'] . '/admin/' . $task['icon'] . '" alt="" class="home_image" /></a>' : '', '
<h5>', $task['link'], '</h5>
<span class="task">', $task['description'], '</span>
</li>';

echo '
</ul>
</div>
</div>

Which is pretty crappy markup since it's still polluted with SMF 2.0.x crap and really could do with a bit of an axe murder, but anyway....

...you can target stuff in that too.

Example for the header link for each block:

Code: [Select]
#quick_tasks h5>a:link, #quick_tasks h5>a:visited {color: whatever;}

For just any link elsewhere in the block:

Code: [Select]
#quick_tasks a:link, #quick_tasks a:visited {color: whatever;}

For text, which would be in the task spans:

Code: [Select]
#quick_tasks .task {color: whatever;}
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Suggestions Concerning Links

Reply #6

Interesting. So, since it appears the ability is already available in the existing files, ( just not obvious to dullards and noobz such as myself ) could those necessary changes be made in the theme for the RC?

Presuming the Default theme and both variants are the themes for the RC, one would expect that the easier the theme and variants are for new users of ElkArte to work with, the more successful ElkArte will be.

Re: Suggestions Concerning Links

Reply #7

Yup, there's a lot of flexibility that's already built in, but which isn't used by default. Generally you'd try to avoid specifically declaring it in the CSS if you didn't actually require it, since that could lead to an awful lot of CSS bloat if you tried to deal with all examples (quite apart from the time involved).

Also, if someone is making a custom theme and doesn't require specific colours in those areas, having them specifically defined by default will make theming more difficult since it will be more declarations to track down and edit.

This is the sort of thing that would usually be dealt with via support forums rather than being declared in default code. My 2c.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Suggestions Concerning Links

Reply #8

Actually links in the admin panel look a bit inconsistent, because links in the posts have the underline, while in the admin panel it's not there, anywhere :-\
Bugs creator.
Features destroyer.
Template killer.