Latest topics
» what if you asked for help to fix a problem in forum and you got this
by Michael_vx Yesterday at 21:16

» [GAME] Count to One Million!
by Ange Tuteur Yesterday at 19:44

» Change the Path ::
by Guest Yesterday at 14:22

» blah
by Andrei34 Yesterday at 01:13

» How to remove these spaces
by Gin NeOs Sat 21 Jan 2017, 19:34

» Hello! I'm Prometheus.
by Guest Sat 21 Jan 2017, 08:12

» Night Mode
by Michael_vx Sat 21 Jan 2017, 00:00

» Happy Birthday Thread
by Michael_vx Fri 20 Jan 2017, 23:18

» The Happy Thread
by Guest Fri 20 Jan 2017, 08:37

» Display a Preview of Groups on Hover
by Guest Fri 20 Jan 2017, 08:32

» Race for the White House
by Guest Fri 20 Jan 2017, 08:23

» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Fri 20 Jan 2017, 03:27

» Starred Forums
by Milouze14 Fri 20 Jan 2017, 03:13

» FM Themes
by SLGray Thu 19 Jan 2017, 19:16

» User - Made Creations
by SLGray Thu 19 Jan 2017, 19:15

Recent Tutorials
Top posting users this month
Who is online?
In total there are 6 users online :: 0 Registered, 0 Hidden and 6 Guests :: 1 Bot

None

[ View the whole list ]


Most users ever online was 172 on Fri 19 Feb 2016, 05:17

[Implemented] Forum Stats Look

View previous topic View next topic Go down

Ace 1
Valued Member
Title :
God of Creation
Gender : Male
Age : 17
Posts : 2069
Points : 2541
Reputation : 70
Location : druid hill Park
Language : Eng, Fr, Loud
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile http://fmdesign.forumotion.com/u190

PostAce 1 on Wed 12 Oct 2016, 14:20

@Ange Tuteur

The forum stats (topics, posts, views) are kind of elevated.

I know this is picky but this works on my forum and I modified it to work here on FMDesign.

Code:
$(function() {
  var e = $('.forum-block .forum-block-inner > div'), s, h;
  if ( e.html() != undefined ) {
    s = window.getComputedStyle(e.filter('.forum-lastpost')[0]);
    h = s.getPropertyValue('height');
    e.filter('.forum-stats').css('height', h);
    e.filter('.forum-stats').find('.number').css('line-height', ( h.replace('px', '') / (3 / 2) ) + 'px');
  }
});

Edit: Hey AT <3



Last edited by Ace 1 on Fri 04 Nov 2016, 14:46; edited 14 times in total
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4205
Points : 8675
Reputation : 2108
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Google Chrome Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Wed 12 Oct 2016, 14:28

Ah yeah, I know about that, it's the same on phpbb3 too. It doesn't bother me, but I'm sure your script will be useful to people who don't like it either. Personally, I don't like making style modifications via JS, but in some instances it's necessary like in this case. Still, I wonder if we can reach the same result with CSS. I have a few ideas, but they're kind of hackish -- especially the position related ones.. perhaps calc might be useful ..? hm.. this is something to think about.. Computer
Ace 1
Valued Member
Title :
God of Creation
Gender : Male
Age : 17
Posts : 2069
Points : 2541
Reputation : 70
Location : druid hill Park
Language : Eng, Fr, Loud
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile http://fmdesign.forumotion.com/u190

PostAce 1 on Wed 12 Oct 2016, 14:35

Oh true. Vertical align doesn't really work and I don't like using position unless the container is really small.

Mind sharing your ideas? Grin
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4205
Points : 8675
Reputation : 2108
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Google Chrome Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Wed 12 Oct 2016, 14:45

I was thinking calc might come in handy, but at the moment I'm drawing a blank. Toothless

It's like a journy for the holy grail, finding a solution that doesn't require javascript. I always used to do it back in the day. I'll probably look over it more later unless you beat me to the grail. Razz
Ace 1
Valued Member
Title :
God of Creation
Gender : Male
Age : 17
Posts : 2069
Points : 2541
Reputation : 70
Location : druid hill Park
Language : Eng, Fr, Loud
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile http://fmdesign.forumotion.com/u190

PostAce 1 on Wed 12 Oct 2016, 15:02

Oh WHAT I didn't think normal CSS could pass functions as the property values

I guess it's time to put this to use

Angel
Ace 1
Valued Member
Title :
God of Creation
Gender : Male
Age : 17
Posts : 2069
Points : 2541
Reputation : 70
Location : druid hill Park
Language : Eng, Fr, Loud
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile http://fmdesign.forumotion.com/u190

PostAce 1 on Thu 13 Oct 2016, 11:27

@Ange Tuteur Guess I won lol Razz

Code:
.forum-stats { height: 40px; }

.forum-stats > div {
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}


Last edited by Ace 1 on Fri 04 Nov 2016, 13:55; edited 1 time in total (Reason for editing : 42px --> 40px)
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4205
Points : 8675
Reputation : 2108
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Google Chrome Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Thu 13 Oct 2016, 15:02

Oh damn, that seems to be spot on ! Nice Surprised

@Ace 1 wrote:Oh WHAT I didn't think normal CSS could pass functions as the property values
There's a lot of experimental tech. Did you check out the CSS variables ? It's sorta like SASS.
https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables
Ace 1
Valued Member
Title :
God of Creation
Gender : Male
Age : 17
Posts : 2069
Points : 2541
Reputation : 70
Location : druid hill Park
Language : Eng, Fr, Loud
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile http://fmdesign.forumotion.com/u190

PostAce 1 on Thu 13 Oct 2016, 18:00

Oh snap, is this how you did ForumActif Edge?
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4205
Points : 8675
Reputation : 2108
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Google Chrome Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Fri 14 Oct 2016, 05:46

Nah, since the tech isn't a standard yet I just used a class name for the majority of colors. They are :

- .color-primary (69C)
- .color-secondary (345)
- .color-tertiary (FFF)

First two were used the most if I recall correctly.
Ace 1
Valued Member
Title :
God of Creation
Gender : Male
Age : 17
Posts : 2069
Points : 2541
Reputation : 70
Location : druid hill Park
Language : Eng, Fr, Loud
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile http://fmdesign.forumotion.com/u190

PostAce 1 on Fri 14 Oct 2016, 13:29

I read the browser compatibility and it works on everything but Explorer ._.

And everything I read about is "experimental" and "hasn't been released yet" smh. W3C needs to stop keeping all this good stuff from us.
Ace 1
Valued Member
Title :
God of Creation
Gender : Male
Age : 17
Posts : 2069
Points : 2541
Reputation : 70
Location : druid hill Park
Language : Eng, Fr, Loud
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile http://fmdesign.forumotion.com/u190

PostAce 1 on Fri 04 Nov 2016, 13:53

@Ange Tuteur When you gonna implement this babe Rose
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4205
Points : 8675
Reputation : 2108
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Google Chrome Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Fri 04 Nov 2016, 14:06

Forgot Shocked How's it now ? Surprised
Ace 1
Valued Member
Title :
God of Creation
Gender : Male
Age : 17
Posts : 2069
Points : 2541
Reputation : 70
Location : druid hill Park
Language : Eng, Fr, Loud
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile http://fmdesign.forumotion.com/u190

PostAce 1 on Fri 04 Nov 2016, 14:07

LES GOO

I'm important

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

 
Permissions in this forum:
You cannot reply to topics in this forum