틀:별점: 두 판 사이의 차이

편집 요약 없음
편집 요약 없음
1번째 줄: 1번째 줄:
{{namucat|별점 틀|김찬/제작한 틀}}
{{namucat|별점 틀|김찬/제작한 틀}}
{{틀 도움
{{틀 도움
|날짜1=2023.07.06|업데이트1='''반별({{별점/stars|half|#373a3c}}) 구현''' 및 그에 따른 반올림 체계 재정립}}
|날짜1=2023.07.06|업데이트1='''반별({{별점/stars|half|#373a3c}}) 구현''' 및 그에 따른 반올림 체계 재정립
|날짜2=2023.07.12|업데이트2=값에 따라 점진적으로 별이 차오르도록 변경
}}
<onlyinclude><includeonly>{{css|별점}}<span class="stars-template" style="{{#if:{{{size|}}}|font-size: {{{size|}}};|}}">{{#if:{{{1|}}}|<!--
<onlyinclude><includeonly>{{css|별점}}<span class="stars-template" style="{{#if:{{{size|}}}|font-size: {{{size|}}};|}}">{{#if:{{{1|}}}|<!--


0 이상 0.5 미만
0
-->{{#ifexpr:{{{1|}}} >= 0 and {{{1|}}} < 0.5|<!--
-->{{#ifexpr:{{{1|}}} = 0|<!--
-->{{별점/stars|empty|{{{color|orange}}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}<!--
12번째 줄: 14번째 줄:
-->{{별점/stars|empty|{{{color|orange}}}}}|<!--
-->{{별점/stars|empty|{{{color|orange}}}}}|<!--


0.5 이상 1 미만
0 초과 1 미만
-->{{#ifexpr:{{{1|}}} >= 0.5 and {{{1|}}} < 1.0|<!--
-->{{#ifexpr:{{{1|}}} > 0 and {{{1|}}} < 1|<!--
-->{{별점/stars|half|{{{color|orange}}}}}<!--
-->{{별점/stars|half|{{{color|orange}}}|{{#expr:{{{1|}}}*100}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}<!--
20번째 줄: 22번째 줄:
-->{{별점/stars|empty|{{{color|orange}}}}}|<!--
-->{{별점/stars|empty|{{{color|orange}}}}}|<!--


1 이상 1.5 미만
1 이상 2 미만
-->{{#ifexpr:{{{1|}}} >= 1.0 and {{{1|}}} < 1.5|<!--
-->{{#ifexpr:{{{1|}}} >= 1.0 and {{{1|}}} < 2.0|<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}<!--
-->{{별점/stars|half|{{{color|orange}}}|{{#expr:({{{1|}}}-1)*100}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}|<!--
-->{{별점/stars|empty|{{{color|orange}}}}}|<!--


1.5 이상 2 미만
2 이상 3 미만
-->{{#ifexpr:{{{1|}}} >= 1.5 and {{{1|}}} < 2.0|<!--
-->{{#ifexpr:{{{1|}}} >= 2.0 and {{{1|}}} < 3.0|<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|half|{{{color|orange}}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}|<!--
 
2 이상 2.5 미만
-->{{#ifexpr:{{{1|}}} >= 2.0 and {{{1|}}} < 2.5|<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}<!--
-->{{별점/stars|half|{{{color|orange}}}|{{#expr:({{{1|}}}-2)*100}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}|<!--
-->{{별점/stars|empty|{{{color|orange}}}}}|<!--


2.5 이상 3 미만
3 이상 4 미만
-->{{#ifexpr:{{{1|}}} >= 2.5 and {{{1|}}} < 3.0|<!--
-->{{#ifexpr:{{{1|}}} >= 3.0 and {{{1|}}} < 4.0|<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|half|{{{color|orange}}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}|<!--
3 이상 3.5 미만
-->{{#ifexpr:{{{1|}}} >= 3.0 and {{{1|}}} < 3.5|<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|half|{{{color|orange}}}|{{#expr:({{{1|}}}-3)*100}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}|<!--
-->{{별점/stars|empty|{{{color|orange}}}}}|<!--


3.5 이상 4 미만
4 이상 5 미만
-->{{#ifexpr:{{{1|}}} >= 3.5 and {{{1|}}} < 4.0|<!--
-->{{#ifexpr:{{{1|}}} >= 4.0 and {{{1|}}} < 5.0|<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|half|{{{color|orange}}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}|<!--
4 이상 4.5 미만
-->{{#ifexpr:{{{1|}}} >= 4.0 and {{{1|}}} < 4.5|<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|empty|{{{color|orange}}}}}|<!--
4.5 이상 5 미만
-->{{#ifexpr:{{{1|}}} >= 4.5 and {{{1|}}} < 5.0|<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|full|{{{color|orange}}}}}<!--
-->{{별점/stars|half|{{{color|orange}}}|{{#expr:({{{1|}}}-4)*100}}}}|<!--
-->{{별점/stars|half|{{{color|orange}}}}}|<!--


5
5
92번째 줄: 62번째 줄:
-->{{별점/stars|full|{{{color|orange}}}}}|<!--
-->{{별점/stars|full|{{{color|orange}}}}}|<!--


--><strong class="error">변수 오류: 유효하지 않은 값입니다.</strong>}}}}}}}}}}}}}}}}}}}}}}|<!--
--><strong class="error">변수 오류: 유효하지 않은 값입니다.</strong>}}}}}}}}}}}}}}|<!--
--><strong class="error">변수 오류: 유효하지 않은 값입니다.</strong>}}</span></includeonly></onlyinclude>
--><strong class="error">변수 오류: 유효하지 않은 값입니다.</strong>}}</span></includeonly></onlyinclude>
{{목차제거}}
{{목차제거}}
98번째 줄: 68번째 줄:
  {<!---->{별점|''값''}}
  {<!---->{별점|''값''}}


{{math|0}}부터 {{math|5}} 사이의 숫자를 넣어 별점을 나타낼 수 있습니다. {{math|0}}부터 {{math|5}} 사이이기만 하면 정수가 아니어도 상관 없습니다. 이때는 소수점 첫째 자리 아래에서 '''반올림'''하여 처리됩니다. 즉 {{math|4}}는 {{별점|4}}로, {{math|4.5}}는 {{별점|4.5}}로, {{math|5}}는 {{별점|5}}로 표시됩니다. 변수를 입력하지 않거나, 변수가 {{math|0}} 미만 또는 {{math|5}} 초과일 경우 오류로 인식됩니다.
{{math|0}}부터 {{math|5}} 사이의 숫자를 넣어 별점을 나타낼 수 있습니다. {{math|0}}부터 {{math|5}} 사이이기만 하면 정수가 아니어도 상관 없습니다. 이때는 소수점에 따라 백분율을 계산하여 별이 점진적으로 차오릅니다. 즉 {{math|4}}는 {{별점|4}}로, {{math|4.4}}는 {{별점|4.4}}로, {{math|4.8}}은 {{별점|4.8}}로, {{math|5}}는 {{별점|5}}로 표시됩니다. 변수를 입력하지 않거나, 변수가 {{math|0}} 미만 또는 {{math|5}} 초과일 경우 오류로 인식됩니다.
 
{{math|0}}부터 {{math|0.5}} 단위로 별이 반 개씩 차오르며, 꽉 찬 다섯 개의 별은 오직 {{math|5}}의 자연수에서만 나타납니다.


{|{{style|class=wiki|align=center}}
텅 빈 다섯 개의 별은 오직 {{math|0}}의 정수에서, 꽉 찬 다섯 개의 별은 오직 {{math|5}}의 자연수에서만 나타납니다.
|-
!변수 값 {{math|{{=}}\alpha}}||출력
|-
|{{math|0\le\alpha\le0.4}}||{{별점|0}}
|-
|{{math|0.5\le\alpha\le0.9}}||{{별점|0.5}}
|-
|{{math|.01\le\alpha\le1.4}}||{{별점|1}}
|-
|{{math|1.5\le\alpha\le1.9}}||{{별점|1.5}}
|-
|{{math|2.0\le\alpha\le2.4}}||{{별점|2}}
|-
|{{math|2.5\le\alpha\le2.9}}||{{별점|2.5}}
|-
|{{math|3.0\le\alpha\le3.4}}||{{별점|3}}
|-
|{{math|3.5\le\alpha\le3.9}}||{{별점|3.5}}
|-
|{{math|4.0\le\alpha\le4.4}}||{{별점|4}}
|-
|{{math|4.5\le\alpha\le4.9}}||{{별점|4.5}}
|-
|{{math|\alpha{{=}}5.0}}||{{별점|5}}
|-
|{{math|\alpha<0}} 또는 {{math|\alpha>5}}
|rowspan=2|{{별점}}
|-
|미입력
|}


기본적으로 주황색이며, {{u|color}} 변수를 통해 별점의 색을 달리할 수도 있습니다.
기본적으로 주황색이며, {{u|color}} 변수를 통해 별점의 색을 달리할 수도 있습니다.

2023년 7월 12일 (수) 12:18 판

:별점
사용문서
새로고침
넘겨주기
이동하기
[ 주요 업데이트 노트 ]
2023.07.06 반별() 구현 및 그에 따른 반올림 체계 재정립
2023.07.12 값에 따라 점진적으로 별이 차오르도록 변경

설명

{{별점|}}

부터 사이의 숫자를 넣어 별점을 나타낼 수 있습니다. 부터 사이이기만 하면 정수가 아니어도 상관 없습니다. 이때는 소수점에 따라 백분율을 계산하여 별이 점진적으로 차오릅니다. 즉 로, 로, 로, 로 표시됩니다. 변수를 입력하지 않거나, 변수가 미만 또는 초과일 경우 오류로 인식됩니다.

텅 빈 다섯 개의 별은 오직 의 정수에서, 꽉 찬 다섯 개의 별은 오직 의 자연수에서만 나타납니다.

기본적으로 주황색이며, color 변수를 통해 별점의 색을 달리할 수도 있습니다.

size 변수에 숫자와 단위를 넣어 font-size 속성을 바꿈으로써 별점의 크기를 달리할 수 있습니다.

응용

자기 세계관에 별점을 달 수 있다?

실시간으로 변하는 변수를 별점 틀에 넣어 사용할 수 있습니다. 다른 사용자로부터 부터 까지의 점수를 받고 그 모든 점수를 합한 뒤 더해진 점수의 수만큼 나눈 숫자(즉, 평균값)가 곧 최종적으로 별점 틀의 변수로 인식되게 됩니다. 아이펠루스에서 처음 시작하여 윈테라, LRFU, 즈바이란트, 칠성고등학교 등 몇몇 세계관에서도 채택하였습니다.

하지만 안타깝게도 문서 편집에 로그인을 필수로 요구하는 제이위키 특성상 별점을 익명으로 부여할 수는 없습니다.

만일 이러한 별점 시스템을 추가하고 싶다면 하위 문서의 템플릿을 복사하여 틀:[세계관명] 별점 문서를 생성한 후 틀:세계관 별점을 참고하십시오.

기타

둘러보기

+
김찬 제작 틀
[ A~Z & etc. ]
[ ㄱ~ㅅ ]
[ ㅇ~ㅎ ]
※ 더 이상 사용하지 않거나 사용할 필요가 없는 경우 취소선 처리
※ 일부 극히 단순한 틀은 본 틀 목록에 미포함