掌上百科 - PDAWIKI

 找回密码
 免费注册

QQ登录

只需一步,快速开始

查看: 3462|回复: 6

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

[复制链接]
  • TA的每日心情
    慵懒
    2025-1-28 16:22
  • 签到天数: 216 天

    [LV.7]常住居民III

    发表于 2017-9-21 05:05:21 | 显示全部楼层 |阅读模式
    本帖最后由 deeke 于 2017-10-10 23:38 编辑
    4 H; m* b* a* w. X: l: D2 d1 V9 X. R) o  H- r
    170928:更换图例。  p' m; ^& l. M& U4 O
    ------------------------------------------6 i/ M0 }4 O# |+ p
    ! K& Y  R) k8 @
    ------------------------------------------
    4 S9 Q9 e5 w. M& X6 ~0 }4 y感谢 ryuya 制作、分享的跳转词典,和 GD 自带的构词法各有用处。4 ]# M0 A* K/ v6 e5 p
    JumpToDicts 3.0 (英語構詞法詞典)0 ^* ?  o6 [$ G3 a2 Y1 A
    JumpToDicts (phrase version add-ons)
    2 O7 Z3 D; N9 r2 }我的软件环境是:Win8.1 + GoldenDict_Qt5_x64_portable
    ; j( J' \0 m; T+ {- `# s  s
    + G" a) |& H$ `* n: ~/ L' r词典没有外置 css 文件,所以通过 article-style.css 来曲线修改。直接修改 mdx 文件更方便快捷,但是我们就要在平坦的道路上曲折前进。6 s( b5 k+ s/ u3 L2 f+ u
    根据来源不同,外框有四种颜色,此信息体现在小箭头( u279C )上,并保持一致。
    & }% e3 ?: |( m, V3 ]! A7 x+ V0 Q. L% w' _& {) y7 K
    1. 在 GD 里找出词典编号。. D" F3 Y4 A2 H
    鼠标右键“审查元素”,或直接按 F12 。每台电脑的词典编号并不相同。
    & m* I; x, [1 r/ T1 R
    1. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 对应 JumpToDicts 3.0
      " o1 N9 _* h$ H; a
    2. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 对应 JumpToDicts (phrase version add-ons)
    复制代码
    * Y4 H( D2 c" Y) e- g+ Q

    ! w, K* x; S: V- O' e2 Q( n$ {* K- I2. 修改 GD 的配置文件:“ c:\...\GoldenDict\portable\article-style.css ” 。
    , r4 N; G; r4 q1 p/ L
    1. /* JumpToDicts | Start */
      ' T* q+ N) p1 t- @% f% |
    2. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div,2 \" D1 K/ G; x3 C; n: a$ J
    3. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div {" ~2 {5 Q/ L1 C1 N& s+ A& B1 u
    4.   font-family: Lato, sans-serif !important;' C, Q3 v, H! Z- {
    5.   font-size: .625rem !important;9 J4 |! T) j9 V  f, v/ k: I/ S
    6.   font-weight: normal !important;: B' F" ]( L8 X, ^" h, Z
    7.   font-style: italic;
        d; i( C) Y) X3 t1 v, @9 ?
    8.   width: auto !important;
      1 h" O' {  c0 ~4 d4 `" b' h
    9.   padding: 0 !important;
      & m' s# _2 x. |
    10.   color: gray !important;
      $ H5 @1 @7 V! \) b
    11.   border: none !important;7 T: G4 E& c& i# w' W( V* O
    12.   border-radius: 0 !important;
      & E) s( q3 Z( R/ a: E
    13.   background-color: transparent !important;
      % |( N8 A7 V3 l' T7 A" j, u
    14.   box-shadow: none !important;
      , a$ k. M! V2 m; S3 {9 b; {0 p& l  b
    15.   vertical-align: baseline !important;
      ( |) u3 N, |* `7 G" E) c8 D
    16. }
      6 Q2 T& ^. m$ _. M! i
    17. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div::before,
      8 A# J7 i* a- b2 n  l! J9 e( |
    18. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div::before {$ x4 p1 n$ G, R) v1 S8 W
    19.   font-family: "Segoe UI Symbol";
      3 z: d2 V! E' p! k: M: ~  O+ Q
    20.   font-size: .5rem;
      , B$ O8 u% d, ]/ i
    21.   font-style: normal;
      ( f# Z, G# O7 I/ C' C* }
    22.   line-height: 0;
      + R2 X# ]9 N4 j  f) O- p6 t: }- O
    23.   position: relative;
      / _) Z+ U( |0 E0 Z, D  d" |
    24.   bottom: .0425rem;
      # b! I& A. M3 i% E8 g
    25.   margin-right: .23rem;( M7 J' |  }& E8 N+ y# S
    26.   content: "\279C";# y& [' T3 X5 D
    27.   vertical-align: baseline;2 ^. ^% a0 W  C) [+ a
    28.   color: green;/ {/ D5 j1 T+ M; N4 W- e# U! {
    29. }
      ! _" ]( ^& p; V0 L' R0 z" v
    30. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.MW::before { color: orange; }
      $ Y8 A- J( U  y2 F$ F0 ?+ H6 J
    31. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.O8::before { color: deeppink; }
      - f, e6 r. Q- S2 x% u  A
    32. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.spell::before { color: #444444; }& b" \0 n7 z' [  h8 _
    33. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div.phrase::before { color: #1E8BB7; }
      5 F7 y% j( |/ H8 x. z8 r0 ]. |
    34. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>br,* w% y0 F2 H9 x! J0 l
    35. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>br { display: none; }
      . _$ k2 r( [2 |/ p9 ~
    36. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>hr,
      ) h2 v" c% U! l( m
    37. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>hr { margin: .1rem !important; }
      ) X0 v- q: E; z& E9 B
    38. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a,- d* m. H4 |+ u& @& l
    39. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a {- ]9 H/ w* J. ?& |, u! |( z+ q
    40.   font-size: .875rem !important;$ g- q# Z" N5 U8 J' I# E( `4 ~
    41.   font-weight: bold !important;
      + f, {9 p7 m6 t- g9 B
    42.   font-style: normal !important;
      ; K/ x: U! m0 y+ `/ G, D/ I& Q
    43.   margin: auto .23rem !important;
      & `: ^% ]) R: D  O* Z% L- ?. u& I
    44.   text-decoration: none !important;0 \% t, ^- F4 x- P, i8 n
    45.   color: black !important;
      $ j$ O. j  m8 [5 R' h
    46.   border-bottom: .08rem solid transparent !important;- D" [  x3 g& G
    47.   outline: none !important;) o2 u3 B( ?6 c0 G8 ]8 }( n8 |- D9 H
    48. }& f& o7 M6 S8 `2 A' O1 }
    49. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:link,
      # I3 u$ C; j+ v
    50. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:link,
      ) L8 w, D4 s. x& [2 |& r! F/ [# T3 ?) O+ Z
    51. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:visited,  O- F# m! y& R( ~, R  A- y% d
    52. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:visited { color: black !important; }
      ) x3 }6 f+ ~8 a% Y( Y& H5 R0 N6 G- ?7 v+ n
    53. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:hover,- K- U; S& S; V* P
    54. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:hover,
      - O$ |, D* F9 s7 j% B$ Q
    55. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:active,
      ) u4 g* I8 o0 C: b( J
    56. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:active {
      ; D+ h8 M: X( I* q
    57.   color: black !important;- r& l# H$ [) D9 h3 }: S# v+ ~  u. F
    58.   border-bottom-color: black !important;
      3 `4 f) V+ G4 l! R% |. M# a/ i
    59.   background-color: yellow !important;' F- n0 @8 d2 X- ^
    60. }
      & q7 z- w3 l. ]9 _# z
    61. /* JumpToDicts | End */
    复制代码

    ( B, @& k, J# B( _. v9 y0 c( X" J/ l------------------------------------------' m7 Y( g& m/ `
    修改 dsl 词典的展开按钮
    4 B+ X4 p9 o: R5 n( j" `' [, C$ M- b0 J4 \
    1. 在网上找两个图片表示展开、折叠,改名为 expand.png  、 collapse.png  。
    & d* `+ a8 {8 K. r9 L. o放入文件夹:“ c:\...\GoldenDict\portable\icons\ ”备用。
    - @  s/ l+ e5 H
    8 v4 a6 M& ?& N1 t! e3 V$ C2. 修改 GD 的配置文件:“ c:\...\GoldenDict\portable\article-style.css ”。% e# E" p+ C2 j9 U3 G- E' H
    调整各种 前后左右、高矮胖瘦。
    ; Y+ j7 k* r; o5 O! ?2 S
    1. .dsl_headwords img[src$="expand_opt.png"] { content: url("file:///icons/expand.png"); }
      % m% \! f- E; u9 Q5 o
    2. .dsl_headwords img[src$="collapse_opt.png"] { content: url("file:///icons/collapse.png"); }0 n+ t" X+ H3 @# W9 p) @
    3. .dsl_headwords img[src$="expand_opt.png"],
      3 h. M8 [% R$ P" B
    4. .dsl_headwords img[src$="collapse_opt.png"] {
      1 W' c2 g% M) P4 h; B) L
    5.   line-height: 0 !important;* x, g9 a# D. @/ K$ f
    6.   position: relative;+ S; n6 d( Z: m5 W; A8 t
    7.   bottom: .125rem;
      ( v5 n1 O8 Q! L% t
    8.   left: .475rem;( {8 L6 M/ I: l+ F" ^
    9.   width: .75rem;! \( l* J0 t( l4 y% V6 A" g* x
    10.   height: .75rem;
      $ z1 G6 i: X" r
    11. }
    复制代码
    2 k* E' z! E( \. B6 E8 Q7 C- G2 q9 C
    ------------------------------------------3 H" B: J  @$ y. p# i, `
    . u2 W" o* A% ~
    搞定收工,试试看外链的图床效果如何。别忘了帮我评分呦~~~

    评分

    3

    查看全部评分

    本帖被以下淘专辑推荐:

    • · 工具|主题: 61, 订阅: 27
  • 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的每日心情
    慵懒
    2025-1-28 16:22
  • 签到天数: 216 天

    [LV.7]常住居民III

     楼主| 发表于 2017-9-21 10:37:42 | 显示全部楼层
    HMPT 发表于 2017-9-21 10:29
      U/ z. @3 o6 q8 U7 l- _) t@deeke 好方法!!!!!

    0 Z1 V  A3 r/ }5 Q+ n' A我比较晚才开始用 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文件,怎么实现?" {+ C! P0 ^! ]' _. Y
    两个词典放在一个文件夹下。手机深蓝词典。
    6 c6 o2 [+ h$ w9 s8 K谢谢!
    您需要登录后才可以回帖 登录 | 免费注册

    本版积分规则

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

    GMT+8, 2025-5-5 16:05 , Processed in 0.021336 second(s), 24 queries .

    Powered by Discuz! X3.4

    © 2001-2023 Discuz! Team.

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