FM Design
Would you like to react to this message? Create an account in a few clicks or log in to continue.

IMPORTANT

FM Design is in read-only mode, please click here for more information.

Latest topics
» Forumactif Edge - Releases
by Ange Tuteur Tue 03 Sep 2019, 11:49

» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21

» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28

» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15

» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11

» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24

» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58

» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50

» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22

» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12

» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10

» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51

» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11

» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19

» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34

Recent Tutorials
Top posting users this month

Who is online?
In total there are 27 users online :: 0 Registered, 0 Hidden and 27 Guests :: 1 Bot

None

[ View the whole list ]


Most users ever online was 515 on Tue 14 Sep 2021, 15:24

[Implemented] Forum Stats Look

View previous topic View next topic Go down

Ace 1
Ace 1
Valued Member
Gender : Unspecified
Age : 24
Posts : 2153
Points : 5318
Reputation : 95
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
https://fmdesign.forumotion.com/u190

PostAce 1 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
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12042
Reputation : 2375
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur 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
Ace 1
Valued Member
Gender : Unspecified
Age : 24
Posts : 2153
Points : 5318
Reputation : 95
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
https://fmdesign.forumotion.com/u190

PostAce 1 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
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12042
Reputation : 2375
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur 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
Ace 1
Valued Member
Gender : Unspecified
Age : 24
Posts : 2153
Points : 5318
Reputation : 95
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
https://fmdesign.forumotion.com/u190

PostAce 1 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
Ace 1
Valued Member
Gender : Unspecified
Age : 24
Posts : 2153
Points : 5318
Reputation : 95
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
https://fmdesign.forumotion.com/u190

PostAce 1 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
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12042
Reputation : 2375
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur 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
Ace 1
Valued Member
Gender : Unspecified
Age : 24
Posts : 2153
Points : 5318
Reputation : 95
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
https://fmdesign.forumotion.com/u190

PostAce 1 Thu 13 Oct 2016, 18:00

Oh snap, is this how you did ForumActif Edge?
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12042
Reputation : 2375
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur 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
Ace 1
Valued Member
Gender : Unspecified
Age : 24
Posts : 2153
Points : 5318
Reputation : 95
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
https://fmdesign.forumotion.com/u190

PostAce 1 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
Ace 1
Valued Member
Gender : Unspecified
Age : 24
Posts : 2153
Points : 5318
Reputation : 95
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
https://fmdesign.forumotion.com/u190

PostAce 1 Fri 04 Nov 2016, 13:53

@Ange Tuteur When you gonna implement this babe Rose
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12042
Reputation : 2375
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Fri 04 Nov 2016, 14:06

Forgot Shocked How's it now ? Surprised
Ace 1
Ace 1
Valued Member
Gender : Unspecified
Age : 24
Posts : 2153
Points : 5318
Reputation : 95
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
https://fmdesign.forumotion.com/u190

PostAce 1 Fri 04 Nov 2016, 14:07

LES GOO

I'm important [Implemented] Forum Stats Look 1f60a
Sponsored content

PostSponsored content

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