Mercurial > libervia-templates
annotate default/static/css.js @ 16:8cdcbe0d7dee
blog: various appareance improvments:
- use new .box classe
- article as a maxium size and is expandable on click
- display comments in a different way
- author and date are now visible
- responsive design
- placeholders on comment input
- transitions
- various other improvments
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 04 May 2017 01:00:23 +0200 |
parents | c319291943be |
children | 494d740aa3d6 |
rev | line source |
---|---|
15
c319291943be
static: css.js (library for basic style manipulation) first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
1 function set_clicked_class_tag(tag_name, class_name='clicked') { |
c319291943be
static: css.js (library for basic style manipulation) first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
2 for (let elt of document.getElementsByTagName(tag_name)) { |
c319291943be
static: css.js (library for basic style manipulation) first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
3 elt.classList.toggle(class_name); |
c319291943be
static: css.js (library for basic style manipulation) first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
4 } |
c319291943be
static: css.js (library for basic style manipulation) first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
5 } |
c319291943be
static: css.js (library for basic style manipulation) first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
6 |
c319291943be
static: css.js (library for basic style manipulation) first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
7 function set_clicked_class_id(trigger_elem_id, target_elem_id=null, class_name='clicked') { |
c319291943be
static: css.js (library for basic style manipulation) first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
8 if (target_elem_id === null) { target_elem_id = trigger_elem_id; } |
c319291943be
static: css.js (library for basic style manipulation) first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
9 document.getElementById(trigger_elem_id).addEventListener( |
c319291943be
static: css.js (library for basic style manipulation) first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
10 "click", |
c319291943be
static: css.js (library for basic style manipulation) first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
11 function() { |
c319291943be
static: css.js (library for basic style manipulation) first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
12 document.getElementById(target_elem_id).classList.toggle(class_name); |
c319291943be
static: css.js (library for basic style manipulation) first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
13 } |
c319291943be
static: css.js (library for basic style manipulation) first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
14 ); |
c319291943be
static: css.js (library for basic style manipulation) first draft
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
15 } |