Custom Identity Groups/自定义身份组

By G2LighterG2Lighter

Description

Sometimes we want to set and display a user's special identity on a website, and this snippet will address that

Code

[[module CSS]]

.printuser a:last-child[href*="http://www.wikidot.com/user:info/"] {
    display: block;
    font-size: .9em;
    transition: .1s ease;
    text-decoration: none !important;
}

.printuser a[href*="javas"] {
    display: none !important;
}

.printuser a:last-child[href*="http://www.wikidot.com/user:info/"]:hover {
    text-decoration: none !important;
    transform: scale(1.05);
}

.printuser>a:first-child:where(:only-of-type)::after {
    display: none !important;
}

.printuser a:last-child[href*="http://www.wikidot.com/user:info/"]::after {
    margin-top: -.5em;
    display: block;
    font-weight: 100;
    font-size: .7em;
    color: black;
    margin-right: auto;
    width: max-content;
}

.printuser a:last-child[href*="http://www.wikidot.com/user:info/USER NAME"]::after {
    content: 'GROUP';
}

.printuser {
    display: flex;
}

[[/module]]

In action

link to the implemented solution on a Wikidot site or put a working example here


Thanks to tsangk for this great snippet: conditional-blocks


text above inserted with:

[[include :snippets:if START |unique=1|type=equal|var1=%%name%%|var2=conditional-blocks]]
**##red|Thanks to tsangk for this great snippet:##** [[[code:conditional-blocks]]]
[[include :snippets:if END]]



Other snippets posted by G2Lighter

Better Sidebar/更好的侧边栏 - 12 Nov 2024 01:36


Rate this solution

If you think this solution is useful — rate it up!

rating: 0+x
Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License