테이블은 날짜 선택과 같은 타사의 캘랜더 모듈에서 많이 되어 기본적으로 스타일을 사용자가 선택하도록 설계되었습니다. 기본 클래스 .table을 <table>에 추가 한 다음 사용자 정의 스타일이나 다양한 포함 된 추가 클래스로 확장하면됩니다.
가장 기본적인 테이블 마크 업을 사용하여 테이블 기반 테이블이 부트스트랩 에서 어떻게 나타나는지 알수 있습니다.
.table-bordered 클래스를 추가하여 테이블과 셀의 모든 테두리를 변경할 수 있습니다.
#
First Name
Last Name
Username
1
Mark
Otto
@mdo
2
Mark
Otto
@TwBootstrap
3
Jacob
Thornton
@fat
4
Larry the Bird
@twitter
<tableclass="table table-bordered"><thead><tr><th>#</th><th>First Name</th><th>Last Name</th><th>Username</th></tr></thead><tbody><tr><thscope="row">1</th><td>Mark</td><td>Otto</td><td>@mdo</td></tr><tr><thscope="row">2</th><td>Mark</td><td>Otto</td><td>@TwBootstrap</td></tr><tr><thscope="row">3</th><td>Jacob</td><td>Thornton</td><td>@fat</td></tr><tr><thscope="row">4</th><tdcolspan="2">Larry the Bird</td><td>@twitter</td></tr></tbody></table>
#
First Name
Last Name
Username
1
Mark
Otto
@mdo
2
Mark
Otto
@TwBootstrap
3
Jacob
Thornton
@fat
4
Larry the Bird
@twitter
<tableclass="table table-bordered table-inverse"><thead><tr><th>#</th><th>First Name</th><th>Last Name</th><th>Username</th></tr></thead><tbody><tr><thscope="row">1</th><td>Mark</td><td>Otto</td><td>@mdo</td></tr><tr><thscope="row">2</th><td>Mark</td><td>Otto</td><td>@TwBootstrap</td></tr><tr><thscope="row">3</th><td>Jacob</td><td>Thornton</td><td>@fat</td></tr><tr><thscope="row">4</th><tdcolspan="2">Larry the Bird</td><td>@twitter</td></tr></tbody></table>
마우스에 반응하는 행
.table-hover t클래스를 추가하여 테이블행에 마우스 포인터가 올라오면 스타일을 변경하도록 지정할 수 있습니다.
#
First Name
Last Name
Username
1
Mark
Otto
@mdo
2
Jacob
Thornton
@fat
3
Larry the Bird
@twitter
<tableclass="table table-hover"><thead><tr><th>#</th><th>First Name</th><th>Last Name</th><th>Username</th></tr></thead><tbody><tr><thscope="row">1</th><td>Mark</td><td>Otto</td><td>@mdo</td></tr><tr><thscope="row">2</th><td>Jacob</td><td>Thornton</td><td>@fat</td></tr><tr><thscope="row">3</th><tdcolspan="2">Larry the Bird</td><td>@twitter</td></tr></tbody></table>
#
First Name
Last Name
Username
1
Mark
Otto
@mdo
2
Jacob
Thornton
@fat
3
Larry the Bird
@twitter
<tableclass="table table-hover table-inverse"><thead><tr><th>#</th><th>First Name</th><th>Last Name</th><th>Username</th></tr></thead><tbody><tr><thscope="row">1</th><td>Mark</td><td>Otto</td><td>@mdo</td></tr><tr><thscope="row">2</th><td>Jacob</td><td>Thornton</td><td>@fat</td></tr><tr><thscope="row">3</th><tdcolspan="2">Larry the Bird</td><td>@twitter</td></tr></tbody></table>
작은 테이블
.table-sm 클래스를 사용하여 셀크기를 반으로 줄임으로써 작은 테이블을 만들 수 있습니다.
#
First Name
Last Name
Username
1
Mark
Otto
@mdo
2
Jacob
Thornton
@fat
3
Larry the Bird
@twitter
<tableclass="table table-sm"><thead><tr><th>#</th><th>First Name</th><th>Last Name</th><th>Username</th></tr></thead><tbody><tr><thscope="row">1</th><td>Mark</td><td>Otto</td><td>@mdo</td></tr><tr><thscope="row">2</th><td>Jacob</td><td>Thornton</td><td>@fat</td></tr><tr><thscope="row">3</th><tdcolspan="2">Larry the Bird</td><td>@twitter</td></tr></tbody></table>
#
First Name
Last Name
Username
1
Mark
Otto
@mdo
2
Jacob
Thornton
@fat
3
Larry the Bird
@twitter
<tableclass="table table-sm table-inverse"><thead><tr><th>#</th><th>First Name</th><th>Last Name</th><th>Username</th></tr></thead><tbody><tr><thscope="row">1</th><td>Mark</td><td>Otto</td><td>@mdo</td></tr><tr><thscope="row">2</th><td>Jacob</td><td>Thornton</td><td>@fat</td></tr><tr><thscope="row">3</th><tdcolspan="2">Larry the Bird</td><td>@twitter</td></tr></tbody></table>
컨텍스트 클래스
컨텍스트 클래스를 사용하여 행 혹은 셀의 색상을 지정할 수 있습니다.
Type
Column heading
Column heading
Column heading
Active
Column content
Column content
Column content
Default
Column content
Column content
Column content
Primary
Column content
Column content
Column content
Secondary
Column content
Column content
Column content
Success
Column content
Column content
Column content
Danger
Column content
Column content
Column content
Warning
Column content
Column content
Column content
Info
Column content
Column content
Column content
Light
Column content
Column content
Column content
Dark
Column content
Column content
Column content
<!-- On rows --><trclass="table-active">...</tr><trclass="table-primary">...</tr><trclass="table-secondary">...</tr><trclass="table-success">...</tr><trclass="table-danger">...</tr><trclass="table-warning">...</tr><trclass="table-info">...</tr><trclass="table-light">...</tr><trclass="table-dark">...</tr><!-- On cells (`td` or `th`) --><tr><tdclass="table-active">...</td><tdclass="table-primary">...</td><tdclass="table-secondary">...</td><tdclass="table-success">...</td><tdclass="table-danger">...</td><tdclass="table-warning">...</td><tdclass="table-info">...</td><tdclass="table-light">...</td><tdclass="table-dark">...</td></tr>
.
#
Column heading
Column heading
Column heading
1
Column content
Column content
Column content
2
Column content
Column content
Column content
3
Column content
Column content
Column content
4
Column content
Column content
Column content
5
Column content
Column content
Column content
6
Column content
Column content
Column content
7
Column content
Column content
Column content
8
Column content
Column content
Column content
9
Column content
Column content
Column content
<!-- On rows --><trclass="bg-primary">...</tr><trclass="bg-success">...</tr><trclass="bg-warning">...</tr><trclass="bg-danger">...</tr><trclass="bg-info">...</tr><!-- On cells (`td` or `th`) --><tr><tdclass="bg-primary">...</td><tdclass="bg-success">...</td><tdclass="bg-warning">...</td><tdclass="bg-danger">...</td><tdclass="bg-info">...</td></tr>
반응형 테이블
.table 클래스에 .table-reponsive 클래스를 추가하여 테이블에 반응성을 추가할 수 있으며, 768px 작은 해상도에서 가로로 스크롤 되게 변경합니다. 그 이상의 크기에서는 변동이 없습니다.
수직 클립핑/절단
반응 형 테이블은 overflow-y : hidden을 사용합니다.이 오버 플로우는 테이블의 아래쪽이나 위쪽 가장자리를 넘어서는 모든 내용을 잘라냅니다. 특히 이것은 드롭 다운 메뉴 및 기타 타사 위젯을 잘라낼 수 있습니다.
지난번에 레드마인 플러그인 설치하기에 이어서 레드마인 테마 변경 방법에 대해 알아 보겠습니다. 사용자들이 많이 추천하고 있는 Circle Theme 를 적용할 예정입니다. 테마 다운로드를 위하여 아래 링크로 이동합니다. https://www.redmineup.com/pages/themes/circle 1. 테마 다운로드 Download NOW 버튼을 클릭하고 다운로드 링크를 수신할 메일주소를 입력합니다. 이메일 수신함을 확인해 보면 아래와 같이 테마 다운로드 링크가 포함된 이메일을 확인할 수 있습니다 2. FTP 를 통한 파일 전송 파일 다운로드가 완료 되었으면 압축을 해제 한후 서버에 접속하여 아래 경로에 파일을 복사합니다. /usr/share/redmine/public/themes/ 3. 서버 확인 및 서비스 재시작 서버에 SSH 접속 후 아래 경로와 같이 파일이 정상적으로 존재하는지 확인 합니다. /usr/share/redmine/public/themes/circle/stylesheets/application.css 4. 아파치 서비스 재시작 테마 적용을 위해 레드마인 서비스를 재시작 합니다. # service apache2 restart 5. 테마 적용 레드마인에 로그인 후 테마 설정을 변경 합니다. 설정 – 표시방식-테마 항목에서 Circle 테마를 선택합니다. 테마 적용 화면 입니다. 기존 테마에 비해 글자 크기가 증가 되어 가독성이 많이 좋아진 느낌 입니다. 이상으로 테마 설정이 마무리 되었습니다.
Java8 Stream 가이드 1. 개요 Java 8의 새로운 기능 Stream에 대해 설명합니다. 2. Stream API Java 8의 주요 새로운 기능 중 하나는 여러가지 요소(element) 처리를 위한 매우 강력한 스트림 기능인 java.util.stream 입니다 . 클래스는 Stream 이며, T 타입 기반의 Stream을 다양한 방법으로 생성할 수 있습니다. 2.1. Stream 생성 stream () 및 of () 메소드를 사용하여 콜렉션 또는 배열과 같은 다른 요소 소스에서 스트림을 작성 String [ ] arr = new String [ ] { "a" , "b" , "c" } ; Stream < String > stream = Arrays . stream ( arr ) ; stream = Stream . of ( "a" , "b" , "c" ) ; stream 을 생성하는 쉬운 방법은 컬렉션 인터페이스를 통해 생성할 수 있습니다. Stream < String > stream = list . stream ( ) ; 2.2. 멀티쓰레딩 Streams stream API는 또한 스트림 요소에서 병렬 모드로 작업을 실행 하는 parallelStream() 메서드를 제공하여 멀티 스레딩을 단순화 합니다. 아래 코드 는 스트림의 모든 요소에 대해 doWork () 메소드 를 병렬 로 실행할 수 있도록 합니다 list . parallelStream ( ) . forEach ( element - > doWork ( element ) ) ; 3. Stream 사용법 스트림에서 제공하는 함수는 크게 중간 작업 (return Stream, self-return )과 연산작업 (특정 타입으로 return ) 으로 나뉩니다. long count = list . ...
지난 포스팅에서 Ubuntu 서버의 최신 Kernel 적용 방법에 대해 알아보았습니다. 지난 포스팅 보러가기 그런데 몇개의 인스턴스를 업데이트를 진행 하다보니 Kernel 업데이트 도중 DISK 저장공간 부족으로 인해 업데이트가 불가능한 현상이 발생하였습니다. 실제 디스크 용량은 충분 하여 아래 명령어를 통해 확인해 보니 inode 가 100% 사용 중이었습니다. $ df -i cs 검색해 보니 inode 확보를 위해서 이전커널 데이터를 삭제해야 되는것을 확인할 수 있었습니다. /usr/src 폴더로 이동해 커널 정보를 확인해 보면 이전버전의 커널 데이터가 버전별로 줄지어 용량을 차지하고 있는것을 보실수 있습니다. 아래 명령어를 실행하여 이전버전 커널 데이터를 정리할 수 있습니다. $ sudo apt autoremove cs 디스크 용량을 2,022 MB 확보할수 있다는 메시지가 표출 됩니다. "Y" 를 입력하고 넘어갑니다. 작업이 완료되면 아래 그림과 같이 표출됩니다. /usr/src 폴더의 파일을 확인해보면 최신 버전 이외에는 모두 삭제된 것을 확인 할 수 있습니다. 다시 inode 정보를 확인해 보면 가용영역이 늘어난 것을 확인할 수 있습니다. <수동으로 오래된 커널 파일 삭제하기> $ sudo apt autoremove cs 명령어 실행시 " apt-get –f install " 작업이 필요...
안녕하세요. 명동섞어찌개입니다. SVG (Scalable Vector Graphics) 는 이름 그대로 Bitmap 이미지와 달리 확대, 축소해도 깨지지 않는 이미지 포맷이죠. 요새 아이콘을 화면에 넣을 때 많이 쓰는 방법으로 아이콘 폰트를 임베딩해서 쓰거나, svg 아이콘을 다운받아 쓰는 법 외에 SVG 아이콘을 그려서 화면에 적용하는 아주 간단한 팁을 알려드릴께요! 1. Adobe 일러스트레이터를 켭니다. 없으신 분은.. 디자이너분께 부탁드려보시거나 회사 라이센스 프로그램이 있을 경우 그걸 써보세요 (협업~) 2. 일러스트레이터에서 필요한 아이콘을 그립니다. 굳이 코딩으로 어렵게 계산해서 그리실 필요가 전혀 없습니다. 그냥 보면서 그립니다. 3. 아이콘을 선택한 후 복사합니다. (Ctrl + C) 4. 새 문서를 만든 뒤 붙여넣기 합니다. (Ctrl + V) [ icon-add-user-on.svg] 끝. 참 쉽죠?! 5. 마지막으로 CSS 에 적용합니다. 저 같은 경우는 일반적으로 이런 식으로 사용합니다. [layout.css] 1 2 3 . customIcon : before { content: '' ; position: absolute ; top: 12 px ; left: 3 px ; background - size: 20 px auto ; background - repeat: no - repeat ; width: 20 px ; height: 20 px ;} . addUser { background - image: url ( assets / icons / icon - add - user - on . svg );} [html] 1 < i class = "customIcon addUser" ></ i >
Data Analytics에서 파이썬은 상당히 유용한 패키지들을 많이 제공한다. 지금부터 파이썬과 함께 쓰면 유용한 패키지들에 대해서 알아본다. 앞으로 진행하게 될 텐서플로우도 마찬가지다. 이번 장에서 살펴 볼 패키지들은 텐서플로우를 사용하면서도 많이 활용될 것들이다. NUMPY Numerical Python의 줄임말로 다차원 배열인 ndarray(N-dimensional array)와 선형대수, 난수 발생 등의 수학적 계산에 많이 사용된다. 파이썬의 리스트 자료구조는 다양한 자료형을 저장할 수 있어 매유 유연하지만 메모리 점유 공간이 많고 속도가 느려지고, 프로그램 오류를 발생시키는 경우가 많다. 이러한 문제를 해결하기 위해 numpy의 ndarray를 사용한다. numpy의 ndarray 사용하기 import numpy as np a = [ 1 , 2 , 3 , 4 , 5 , 6 ] npa = np.array(a) print ( type (a)) print ( type (npa)) print (npa.dtype) b = [ 1.0 , 2.0 , 3.0 , 4.0 , 5.0 ] npb = np.array(b) print (npb.dtype) print (npa[ 0 ]) npa[ 0 ] = 10 print (a) npc = np.array([[ 1 , 2 ] , [ 3 , 4 ]]) print (npc[ 0 , 0 ] , npc[ 0 , 1 ]) 실행결과 <class 'list'> <class 'numpy.ndarray'> int32 float64 1 [1, 2, 3, 4, 5, 6] 1 2 numpy의 ndarray는 리스트를 사용하는 방법과 유사하게 사용할 수 있다. 많이 쓰이는 함수 import numpy as np print (np.zeros( 5 )) print (np.zeros(( 3 , 3 ))) print (np.ones( 5 )...
댓글
댓글 쓰기