From 4426fbca8b382c62d007e11c10fe937658bbe732 Mon Sep 17 00:00:00 2001 From: Castro0o Date: Thu, 16 Apr 2020 11:36:57 +0200 Subject: [PATCH 01/15] image parent links: link to image file --- dumpwiki.py | 23 ++++++++++++++++++----- static/archive.css | 2 -- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/dumpwiki.py b/dumpwiki.py index 7a37930..c4fc24e 100644 --- a/dumpwiki.py +++ b/dumpwiki.py @@ -55,15 +55,25 @@ def filenameforlink(href): href = urlquote(href) return href -def rewritelinks (html): - t = html5lib.parseFragment(html, treebuilder = "etree", namespaceHTMLElements = False) +def rewriteimglinks(tree): + # t = html5lib.parseFragment(html, treebuilder = "etree", namespaceHTMLElements = False) + + # invoke after img src have be rewritten # remove links to wiki File: pages - for a in t.findall(".//a[@class='image']"): # select img wrapping a + for a in tree.findall(".//a[@class='image']"): # select img wrapping a href = a.attrib.get('href') - if a.findall(".//img") and 'File:' in href: # ensure a has child: img - a.attrib['href'] = 'javascript:void(0);' # disable href + if a.findall(".//img"): # ensure a has child: img + img = a.find(".//img") + img_src = img.attrib['src'] + a.attrib['href'] = img_src # 'javascript:void(0);' # disable href + a.attrib['target'] = "_blank" + print(a) + print(ET.tostring(a, method="html", encoding="unicode")) + return tree +def rewritelinks (html): + t = html5lib.parseFragment(html, treebuilder = "etree", namespaceHTMLElements = False) for a in t.findall(".//*[@href]"): linkclass = a.attrib.get("class", "") href = a.attrib.get("href") @@ -108,6 +118,9 @@ def rewriteimgs(html): img.attrib['srcset'] = "" # rm srcset value:it prevent imgs displaying img.attrib['width'] = "" img.attrib['height'] = "" + + t = rewriteimglinks(tree=t) + html = ET.tostring(t, method="html", encoding="unicode") return html diff --git a/static/archive.css b/static/archive.css index fd416eb..b3dea09 100644 --- a/static/archive.css +++ b/static/archive.css @@ -12,5 +12,3 @@ a:hover { text-decoration: none; color: blue; } - -a.image {cursor: default!important;} /* KEEP THIS: it is important to avoid images to seeming like links */ \ No newline at end of file From 875de65e35c11ac04ff157aa3a7368c09ccb724b Mon Sep 17 00:00:00 2001 From: Castro0o Date: Thu, 16 Apr 2020 14:24:50 +0200 Subject: [PATCH 02/15] TODO overview page --- dumpwiki.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dumpwiki.py b/dumpwiki.py index c4fc24e..918be0b 100644 --- a/dumpwiki.py +++ b/dumpwiki.py @@ -57,7 +57,8 @@ def filenameforlink(href): def rewriteimglinks(tree): - # t = html5lib.parseFragment(html, treebuilder = "etree", namespaceHTMLElements = False) + #on Overview_main_page + # add link to publication on # invoke after img src have be rewritten # remove links to wiki File: pages From 1d6026da5f0296aa4f260843234edd3c3112fc2a Mon Sep 17 00:00:00 2001 From: Damlanur Date: Thu, 16 Apr 2020 19:51:02 +0200 Subject: [PATCH 03/15] css Changes --- static/archive.css | 44 +++++++++++++++++++++++++++++++++++++++++++- static/stats.css | 0 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 static/stats.css diff --git a/static/archive.css b/static/archive.css index fd416eb..e395ae5 100644 --- a/static/archive.css +++ b/static/archive.css @@ -1,6 +1,48 @@ body { background-color: #aaa4a0; - font-family: Arial, Helvetica, sans-serif; + color: #371F10; + font-family: Roboto Mono, monospace; +} +.pagelink{ + position: fixed; + display: inline; + left:0px; + width:20px; + height:20px; + padding:10px; + background-color: white; + z-index: 10; + font-size: 18px; + text-align: center; + border-top-style: solid; + border-right-style: solid; + border-bottom-style: solid; + /*border-style: solid;*/ + border-width: 1px; + border-color: #371F10; + +} + +.pagelink:hover{ + background-color: #0BEFEB; +} +.pagelink a{ + text-decoration: none; +} + +.pagelink .pagename{ + display: inline; + position: absolute; + width: auto; + padding: 5px; + margin-left: 25px; + font-size: 13px; + background-color: white; + visibility: hidden; +} + +.pagelink:hover .pagename{ + visibility: visible; } a, a:visited{ diff --git a/static/stats.css b/static/stats.css new file mode 100644 index 0000000..e69de29 From 8c232395d693f8359c266d38a8ccdb65336aed04 Mon Sep 17 00:00:00 2001 From: Damlanur Date: Thu, 16 Apr 2020 20:25:07 +0200 Subject: [PATCH 04/15] css Changes --- static/archive.css | 11 +++++++++++ static/topicformat.css | 30 +----------------------------- 2 files changed, 12 insertions(+), 29 deletions(-) diff --git a/static/archive.css b/static/archive.css index e395ae5..f0042b1 100644 --- a/static/archive.css +++ b/static/archive.css @@ -45,6 +45,17 @@ body { visibility: visible; } +h1 { + position: fixed; + right:0%; + top:5%; + text-align: right; + background-color: rgba(11,239,235,0.7); + padding: 3px 35px 3px 10px; + z-index: 10; + font-size: 28px; +} + a, a:visited{ color:black; text-decoration: underline; diff --git a/static/topicformat.css b/static/topicformat.css index 001e902..060f0da 100644 --- a/static/topicformat.css +++ b/static/topicformat.css @@ -5,7 +5,6 @@ body { padding-right: 120px; } - .grid-container { display: inline-grid; grid-template-columns: repeat(8, 1fr); @@ -28,7 +27,6 @@ body { z-index: 5; } - .img { display: inline-block; border-style: hidden hidden solid hidden; @@ -38,7 +36,6 @@ body { .title { display:block; - font-family: Roboto Mono, monospace; font-size: large; font-weight: 700; } @@ -48,7 +45,6 @@ body { font-weight: normal; } - .metatext { display: inline-block; width: 300px; @@ -56,45 +52,22 @@ body { border-style: hidden; } - -.thumbborder { - position: relative; - max-width: 100%; - max-height: 100%; - -} - - /*links*/ a:link { text-decoration: none; - color: black; } a:visited { text-decoration: none; - color: black; } -/* -.metatext:hover a { - color: white; -} -*/ + a:hover { background-color: #0BEFEB; opacity: 0.7; color: white; - } -/* -.metatext:hover { - background-color: #0BEFEB; - color: white; - -} -*/ h1 { position: fixed; right:0%; @@ -104,7 +77,6 @@ h1 { opacity: 0.5; padding: 3px 30px 3px 10px; z-index: 10; - color: white; font-size: 32px; } From 40788358feee486c251f5af7cb805acf427c79c7 Mon Sep 17 00:00:00 2001 From: Sandra Date: Thu, 16 Apr 2020 21:20:28 +0200 Subject: [PATCH 05/15] icon size --- static/archive.css | 8 ++++---- static/title.css | 46 +++++++++++++++++----------------------------- 2 files changed, 21 insertions(+), 33 deletions(-) diff --git a/static/archive.css b/static/archive.css index f0042b1..0c99a6b 100644 --- a/static/archive.css +++ b/static/archive.css @@ -7,12 +7,12 @@ body { position: fixed; display: inline; left:0px; - width:20px; - height:20px; - padding:10px; +/* width:20px; + height:20px;*/ + padding: 0px 5px 0px 5px; background-color: white; z-index: 10; - font-size: 18px; + font-size: 30px; text-align: center; border-top-style: solid; border-right-style: solid; diff --git a/static/title.css b/static/title.css index 8f4e892..a9e8614 100644 --- a/static/title.css +++ b/static/title.css @@ -2,15 +2,16 @@ body { background-color: #F4EBE8; font-family: Roboto Mono; } + .grid-container { display: grid; grid-template-columns: repeat(4, 1fr); grid-gap: 10px; position: absolute; top: 25%; - width: 82%; - height: auto; - right: 8%; + width: 82%; + height: auto; + right: 8%; text-align: : center; z-index: 5; @@ -26,7 +27,6 @@ body { position: relative; max-width: 100%; max-height: 100%; - } @@ -53,12 +53,12 @@ h1 { right:0%; top:5%; text-align: right; - background-color: #0BEFEB; + background-color: rgba(11,239,235,0.7); padding: 3px 35px 3px 10px; z-index: 10; color: black; - font-size: 28px; - opacity: 0.7; + font-size: 27px; + color: #371F10; } h2{ @@ -66,18 +66,18 @@ h2{ right: 0%; top: 15%; text-align: left; - background-color: #0BEFEB; - /*color: black;*/ + background-color: rgba(11,239,235,0.7); padding: 3px 35px 3px 10px; z-index: 10; font-size: 20px; opacity: 0.7; + color: #371F10; } .viewnav { position: fixed; - bottom:0%; - left:0%; + bottom: 0%; + left: 0%; background-color: transparent; width: 10%; z-index: 10; @@ -86,7 +86,7 @@ h2{ .collapsible2 { background-color: transparent; - color: black; + color: red; cursor: pointer; padding: 0px; width: 100%; @@ -221,23 +221,10 @@ a.content:link { color:white; } -/*.metadata_links { - display: inline-block; - width: 100%; - position: absolute; - right: 0%; - padding: 10px; - text-align: left; - background-color: blue; - font-size: 18px; - -}*/ - .metadata_organization { font-size: 14px; } - .fbtn { font-style: italic; } @@ -245,7 +232,7 @@ a.content:link { .smw-template-furtherresults { display: none; } - +/* .orglink { position: fixed; top: 30%; @@ -266,7 +253,7 @@ a.content:link { padding: 5px 0; font-size: 15px; - /* Position the tooltip */ + position: absolute; left: 50px; z-index: 10; @@ -296,7 +283,7 @@ a.content:link { padding: 5px 0; font-size: 15px; - /* Position the tooltip */ + position: absolute; left: 50px; z-index: 10; @@ -326,7 +313,7 @@ a.content:link { padding: 5px 0; font-size: 15px; - /* Position the tooltip */ + position: absolute; left: 50px; z-index: 10; @@ -336,3 +323,4 @@ a.content:link { visibility: visible; } +*/ \ No newline at end of file From c773995dc9e908dd1d7d4829f44d0d454c1c8c42 Mon Sep 17 00:00:00 2001 From: "E.zn" Date: Thu, 16 Apr 2020 23:47:20 +0200 Subject: [PATCH 06/15] almost there --- static/orgs.css | 156 +++++++++++++++++++----------------------------- 1 file changed, 60 insertions(+), 96 deletions(-) diff --git a/static/orgs.css b/static/orgs.css index 7e4b8e1..8110433 100644 --- a/static/orgs.css +++ b/static/orgs.css @@ -1,151 +1,115 @@ + +#top { + padding-top: 20px; + padding-left: 50px; +} + body { background-color: #F4EBE8; font-family: Roboto Mono; - font-size:11.5px; - + font-size:14px; } +/* Page title */ h1 { position: fixed; right:0%; - top:3%; + top:5%; text-align: right; background-color: #0BEFEB; - padding: 15px 85px 15px 30px; - z-index: 10; - color: #371F10; - font-size: 28px; - opacity: 0.7; -} - -/* -h1 { - position: fixed; - right:0%; - top:3%; - text-align: right; - background-color: transparent; - padding: 10px 30px 30px 20px; + padding: 3px 35px 3px 10px; z-index: 10; color: black; font-size: 28px; - border: 1px solid blue; - border-right: none; + opacity: 0.7; + color: #371F10; } -*/ +/* Organizations list */ .collapsible{ padding-left: 70px; - line-height: 0%; + line-height: 1; color: #371F10; } .active, .collapsible:hover { - color: red; + color: blue; cursor: pointer; } .active, .collapsible:after { padding-top: 10px; - color: #054646; padding-left: 85px; + color: #371F10; + font-weight: bold; } +/* Droped-down publication links */ .content { max-height: 0; overflow: hidden; transition: max-height 0.2s ease-out; padding-left: 50px; - background-color: #86a2a2; + background-color: #371F10; position: relative; line-height: 30px; margin-left: 85px; + color: white; + font-size: 14px; } -.up { - position: fixed; - font-weight: bolder; - bottom: 0%; - right: 15.1%; - background-color: blue; - z-index: 10; - padding: 10px; - border: none; +.content a { + color:white; + text-decoration: none; } -.down { - position: fixed; - font-weight: bolder; - bottom: 0%; - right: 12.8%; - background-color: blue; - z-index: 10; - padding: 10px; - border: none; +.content a:hover { + color: blue; + cursor: pointer; } -.top { +/* Scroll column */ +.scrollcolumn { position: fixed; - font-weight: bolder; - bottom: 0%; - right: 17.3%; - background-color: blue; + display: inline; + top:35%; + right:0%; + width: 60px; + outline: none; z-index: 10; - padding: 10px; - border: none; + text-align: center; } -.bottom { - position: fixed; - font-weight: bolder; - bottom: 0%; - right: 10%; - background-color: blue; - z-index: 10; - padding: 10px; - border: none; +/* Scroll buttons */ +.scrl { + background-color: white; + cursor: pointer; + border:none; + font-size: 15px; + margin-top: 10px; + height: 60px; + width: 60px; } -.indexlink { - position: fixed; - text-decoration: none; - font-size: 40px; - bottom: 0%; - right: 0%; - background-color: transparent; - border: none; - border-right-color: transparent; - z-index: 10; - padding: 0px 20px 10px 10px; - border: none; +.scrl:hover { + background-color: #0BEFEB; } -.timeline { - position: fixed; - font-size: 20px; - bottom: 0%; - right: 3%; - background-color: transparent; - border: none; - border-right-color: transparent; +/* Scroll button title */ +.scbt { + visibility: hidden; + width: 120px; + background-color: black; + color: #fff; + text-align: center; + border-radius: 6px; + padding: 5px 0; + font-size: 15px; + right: 50px; z-index: 10; - padding: 0px 30px 20px 10px; - border: none; -} - -.timeline a { - text-decoration: none; -} - -.indexlink a { - text-decoration: none; + position: absolute; } -#top { - padding-top: 42px; -} - -.up:hover, .down:hover, .top:hover, .bottom:hover { - cursor: pointer; - color: white; +.scrl:hover > .scbt { + visibility: visible; } \ No newline at end of file From 92622ad9ab9fcd632b6c5a7e60fecc4e6408ead7 Mon Sep 17 00:00:00 2001 From: "E.zn" Date: Thu, 16 Apr 2020 23:48:29 +0200 Subject: [PATCH 07/15] x --- templates/orgs.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/templates/orgs.html b/templates/orgs.html index c36f762..a8dec84 100644 --- a/templates/orgs.html +++ b/templates/orgs.html @@ -10,13 +10,15 @@ {{ page.name }} -

▤   {{ page.name }}

- - - - - +

▤ {{ page.name }}

+
+ + + + +
+
{{ body|safe }}