[주의!] 문서의 이전 버전(에 수정)을 보고 있습니다. 최신 버전으로 이동
1. 개요[편집]
}}} |
2. wiki[편집]
2.1. 빈 공간[편집]
그냥 {{{#!wiki 만 넣어도 동작된다. 별도 설정한 양식이 없는 구문인데, 기본값(default)에 따른 출력으로 나오는 모양이다.
무난하게 출력된다.
2.2. style[편집]
style="" 그리고 콜론(:)[3], 스페이스바[4], 세미콜론(;)[5] 등 기호를 잘 입력해야 한다.style에 아무 것도 입력하지 않아도 (default) 출력할 수 있다.
종류 이름 또는 설정값을 잘못 입력할 경우 없는 설정값(깨진 설정값)으로 인식하여 출력된다.
가령 display:none을 입력해야 하는데, nope나 no 등으로 잘못 입력하면 입력하지 않은 것으로 읽어서 출력된다.
다시 말해서 정의되는 양식이름을 입력하고 양식에 따라 정의되는 설정값을 입력 양식에 맞게 입력해야 컴퓨터가 읽을 수 있으면서 편집자가 설정하고 싶은 양식으로 나오게 된다.
style="" 안에 매개변수와 그 값을 부여하는 표시(@매개변수=@)를 집어넣고 저장한 문서를 include로 호출할 때 style="" 안에 넣었던 매개변수에 값을 주고 호출하게 되면 style 안에 매개변수를 넣었던 특정 단락이 깨져서 그 특정 단락에 대한 설정이 적용되지 않게 되었다. 이런 트릭을 넣고 생성된 틀이 많이 있었다.wiki의 style안에는 CSS를 집어넣는다. 종류에 따라 먼저 기입한 순서대로 처리되는데, 같은 요소를 입력할 때 display 처럼 설정값에 따라 결과가 번복될 수 있는 요소가 있는가 하면 radial-gradient 처럼 나오는 결과를 중첩시키는 요소가 있다.
2.3. if 문법과 연동[편집]
if값에 따라 나오는 변수가 출력되는데, wiki 안에 들어갈 내용까지 반영되므로 입력할 수 있는 글자를 AutoCAD 단축키 입력하듯이[6] 줄여 입력할 수 있다. 다만, @ 기호는 열고 닫기가 없기 때문에 @를 잘 열고 잘 닫아줘야 한다.
이를테면 if 문법으로 {{{#!if this.di="display: inline;"를 먼저 정의하면 뒤에 wiki 문법을 쓸 때 {{{#!wiki style="display: inline;" 을 입력하는 대신 {{{#! wiki style="@di@" 만 입력해도 {{{#!wiki style="display: inline;을 쓴 것과 같게 나온다. 아예 앞의 style=" 부분도 {{{#!if this.sty="style=\"" 처럼 정의한 다음 {{{#! wiki @sty@@di@"로 줄여 입력시킬 수 있다.
아래는 모두 예시이며 쓰는 사람에 따라 다르게 쓸 수 있으므로 절대적이지는 않다.
이를테면 if 문법으로 {{{#!if this.di="display: inline;"를 먼저 정의하면 뒤에 wiki 문법을 쓸 때 {{{#!wiki style="display: inline;" 을 입력하는 대신 {{{#! wiki style="@di@" 만 입력해도 {{{#!wiki style="display: inline;을 쓴 것과 같게 나온다. 아예 앞의 style=" 부분도 {{{#!if this.sty="style=\"" 처럼 정의한 다음 {{{#! wiki @sty@@di@"로 줄여 입력시킬 수 있다.
아래는 모두 예시이며 쓰는 사람에 따라 다르게 쓸 수 있으므로 절대적이지는 않다.
- d="display:"
- db="display: block;"
- df="display: flex;"
- dg="display: grid;"
- dt="display: table;"
- di="display: inline;"
- dib="display: inline-block;"
- dit="display: inline-table;"
- dif="display: inline-flex;"
- dig="display: inline-grid;"
- dn="display: none;"
- b 또는 bd="border:"
- b 또는 bg="background:"
- blg="background: linear-gradient" 또는 lg="linear-gradient"
- brg="background: radial-gradient" 또는 rg="rinear-gradient"
- tor="to right"
- tol="to left"
2.4. 도트[편집]
3. style[편집]
Backend: 4200ff9; Frontend: bda2cf7; 업데이트가 있을 때 추가된 문법으로 추정된다. 앞의 위키(wiki)와는 다르게 여러 가지를 설정한 구성들 한 뭉치를 하나의 이름으로 저장할 수 있는 문법이다. 시범을 보이는 댓글에서 보다시피 스레드에도 지원이 되는 점을 보면 일반적인 {{{#!wiki }}} 로 마감되는 문법들과 연동된다. 특이하게 구성을 잘 살펴보면 html(hypertext markup language)에서 table row, table data를 줄여 tr, td로 부르는 부분과 tbady를 볼 수 있다. 당연하겠지만 꾸미기에는 CSS가 들어가 있다.
3.1. if 문법과 연동[편집]
놀랍게도 if 문법과 연동된다. 예를 들어 앞에 시범을 보이는 댓글에서
{{{#!style
/* scoped styles are not supported */
table.colored > tbody > tr > td:first-of-type {font-weight: bold;
}
table.colored > tbody > tr:nth-of-type(3n) > td:first-of-type {color: red;
}
table.colored > tbody > tr:nth-of-type(3n + 1) > td:first-of-type {color: lime;
}
table.colored > tbody > tr:nth-of-type(3n + 2) > td:first-of-type {color: blue;
}
/* media query is not supported */
@theseed-dark-mode {table.colored > tbody > tr:nth-of-type(3n) > td:first-of-type {color: maroon;}
table.colored > tbody > tr:nth-of-type(3n + 1) > td:first-of-type {color: green;}
table.colored > tbody > tr:nth-of-type(3n + 2) > td:first-of-type {color: navy;}
}
}}}
라는 문법을 쓰기 귀찮아서 if와 연동한다 할 때
{{{#!if s="table.colored > tbody > tr", n=":nth-of-type"
}}}{{{#!style
/* scoped styles are not supported */table.colored > tbody > tr@s@ > td:first-of-type {font-weight: bold;
}table.colored > tbody > tr@s@:nth-of-type@n@(3n) > td:first-of-type {color: red;
}table.colored > tbody > tr@s@:nth-of-type@n@(3n + 1) > td:first-of-type {color: lime;
}table.colored > tbody > tr@s@:nth-of-type@n@(3n + 2) > td:first-of-type {color: blue;
}
/* media query is not supported */
@theseed-dark-mode {table.colored > tbody > tr@s@:nth-of-type@n@(3n) > td:first-of-type {color: maroon;}table.colored > tbody > tr@s@:nth-of-type@n@(3n + 1) > td:first-of-type {color: green;}table.colored > tbody > tr@s@:nth-of-type@n@(3n + 2) > td:first-of-type {color: navy;}
}
}}}
식으로 줄여
{{{#!if s="table.colored > tbody > tr", n=":nth-of-type"
}}}{{{#!style
/* scoped styles are not supported */
@s@ > td:first-of-type {font-weight: bold;
}
@s@@n@(3n) > td:first-of-type {color: red;
}
@s@@n@(3n + 1) > td:first-of-type {color: lime;
}
@s@@n@(3n + 2) > td:first-of-type {color: blue;
}
/* media query is not supported */
@theseed-dark-mode {@s@@n@(3n) > td:first-of-type {color: maroon;}
@s@@n@(3n + 1) > td:first-of-type {color: green;}
@s@@n@(3n + 2) > td:first-of-type {color: navy;}
}
}}}
처럼 표현해도 잘 동작이 된다.
테스트 보기 (RAW 참고) [펼치기 · 접기]
1 | 1 |
2 | 2 |
3 | 3 |
4 | 4 |
5 | 5 |
6 | 6 |
7 | 7 |
8 | 8 |
9 | 9 |
10 | 10 |