掌上百科 - PDAWIKI

 找回密码
 免费注册

QQ登录

只需一步,快速开始

查看: 2701|回复: 6

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

[复制链接]
  • TA的每日心情
    慵懒
    昨天 00:20
  • 签到天数: 211 天

    [LV.7]常住居民III

    发表于 2017-9-21 05:05:21 | 显示全部楼层 |阅读模式
    本帖最后由 deeke 于 2017-10-10 23:38 编辑
    ( I) T, c# F3 X$ _1 h3 S
    " v) K0 J. \+ c9 b# }4 T$ t! e170928:更换图例。
    % i9 o: N) ]; `, a6 I2 n------------------------------------------
      Q6 z/ W, v/ w" I( z
    6 {. [7 i: |3 s- {+ q------------------------------------------; Q8 @0 |8 ]( d3 D/ F
    感谢 ryuya 制作、分享的跳转词典,和 GD 自带的构词法各有用处。2 }7 O7 L1 x9 P7 S" [: s8 v6 ]! d' [
    JumpToDicts 3.0 (英語構詞法詞典)
    + Y+ r$ P0 b2 m, z6 a# p% IJumpToDicts (phrase version add-ons)
    / Y1 k% B' k9 Y1 ]5 |3 ^我的软件环境是:Win8.1 + GoldenDict_Qt5_x64_portable2 X$ }, C3 J9 ]

    * V' J. m# y9 c+ |词典没有外置 css 文件,所以通过 article-style.css 来曲线修改。直接修改 mdx 文件更方便快捷,但是我们就要在平坦的道路上曲折前进。
    3 [& {, `) @% u( Z# F( y, G0 D7 a9 V8 B根据来源不同,外框有四种颜色,此信息体现在小箭头( u279C )上,并保持一致。3 S  V2 e' q3 u* p- W: Q' V; t
    9 o+ P' ^# G2 g: y# a
    1. 在 GD 里找出词典编号。
    ' K* x/ F8 Y# i: F鼠标右键“审查元素”,或直接按 F12 。每台电脑的词典编号并不相同。- ?; y4 [" Z5 G$ Z) S2 ], g
    1. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 对应 JumpToDicts 3.0
      ( J. F( }+ h3 e/ Y' h
    2. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 对应 JumpToDicts (phrase version add-ons)
    复制代码
    3 U; h" K5 s0 Y4 y. a

    4 C# G$ }- P6 e3 @2. 修改 GD 的配置文件:“ c:\...\GoldenDict\portable\article-style.css ” 。
    " T0 O* e8 g% e7 S3 G! l0 a* C
    1. /* JumpToDicts | Start */& V4 z* E7 {- I, V
    2. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div,
      6 G7 L. _3 Y9 N. b
    3. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div {5 g8 \) ~' ^2 Z# C& |' C% R
    4.   font-family: Lato, sans-serif !important;8 R: `0 j7 r4 w. g/ Y# Q' a
    5.   font-size: .625rem !important;$ i; r+ c( p( ?5 P
    6.   font-weight: normal !important;, i$ M% X! d$ _
    7.   font-style: italic;
      5 I% }' O: m2 v1 z9 N& C8 B  Y8 l
    8.   width: auto !important;
      * l5 j8 L4 G! ^* v  L! n
    9.   padding: 0 !important;3 ?, b6 e" V0 [) B- S
    10.   color: gray !important;
      ; Q5 b' m, E; E2 y1 B- c. a0 R
    11.   border: none !important;$ y; t2 M+ r5 V
    12.   border-radius: 0 !important;
      0 t+ k. j) K4 ^4 }
    13.   background-color: transparent !important;* h. K( C. m  D# i  t" q
    14.   box-shadow: none !important;7 s0 v& b+ r6 W4 b) S$ D7 `$ m
    15.   vertical-align: baseline !important;
      ' r9 c) B5 ]# j* l. T! F) k
    16. }+ a) b' [; T. C2 t% B) I
    17. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div::before,
      5 d5 p2 [- G; j' A! D% v
    18. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div::before {9 }  K0 o! }4 z' f$ e9 C
    19.   font-family: "Segoe UI Symbol";) J) _3 ~- q7 c! |
    20.   font-size: .5rem;
      4 j8 o+ L( Y. [8 a0 {) g
    21.   font-style: normal;
      ( x/ [9 E: o/ _8 \+ k
    22.   line-height: 0;
      1 [' M# }# X3 _# X( i
    23.   position: relative;
      & [" L& t* _% W+ G3 E
    24.   bottom: .0425rem;
      1 j* o3 [% ~% N9 J8 `
    25.   margin-right: .23rem;
      ' |& t& M/ O$ T' k& A' P# H
    26.   content: "\279C";
      % b9 w" b0 ]5 S$ r% y$ J- T# \
    27.   vertical-align: baseline;- Q* f! r( ?/ T8 `8 f$ b
    28.   color: green;
      / E# d4 }( W  d$ O
    29. }$ _/ Y4 L: C( F' u. s
    30. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.MW::before { color: orange; }' n1 Q' C4 Y" V1 Z$ U
    31. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.O8::before { color: deeppink; }, a3 @. ~1 T' q8 N
    32. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.spell::before { color: #444444; }5 O6 p2 j" `+ U
    33. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div.phrase::before { color: #1E8BB7; }. q6 L) A9 |2 v  e$ n3 X
    34. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>br,4 P6 t# T& h; F6 c
    35. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>br { display: none; }
      & {8 o  J) o  m( o6 `+ k
    36. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>hr,
      & g& f" X# R# T: B  C0 o0 N
    37. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>hr { margin: .1rem !important; }
        B6 |9 C: S7 @1 g
    38. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a,
        ]9 h) b6 m8 Q  ?7 J3 F
    39. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a {
      8 G/ E4 S3 T- l# H. X0 w  t; v
    40.   font-size: .875rem !important;
      ; I& q9 Y( b# t5 q- ]; R" I' B
    41.   font-weight: bold !important;
      " q& V% x3 z3 N) x
    42.   font-style: normal !important;
      " d& [, l- }5 M  s3 ~- K
    43.   margin: auto .23rem !important;
      8 k, E1 Q  I& {2 ?0 t9 D4 m
    44.   text-decoration: none !important;5 N6 |# `! `" a0 O7 G. |! T
    45.   color: black !important;2 E' H7 \# V/ |2 R) Z; ~$ c' I
    46.   border-bottom: .08rem solid transparent !important;
      2 M. Y3 f! E3 K  R: t* w
    47.   outline: none !important;
      3 t' O8 v- d& _6 _; V- {  [0 L% e
    48. }2 g. S( B6 o0 O9 E7 s1 h0 ]9 F
    49. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:link,
      " N6 `8 ]# H+ s! V* }6 L' O, c0 k
    50. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:link,
      9 F7 u. Y& B) D9 O) S: i; E: a2 o
    51. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:visited,/ h5 [, _4 C  C& K+ c9 k& O
    52. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:visited { color: black !important; }/ e$ i4 v) m3 Y$ M
    53. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:hover,5 W/ w( k  b& E, D* F) X  }
    54. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:hover,
      4 Q' i/ a" B$ R. x7 q, A
    55. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:active,! I$ @3 R: w- T- `" y1 l
    56. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:active {0 v$ ]; y* V( T5 Z0 J
    57.   color: black !important;
      ! z! ]  l! d) D" t
    58.   border-bottom-color: black !important;
      0 y0 ^$ Z4 X" {* O- w7 Z
    59.   background-color: yellow !important;
      . A/ g+ b3 x8 O7 p, s
    60. }
      5 h: D! v3 s# N; f+ p
    61. /* JumpToDicts | End */
    复制代码

    4 l6 G. c1 I/ n  S- a------------------------------------------7 e3 N; ]& R! l" I5 s2 i! C
    修改 dsl 词典的展开按钮
    # S! }! C( P' S  ^* O% f9 V# K: D+ j! d
    1. 在网上找两个图片表示展开、折叠,改名为 expand.png  、 collapse.png  。
    & a7 Y  b) R" n放入文件夹:“ c:\...\GoldenDict\portable\icons\ ”备用。
    ; R9 Q' F7 K4 j, X7 y* v. [  s" E% P9 G6 r- p& {
    2. 修改 GD 的配置文件:“ c:\...\GoldenDict\portable\article-style.css ”。
    6 K8 n4 ~; R2 \+ E1 e0 H调整各种 前后左右、高矮胖瘦。# l7 _2 z* s9 Z0 t0 E
    1. .dsl_headwords img[src$="expand_opt.png"] { content: url("file:///icons/expand.png"); }8 K6 ]9 Y# W- n$ ?% B" o
    2. .dsl_headwords img[src$="collapse_opt.png"] { content: url("file:///icons/collapse.png"); }
        t9 G2 e. R# X7 w1 s- t
    3. .dsl_headwords img[src$="expand_opt.png"],/ J2 U% x7 c( s, ?
    4. .dsl_headwords img[src$="collapse_opt.png"] {5 i! b( T1 @) P. e. t1 d: g2 ~
    5.   line-height: 0 !important;# n/ b: _1 x/ n
    6.   position: relative;; F* o' T( A5 s6 n% z
    7.   bottom: .125rem;6 @: C6 H2 h6 f: n# [
    8.   left: .475rem;8 M( p, X# j- V! k! x
    9.   width: .75rem;/ G0 e/ \# V) J4 v8 ?6 d/ J
    10.   height: .75rem;. ]; J3 X( K2 v6 S  U9 u  P, l2 J
    11. }
    复制代码

    / d  H( w# C7 R# b9 ^------------------------------------------* K9 q" z3 A  L8 e

    ) ?/ k' F+ j7 U  }# l) q7 r! V搞定收工,试试看外链的图床效果如何。别忘了帮我评分呦~~~

    评分

    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的每日心情
    慵懒
    昨天 00:20
  • 签到天数: 211 天

    [LV.7]常住居民III

     楼主| 发表于 2017-9-21 10:37:42 | 显示全部楼层
    HMPT 发表于 2017-9-21 10:29
    1 C4 l# }: n5 w' F6 o7 K@deeke 好方法!!!!!

    7 ?; G/ Y, ~9 j* ^我比较晚才开始用 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文件,怎么实现?
    * r6 m2 U& ]5 m1 v4 d7 H两个词典放在一个文件夹下。手机深蓝词典。) d  F/ _4 V5 m( h# a
    谢谢!
    您需要登录后才可以回帖 登录 | 免费注册

    本版积分规则

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

    GMT+8, 2024-5-5 00:24 , Processed in 0.056425 second(s), 10 queries , MemCache On.

    Powered by Discuz! X3.4

    Copyright © 2001-2023, Tencent Cloud.

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