| r2679 vs r2680 | ||
|---|---|---|
| ... | ... | |
| 111 | 111 | |
| 112 | 112 | == 나무나무마크구상 == |
| 113 | 113 | * 링크 > 분류/일반 링크/외부 링크(파일 불가) |
| 114 | \{{{#!html <div style="clear: both"/>}}} | |
| 115 | == clearfix | |
| 114 | ## \{{{#!html <div style="clear: both"/>}}} | |
| 115 | ## == clearfix | |
| 116 | 116 | 접기includeifsyntax각주일부 불가능 |
| 117 | ||
| 118 | ||
| 119 | {{{#!if input='냥[[링크|냥]]냥' | |
| 117 | ||
| 118 | input={{{냥[[링크|냥]]냥[[https://namu.wiki/w/사용자:nyangx3|냥]]냥}}} | |
| 119 | {{{#!wiki style="display: none" | |
| 120 | {{{#!if input='냥[[링크|냥]]냥[[https://namu.wiki/w/사용자:nyangx3|냥]]냥' | |
| 120 | 121 | }}} |
| 121 | {{{#!if href = null, linkPrint = null, break = false, linkColor='#0275d8' | |
| 122 | }}} | |
| 123 | {{{#!if linkOpen = input.indexOf('[['), linkClose = input.indexOf(']]') | |
| 122 | {{{#!if href = null, linkPrint = null, break = false, linkColor='#0275d8', outLink='' | |
| 123 | }}}{{{#!if linkOpen = input.indexOf('[['), linkClose = input.indexOf(']]') | |
| 124 | 124 | }}}{{{#!if linkRaw = input.substring(linkOpen, linkClose+2) |
| 125 | 125 | }}}{{{#!if linkOpen != -1 && linkClose != -1 && linkOpen+2 < linkClose |
| 126 | 126 | ## [[]] 인 경우 linkOpen+2 == linkClose 임 ^^^^^^^^^^^^^^^^^^^^^^ |
| ... | ... | |
| 153 | 153 | }}} |
| 154 | 154 | }}} |
| 155 | 155 | {{{#!if isLink = (href.startsWith('https://') || href.startsWith('http://') || href.startsWith('ftp://')), isLink |
| 156 | {{{#!if linkColor = 'none' | |
| 156 | {{{#!if linkColor = 'none', outLink = 'asdf' | |
| 157 | 157 | }}} |
| 158 | 158 | }}}{{{#!if isCategory = (href.startsWith('분류:')), isCategory |
| 159 | 159 | ## 나중에생각 - 실제로 분류되지는 않고(하고 싶어도 못 함 display: none으로 없어지는 것도 아니고) 그냥 분류 느낌만 내기 |
| 160 | 160 | }}}{{{#!if !(isCategory || isLink) |
| 161 | 161 | {{{#!if href = 'https://theseed.io/w/'+href |
| 162 | 162 | }}} |
| 163 | }}}{{{#!if input = input.substring(0, linkOpen) + '<div style="display: inline-table"><div style="overflow: hidden"><div style="margin-left: -1.2em"><a href="' + href + '">' + linkPrint + '</div></a></div></div></div>' + input.substring(linkClose + 2) | |
| 163 | }}}{{{#!if input = input.substring(0, linkOpen) + '<div style="display: inline-table"><div style="overflow: hidden"><div style="margin-left: -1.2em' + outLink + '"><a href="' + href + '"><div style="color: ' + linkColor + '; display: inline">' + linkPrint + '</div></a></div></div></div>' + input.substring(linkClose + 2) | |
| 164 | 164 | }}} |
| 165 | 165 | }}} |
| 166 | ||
| 167 | ||
| 168 | ||
| 169 | ||
| 170 | ||
| 171 | {{{#!html @input@}}} | |
| 166 | ########### | |
| 167 | {{{#!if h=null,a=null,b=false,c='#0275d8',d='' | |
| 168 | }}}{{{#!if e=input.indexOf('[['),x=input.indexOf(']]') | |
| 169 | }}}{{{#!if z=input.substring(e,x+2) | |
| 170 | }}}{{{#!if e!=-1&&x!=-1&&e+2<x | |
| 171 | {{{#!if g=z.indexOf('|') | |
| 172 | }}}{{{#!if g==-1 | |
| 173 | {{{#!if h=z.substring(2,z.length-2) | |
| 174 | }}}}}}{{{#!if g!=-1 | |
| 175 | {{{#!if (g==2)&&(g+1==z.length-2) | |
| 176 | {{{#!if b=true,input=input.substring(0,e)+input.substring(x+2) | |
| 177 | }}}}}}{{{#!if (g==2)&&!b | |
| 178 | {{{#!if b=true,h=z.substring(g+1,z.length-2),a=h | |
| 179 | }}}}}}{{{#!if (g+1==z.length-2)&&!b | |
| 180 | {{{#!if b=true,h=z.substring(2,g),a=h | |
| 181 | }}}}}}{{{#!if !b | |
| 182 | {{{#!if h=z.substring(2,g),a=z.substring(g+1,z.length-2) | |
| 183 | }}}}}}}}}{{{#!if isLink=(h.startsWith('https://')||h.startsWith('http://')||h.startsWith('ftp://')),isLink | |
| 184 | {{{#!if c='none',d='asdf' | |
| 185 | }}}}}}{{{#!if isCategory=(h.startsWith('분류:')),isCategory | |
| 186 | }}}{{{#!if !(isCategory||isLink) | |
| 187 | {{{#!if h='https://theseed.io/w/'+h | |
| 188 | }}}}}}{{{#!if input=input.substring(0,e)+'<div style="display:inline-table"><div style="overflow:hidden"><div style="margin-left:-1.2em'+d+'"><a href="'+h+'"><div style="color:'+c+';display:inline">'+a+'</div></a></div></div></div>'+input.substring(x+2) | |
| 189 | }}}}}} | |
| 190 | }}} | |
| 191 | output: {{{#!html @input@}}} | |
| 172 | 192 | == ㅁㄴㅇㄹ == |
| 173 | 193 | [include(a)]''''''[include(a)][include(a)] |
| 174 | 194 | [[]][include(a)][include(a)][include(a)] |
| ... | ... |