掌上百科 - PDAWIKI

 找回密码
 免费注册

QQ登录

只需一步,快速开始

查看: 2751|回复: 6

[经验交流] [2] 通过 article-style.css 调整跳转词典 JumpToDicts

[复制链接]
  • TA的每日心情
    慵懒
    5 天前
  • 签到天数: 214 天

    [LV.7]常住居民III

    发表于 2017-9-21 05:05:21 | 显示全部楼层 |阅读模式
    本帖最后由 deeke 于 2017-10-10 23:38 编辑 3 i$ P+ B! z6 n7 N2 m; J1 ~9 o

    4 z3 g% I8 L& I170928:更换图例。
    : |5 s  D. {% r' x; O: R------------------------------------------5 ?: Z2 S. `( z7 B9 N& L8 L
    - |- _! I  K& m- ]2 [
    ------------------------------------------
    ' V" p% \3 q! h6 [感谢 ryuya 制作、分享的跳转词典,和 GD 自带的构词法各有用处。* C7 _( F* g* G7 I3 K
    JumpToDicts 3.0 (英語構詞法詞典)! d0 |: G/ H2 n, }# I+ |
    JumpToDicts (phrase version add-ons)" x6 {- X8 M4 k! b7 W* ?$ r, \( r
    我的软件环境是:Win8.1 + GoldenDict_Qt5_x64_portable
    ; r4 s# c8 P# i2 }2 t$ @! T, a3 u( B+ _. m4 L2 K  x: T
    词典没有外置 css 文件,所以通过 article-style.css 来曲线修改。直接修改 mdx 文件更方便快捷,但是我们就要在平坦的道路上曲折前进。
    # H8 U* K3 O/ V" K根据来源不同,外框有四种颜色,此信息体现在小箭头( u279C )上,并保持一致。1 M: s4 D3 ]+ l) R3 O) ?& C

    3 x. J$ r+ H: Z' _. O1 n1. 在 GD 里找出词典编号。6 k: @/ A) Z5 P; a" M3 r. S
    鼠标右键“审查元素”,或直接按 F12 。每台电脑的词典编号并不相同。
    8 |5 a) V& v4 F
    1. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 对应 JumpToDicts 3.0! G- \& o4 D5 b9 f: ]1 p9 j; E& I
    2. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 对应 JumpToDicts (phrase version add-ons)
    复制代码
    : j4 P1 j3 P' N6 J( u  H

    7 S* ~' a: r0 y) u2. 修改 GD 的配置文件:“ c:\...\GoldenDict\portable\article-style.css ” 。' u+ l: |* S  ~$ w, w! M
    1. /* JumpToDicts | Start */" U$ s0 x2 f1 W5 w( s& D* z
    2. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div,
      ' C+ K" l% D% Y* A& x
    3. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div {
      ) B* H1 `! _9 k& l* e
    4.   font-family: Lato, sans-serif !important;
      5 z1 ^! n8 `) o& h. r* w
    5.   font-size: .625rem !important;
      / v: W( {# F: W0 d/ j; L
    6.   font-weight: normal !important;
      % _2 ?, N9 S4 D& A+ \
    7.   font-style: italic;
      / E1 v4 a5 O; P& t/ R, ~& A
    8.   width: auto !important;
      4 }6 }0 y* v: X& V
    9.   padding: 0 !important;4 v' Q( p$ t+ q8 `$ T$ `
    10.   color: gray !important;) {9 Q7 a6 T  r4 [
    11.   border: none !important;
      3 I& R6 y2 j$ l8 K( v
    12.   border-radius: 0 !important;
      . `/ q7 O$ ?. F. Z+ s, v
    13.   background-color: transparent !important;
      3 S) ?) ?, B; Z$ j) @+ {5 p
    14.   box-shadow: none !important;
      ; K( ?& m3 O% j$ V
    15.   vertical-align: baseline !important;4 ]% R) ?5 R: h0 s+ ^
    16. }
      , D& _+ f9 v8 p
    17. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div::before,
      % w! G7 ~6 f; [% s7 B5 b+ Y3 \
    18. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div::before {3 V" n4 Q% ?6 {5 x: G& w8 A- M
    19.   font-family: "Segoe UI Symbol";
      " K$ A4 K- h; O& O5 A7 n
    20.   font-size: .5rem;. E% t2 m- ~# I7 w% }/ J
    21.   font-style: normal;7 h: ], f+ K: B: s, ?8 e( D" q; q
    22.   line-height: 0;
      ! c+ l: S! k* ?) W9 Q( ^  r+ C/ k
    23.   position: relative;( h( t) U) x/ V0 y! Q4 b
    24.   bottom: .0425rem;
      2 W9 Z9 c* a" I* F/ ?
    25.   margin-right: .23rem;5 y$ f5 p% F; _: z7 E% k
    26.   content: "\279C";
      # z& ?( A) s" F8 T, C. S, O/ R
    27.   vertical-align: baseline;
      1 p6 V4 C& [/ a
    28.   color: green;
      + \  O6 z4 U" B' U% E
    29. }
      ( y5 P& L; q0 A. V
    30. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.MW::before { color: orange; }. t8 p$ y( T( \2 w5 j6 {
    31. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.O8::before { color: deeppink; }/ i  X3 K! w; ?" f
    32. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.spell::before { color: #444444; }
      ' {# U9 D$ u( U" W' {
    33. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div.phrase::before { color: #1E8BB7; }- ]% t% Z' ^, A% `' I% k% {
    34. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>br,3 b& @0 \. Q7 r% z
    35. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>br { display: none; }" ~2 c; ]  e/ a: f& j4 N0 ^1 W
    36. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>hr,; k: O; n& k% F
    37. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>hr { margin: .1rem !important; }6 h6 {; [2 y0 T9 T& ^, e: p4 G
    38. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a,
      , c! ^: {( ?- K- Z
    39. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a {
      ! X, l$ |+ u2 K- k3 q4 j
    40.   font-size: .875rem !important;& F3 @4 p" R6 T- L& \8 R2 w8 _
    41.   font-weight: bold !important;
      3 K: Y6 m( B/ b: o: R4 {: p( N
    42.   font-style: normal !important;# n3 v6 {0 O8 k; Y2 I; U* B5 v
    43.   margin: auto .23rem !important;
      ) B% V! U* m6 h, x8 R% H
    44.   text-decoration: none !important;/ [& U9 S; J7 i; {
    45.   color: black !important;
      ) ^0 W/ T, G1 B- G
    46.   border-bottom: .08rem solid transparent !important;: ?+ m5 b% M0 Z  d+ V: t3 c
    47.   outline: none !important;6 [: h/ h: O- p- @! g
    48. }$ B  A6 L6 t  H/ @" R7 H  b9 G5 g
    49. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:link,
      2 \2 P* ~3 n% x- _7 y7 s$ {
    50. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:link,
      0 ^  z5 y& d: ^+ s% D5 L! x# J5 s* X
    51. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:visited,
      ' A, j& `6 W5 i8 e' H
    52. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:visited { color: black !important; }
      * C$ X% H8 |; m& k
    53. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:hover,
        V; _, p. P+ a* E  J( ~
    54. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:hover,
      1 t8 k9 P4 F+ X0 |
    55. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:active,
      6 e3 `5 g0 z! p
    56. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:active {
      ) O: C$ O! P4 A9 E3 k' P3 C6 w
    57.   color: black !important;9 ^* R3 }; n% A0 ?" ?
    58.   border-bottom-color: black !important;& y+ L1 l! a# U3 s
    59.   background-color: yellow !important;
      3 d& V0 H: ~8 P5 O4 O7 a
    60. }( U( s6 d/ j7 Z6 s' l
    61. /* JumpToDicts | End */
    复制代码
    4 L$ S! t% e$ M  g
    ------------------------------------------
    # ]8 n) q. ?4 X修改 dsl 词典的展开按钮. I' }3 i1 b, v# i; m

    / L! c% |- _3 U: B7 j. N, Y4 U1. 在网上找两个图片表示展开、折叠,改名为 expand.png  、 collapse.png  。
    $ ^! [( s. v2 D放入文件夹:“ c:\...\GoldenDict\portable\icons\ ”备用。
    6 W: s( w* B% Z& h& Y
    7 P4 T' J: d# I8 H' R2. 修改 GD 的配置文件:“ c:\...\GoldenDict\portable\article-style.css ”。& {( A2 M; X% s, N/ ^8 s; C( U7 x" m
    调整各种 前后左右、高矮胖瘦。
      l" G  g' x* x
    1. .dsl_headwords img[src$="expand_opt.png"] { content: url("file:///icons/expand.png"); }& Y  [) h9 r" {0 L+ E
    2. .dsl_headwords img[src$="collapse_opt.png"] { content: url("file:///icons/collapse.png"); }, W" i- H! Y) C0 r! A& z2 ^: b
    3. .dsl_headwords img[src$="expand_opt.png"],
      $ ~; y+ D/ P* v- M9 N: K# k) l
    4. .dsl_headwords img[src$="collapse_opt.png"] {
      " |2 \8 p6 ^& v( w
    5.   line-height: 0 !important;8 m5 @# \: O, t7 k6 ]
    6.   position: relative;% t! ]2 r! ]& ~  }
    7.   bottom: .125rem;
        @$ x  ?! Z0 _4 V/ F9 c8 u
    8.   left: .475rem;  I  B- i. h4 f5 g; R
    9.   width: .75rem;4 `5 Q5 M- C! @: B
    10.   height: .75rem;
      $ C5 J" U1 }0 b9 ?" A
    11. }
    复制代码

    ; u0 ^9 G5 z: C------------------------------------------0 r% g/ |5 l/ [6 g$ ~/ G! M

    2 A9 B) @: Q' }* ^# i' `7 l, {* n. Y搞定收工,试试看外链的图床效果如何。别忘了帮我评分呦~~~

    评分

    3

    查看全部评分

    本帖被以下淘专辑推荐:

    • · 工具|主题: 61, 订阅: 28
  • TA的每日心情

    2019-9-20 08:37
  • 签到天数: 214 天

    [LV.7]常住居民III

    发表于 2017-9-21 08:27:21 | 显示全部楼层
    GoldenDict_Qt5_x64_portable 这种词典是不是只能放在portable目录??

    点评

    不是,比如我词典文件放在 c:\Dicts\ ,把这个文件夹的快捷方式 Dicts.lnk 放在 ...\GoldenDict\content\ 中就可以了。注意不是 mdx 的快捷方式,是文件夹的。  发表于 2017-9-21 10:20
  • TA的每日心情

    2019-9-20 08:37
  • 签到天数: 214 天

    [LV.7]常住居民III

    发表于 2017-9-21 10:29:45 | 显示全部楼层
    @deeke 好方法!!!!!
  • TA的每日心情
    慵懒
    5 天前
  • 签到天数: 214 天

    [LV.7]常住居民III

     楼主| 发表于 2017-9-21 10:37:42 | 显示全部楼层
    HMPT 发表于 2017-9-21 10:29
    8 g! O( N) t' I3 W/ _@deeke 好方法!!!!!
    8 @& `& f* {! s: H5 w; `8 w% }8 U, d
    我比较晚才开始用 GD ,都是从置顶的经验贴学来的。

    该用户从未签到

    发表于 2019-1-9 16:27:04 | 显示全部楼层
    谢谢,才知道把词典目录的快捷方式放在content那里也可以。
  • TA的每日心情
    开心
    2019-5-28 07:39
  • 签到天数: 339 天

    [LV.8]以坛为家I

    发表于 2019-4-12 16:25:44 | 显示全部楼层
    请问,直接修改mdx文件,怎么实现?
    + K* m' J6 S6 g' R$ \2 p# x& c9 i两个词典放在一个文件夹下。手机深蓝词典。/ u- F/ o% c' ?( k+ u
    谢谢!
    您需要登录后才可以回帖 登录 | 免费注册

    本版积分规则

    小黑屋|手机版|Archiver|PDAWIKI |网站地图

    GMT+8, 2024-5-20 18:46 , Processed in 0.042608 second(s), 11 queries , MemCache On.

    Powered by Discuz! X3.4

    Copyright © 2001-2023, Tencent Cloud.

    快速回复 返回顶部 返回列表